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

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



Public Properties
 PropertyDefined by
 Inheritedcontainers : Iterator
Returns a read-only view of the container objects stored in this context.
GraphMLContext
 Inheritedcount : int
Return the number of elements on the element stack
GraphMLContext
 InheritedcurrentGraph : Object
Returns the currently active graph object
GraphMLContext
 InheritedlastContainer : Object
Return the last container object stored in this context.
GraphMLContext
 InheritednestingDepth : int
Return the current depth of the graph nesting stack
GraphMLContext
 InheritednextToLastContainer : Object
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
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
  
getElement():XML
Returns the current XML element or null
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
Returns an instance that implements the given type or null.
GraphMLParseContext
  
lookupForItem(item:Object, type:Class):Object
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_YWORKS_EXT_NS : String = "org.graphdrawing.graphml.reader.dom.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
public override 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.
getElement()method 
public function getElement():XML

Returns the current XML element or null

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 
public override 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 
public override 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_YWORKS_EXT_NSconstant
public static const PROPERTY_YWORKS_EXT_NS:String = "org.graphdrawing.graphml.reader.dom.YFILES_EXT_NS"