Packageorg.springextensions.actionscript.ioc.config.impl.xml.parser.impl.nodeparser
Classpublic class AbstractNodeParser
InheritanceAbstractNodeParser Inheritance Object
Implements INodeParser
Subclasses ArrayCollectionNodeParser, ArrayNodeParser, DictionaryNodeParser, KeyValueNodeParser, NanNodeParser, NullNodeParser, ObjectNodeParser, RefNodeParser, UndefinedNodeParser, VectorNodeParser

Abstract base class for node parsers.

Authors: Christophe Herreman, Erik Westra Version: $Revision: 21 $, $Date: 2008-11-01 22:58:42 +0100 (za, 01 nov 2008) $, $Author: dmurat $ Since: 0.1



Protected Properties
 PropertyDefined By
  nodeNames : Vector.<String>
An array containing the compatible node names.
AbstractNodeParser
  xmlObjectDefinitionsParser : IXMLObjectDefinitionsParser
The xmlObjectDefinitionsParser using this NodeParser
AbstractNodeParser
Public Methods
 MethodDefined By
  
AbstractNodeParser(xmlObjectDefinitionsParser:IXMLObjectDefinitionsParser, nodeName:String)
This class should not be instantiated directly.
AbstractNodeParser
  
addNodeNameAlias(alias:String):void
Will add an alias that this node parser will react upon.
AbstractNodeParser
  
canParse(node:XML):Boolean
Determines if the given node can be parsed.
AbstractNodeParser
  
getNodeNames():Vector.<String>
Return an array containing the node names this parser can parse
AbstractNodeParser
  
parse(node:XML):*
This is an abstract method and should be overridden in a subclass.
AbstractNodeParser
Protected Methods
 MethodDefined By
  
initAbstractNodeParser(xmlObjectDefinitionsParser:IXMLObjectDefinitionsParser, nodeName:String):void
Initializes the current AbstractNodeParser.
AbstractNodeParser
Property Detail
nodeNamesproperty
protected var nodeNames:Vector.<String>

An array containing the compatible node names.

xmlObjectDefinitionsParserproperty 
protected var xmlObjectDefinitionsParser:IXMLObjectDefinitionsParser

The xmlObjectDefinitionsParser using this NodeParser

Constructor Detail
AbstractNodeParser()Constructor
public function AbstractNodeParser(xmlObjectDefinitionsParser:IXMLObjectDefinitionsParser, nodeName:String)

This class should not be instantiated directly. Create a subclass that implements the parse method.

Parameters
xmlObjectDefinitionsParser:IXMLObjectDefinitionsParser — The definitions parser using this NodeParser
 
nodeName:String — The name of the node this parser should react to
Method Detail
addNodeNameAlias()method
public function addNodeNameAlias(alias:String):void

Will add an alias that this node parser will react upon. It has direct influence on the result of the canParse method.

Parameters

alias:String — Alternative nodename that can be parsed by this parser

canParse()method 
public function canParse(node:XML):Boolean

Determines if the given node can be parsed.

Parameters

node:XML — The node to be checked.

Returns
Boolean — true if this implementation can parse the given node.
getNodeNames()method 
public function getNodeNames():Vector.<String>

Return an array containing the node names this parser can parse

Returns
Vector.<String>
initAbstractNodeParser()method 
protected function initAbstractNodeParser(xmlObjectDefinitionsParser:IXMLObjectDefinitionsParser, nodeName:String):void

Initializes the current AbstractNodeParser.

Parameters

xmlObjectDefinitionsParser:IXMLObjectDefinitionsParser
 
nodeName:String

parse()method 
public function parse(node:XML):*

This is an abstract method and should be overridden in a subclass. Will parse the given node. The type of the result depends on the implementation of the node parser.

Parameters

node:XML — The node that will be parsed

Returns
* — the parsed node