Packagecom.yworks.io.graphml.writer
Classpublic class GraphMLWriteContext
InheritanceGraphMLWriteContext Inheritance GraphMLContext Inheritance Object

Description of the context for the serialization 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.
GraphMLWriteContext
 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.
GraphMLWriteContext
 Inherited
getContainer(clazz:Class):Object
Get the last container stored in the context that can be casted to the given class.
GraphMLContext
 Inherited
getProperty(name:String):Object
Retrieve a context property.
GraphMLContext
  
Gets the error handler for writing.
GraphMLWriteContext
  
lookup(type:Class):Object
[override]
GraphMLWriteContext
  
lookupForItem(item:Object, type:Class):Object
[override] Tries to create or retrieve an implementation of the given type for a given item.
GraphMLWriteContext
 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
Constructor Detail
GraphMLWriteContext()Constructor
public function GraphMLWriteContext(writer:DirectGraphMLWriter)

Creates a new instance.

Parameters
writer:DirectGraphMLWriter — The writer 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.
getWriteErrorHandler()method 
public function getWriteErrorHandler():IGraphMLWriteErrorHandler

Gets the error handler for writing.

Returns
IGraphMLWriteErrorHandler — the error handler

See also

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

Parameters

type:Class

Returns
Object
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