Packagecom.yworks.io.graphml.reader
Classpublic class GraphMLParseContext
InheritanceGraphMLParseContext Inheritance GraphMLContext Inheritance Object

A GraphMLContext that is used for storing state during the parsing process.



Public Properties
 PropertyDefined By
 Inheritedcontainers : Iterator
[read-only] Returns a read-only view of the container objects stored in this context.
GraphMLContext
 Inheritedcount : int
[read-only] Return the number of elements on the element stack
GraphMLContext
 InheritedcurrentGraph : Object
[read-only] Returns the currently active graph object or null if there is none.
GraphMLContext
 InheritedlastContainer : Object
[read-only] Return the last container object stored in this context.
GraphMLContext
 InheritednestingDepth : int
[read-only] Return the current depth of the graph nesting stack
GraphMLContext
 InheritednextToLastContainer : Object
[read-only] Return the second-to-top element in the current element nesting
GraphMLContext
Protected Properties
 PropertyDefined By
 Inherited_containers : YList
A list of container objects.
GraphMLContext
 Inherited_myLookupChain : LookupChain
The lookup chain
GraphMLContext
 Inherited_properties : IMapper
The properties stored in this context.
GraphMLContext
Public Methods
 MethodDefined By
  
Creates a new instance.
GraphMLParseContext
 Inherited
addLookup(type:Class, lookup:IContextLookupChainLink):void
Adds a lookup chain element to the chain of lookups for a given type.
GraphMLContext
  
canDecorate(type:Class):Boolean
[override] Determines whether this instance can be used to decorate the lookup for a certain type.
GraphMLParseContext
 Inherited
getContainer(clazz:Class):Object
Get the last container stored in the context that can be casted to the given class.
GraphMLContext
  
GraphMLParseContext
  
Returns the current XML element (or null if no XML element is contained in the lookup).
GraphMLParseContext
  
Returns the error handler implementation that is used during parsing.
GraphMLParseContext
 Inherited
getProperty(name:String):Object
Retrieve a context property.
GraphMLContext
  
lookup(type:Class):Object
[override] Returns an instance that implements the given type or null.
GraphMLParseContext
  
lookupForItem(item:Object, type:Class):Object
[override] Tries to create or retrieve an implementation of the given type for a given item.
GraphMLParseContext
 Inherited
Remove the last container that was added to the container list.
GraphMLContext
 Inherited
pushGraphMLElement(element:Object):void
Append the given container object to the list of container objects.
GraphMLContext
 Inherited
removeLookup(type:Class, lookup:IContextLookupChainLink):void
Removes a previously registered lookup chain element from the chain of lookups for a given type.
GraphMLContext
 Inherited
setLookup(c:Class, o:Object):void
Map the given class to the given object.
GraphMLContext
 Inherited
setProperty(name:String, value:Object):void
Set a context property.
GraphMLContext
Public Constants
 ConstantDefined By
  PROPERTY_GRAPHML_CORE_NS : String = com.yworks.io.graphml.reader.GRAPHML_CORE_NS
[static]
GraphMLParseContext
  PROPERTY_YWORKS_EXT_NS : String = com.yworks.io.graphml.reader.YFILES_EXT_NS
[static]
GraphMLParseContext
Constructor Detail
GraphMLParseContext()Constructor
public function GraphMLParseContext(parser:GraphMLParser)

Creates a new instance.

Parameters
parser:GraphMLParser — The GraphMLParser to be used.
Method Detail
canDecorate()method
override public function canDecorate(type:Class):Boolean

Determines whether this instance can be used to decorate the lookup for a certain type.

Parameters

type:Class — The type to decorate the lookup for.

Returns
Booleantrue if this instance can be used to decorate the lookup for the given type.
getDeserializer()method 
public function getDeserializer(targetNode:XML):IDeserializer

Parameters

targetNode:XML

Returns
IDeserializer
getElement()method 
public function getElement():XML

Returns the current XML element (or null if no XML element is contained in the lookup).

Returns
XML — The current XML or null.
getParseErrorHandler()method 
public function getParseErrorHandler():IGraphMLParseErrorHandler

Returns the error handler implementation that is used during parsing.

Returns
IGraphMLParseErrorHandler
lookup()method 
override public function lookup(type:Class):Object

Returns an instance that implements the given type or null.

Typically, this method will be called in order to obtain a different view or aspect of the current instance. This is quite similar to casting or using a super type or interface of this instance, but is not limited to inheritance or compile time constraints. An instance implementing this method is not required to return non-null implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.

Parameters

type:Class — the type for which an instance shall be returned

Returns
Object — an instance that is assignable to type or null
lookupForItem()method 
override public function lookupForItem(item:Object, type:Class):Object

Tries to create or retrieve an implementation of the given type for a given item.

Parameters

item:Object — the item to lookup a type for
 
type:Class — the type to look up

Returns
Object — an implementation or null
Constant Detail
PROPERTY_GRAPHML_CORE_NSConstant
public static const PROPERTY_GRAPHML_CORE_NS:String = com.yworks.io.graphml.reader.GRAPHML_CORE_NS

PROPERTY_YWORKS_EXT_NSConstant 
public static const PROPERTY_YWORKS_EXT_NS:String = com.yworks.io.graphml.reader.YFILES_EXT_NS