Packagecom.yworks.io.graphml.realizer
Classpublic class AbstractEdgeRealizerSerializer
InheritanceAbstractEdgeRealizerSerializer Inheritance Object
Implements IEdgeRealizerSerializer
Subclasses PolylineEdgeStyleRealizerSerializer

Abstract base class for realizerserializers that can read and/or write edge graphics information written/to be parsed by yFiles Java



Public Methods
 MethodDefined By
  
canRead(node:XML, context:GraphMLParseContext):Boolean
Whether this instance can deserialize the given xml element in the given context.
AbstractEdgeRealizerSerializer
  
canWrite(edge:IEdge, context:GraphMLWriteContext):Boolean
Whether this instance can serialize the given edge style in the given context.
AbstractEdgeRealizerSerializer
  
Create a style instance that can represent the edge graphics information of the given xml element.
AbstractEdgeRealizerSerializer
  
getElementName(item:Object):String
Subclasses have to override this method.
AbstractEdgeRealizerSerializer
  
Subclasses have to override this method.
AbstractEdgeRealizerSerializer
  
getNamespace():Namespace
Returns the namespace of the element this serilaizer writes.
AbstractEdgeRealizerSerializer
  
Subclasses have to override this method.
AbstractEdgeRealizerSerializer
  
parse(style:IEdgeStyle, element:XML, context:GraphMLParseContext):void
Parses a serialized yFiles Java edge realizer into the given style.
AbstractEdgeRealizerSerializer
  
write(edge:IEdge, writer:IXmlWriter, context:GraphMLWriteContext):void
Write the given edge style in a format that can be parsed into a edge realizer by yFiles Java.
AbstractEdgeRealizerSerializer
  
Write the attributes of the realizer xml element
AbstractEdgeRealizerSerializer
Protected Methods
 MethodDefined By
  
parseArrows(arrowsElement:XML, style:IEdgeStyle):void
Parse the GraphML arrows element that defines the arrows for the current edge
AbstractEdgeRealizerSerializer
  
parsePath(pathElement:XML, edge:IEdge, graph:IGraph):void
Parse the GraphML Path element which defines the control points of the current edge
AbstractEdgeRealizerSerializer
  
processAfterParsing(style:IEdgeStyle, element:XML, context:GraphMLParseContext):void
Called at the end of the parse method.
AbstractEdgeRealizerSerializer
Method Detail
canRead()method
public function canRead(node:XML, context:GraphMLParseContext):Boolean

Whether this instance can deserialize the given xml element in the given context.

Parameters

node:XML — The xml element.
 
context:GraphMLParseContext — the parse context.

Returns
Booleantrue if this instance can deserialize the xml element.
canWrite()method 
public function canWrite(edge:IEdge, context:GraphMLWriteContext):Boolean

Whether this instance can serialize the given edge style in the given context.

Parameters

edge:IEdge — the edge.
 
context:GraphMLWriteContext — the write context.

Returns
Booleantrue if this instance can serialize the edge style.
createStyleInstance()method 
public function createStyleInstance(element:XML, context:GraphMLParseContext):IEdgeStyle

Create a style instance that can represent the edge graphics information of the given xml element.

Parameters

element:XML — the xml element.
 
context:GraphMLParseContext — the parse context.

Returns
IEdgeStyle — the deserialized edge style instance.
getElementName()method 
public function getElementName(item:Object):String

Subclasses have to override this method.

Parameters

item:Object

Returns
String

Throws
flash.errors:IllegalOperationError, — if not overridden.
getElementNames()method 
public function getElementNames():Array

Subclasses have to override this method.

Returns
Array

Throws
flash.errors:IllegalOperationError, — if not overridden.
getNamespace()method 
public function getNamespace():Namespace

Returns the namespace of the element this serilaizer writes.

Returns
NamespaceGraphMLConstants.YWORKS_EXT_NS
getStyleClass()method 
public function getStyleClass():Class

Subclasses have to override this method.

Returns
Class

Throws
flash.errors:IllegalOperationError, — if not overridden.
parse()method 
public function parse(style:IEdgeStyle, element:XML, context:GraphMLParseContext):void

Parses a serialized yFiles Java edge realizer into the given style.

Parameters

style:IEdgeStyle — An edge style that is used to display the appearance of the yFiles Java edge realizer.
 
element:XML — the graphml edge element
 
context:GraphMLParseContext — the current parsing context

parseArrows()method 
protected function parseArrows(arrowsElement:XML, style:IEdgeStyle):void

Parse the GraphML arrows element that defines the arrows for the current edge

Parameters

arrowsElement:XML — The GraphML arrows element
 
style:IEdgeStyle — the edge style

parsePath()method 
protected function parsePath(pathElement:XML, edge:IEdge, graph:IGraph):void

Parse the GraphML Path element which defines the control points of the current edge

Parameters

pathElement:XML — A GraphML path element
 
edge:IEdge — The current edge
 
graph:IGraph — The current graph instance

processAfterParsing()method 
protected function processAfterParsing(style:IEdgeStyle, element:XML, context:GraphMLParseContext):void

Called at the end of the parse method. Can be used to execute post-parsing actions.

This implementation stores hierarchy related information in the parse context which can be used in a post processing step after parsing.

Parameters

style:IEdgeStyle — The IEdgeStyle instance whose information was parsed.
 
element:XML — The XML element which was parsed.
 
context:GraphMLParseContext — The current GraphMLParseContext.

write()method 
public function write(edge:IEdge, writer:IXmlWriter, context:GraphMLWriteContext):void

Write the given edge style in a format that can be parsed into a edge realizer by yFiles Java.

Parameters

edge:IEdge — An edge style that can be serialized to a format that can be read by yFiles Java.
 
writer:IXmlWriter — The xml writer
 
context:GraphMLWriteContext — The current write context.

writeAttributes()method 
public function writeAttributes(edge:IEdge, writer:IXmlWriter, context:GraphMLWriteContext):void

Write the attributes of the realizer xml element

Parameters

edge:IEdge — An edge style that can be serialized to a format that can be read by yFiles Java.
 
writer:IXmlWriter — The xml writer.
 
context:GraphMLWriteContext — The current write context.