Packagecom.yworks.io.graphml.reader
Classpublic class ReadPortLayoutHandler
InheritanceReadPortLayoutHandler Inheritance AbstractInputHandler

The main port data handler responsible for parsing ports in a graphml file.

A shared instance can be retrieved using instance



Public Properties
 PropertyDefined by
  instance : ReadPortLayoutHandler
[static][read-only]
ReadPortLayoutHandler
Public Methods
 MethodDefined by
  
acceptKey(keyElement:XML, scopeType:String):Boolean
This method defines whether a specific key/data pair is handled by the input handler.
ReadPortLayoutHandler
 Inherited
applyDefault(context:GraphMLParseContext, defaultElement:XML, value:Object):void
This method is invoked when no data tag is defined, and the default value should be applied.
AbstractInputHandler
 Inherited
parseData(context:GraphMLParseContext, defaultValue:Boolean, dataElement:XML):void
Forwards to parseItemData This method is invoked each time a data element with matching key is processed.
AbstractInputHandler
 Inherited
parseDefaultData(context:GraphMLParseContext, keyElement:XML):Object
This method is invoked when the default value of the key element for a data element is parsed.
AbstractInputHandler
Protected Methods
 MethodDefined by
  
parseItemData(context:GraphMLParseContext, graph:IGraph, item:Object, defaultMode:Boolean, dataElement:XML):void
Parse the element for the given item.
ReadPortLayoutHandler
Public Constants
 ConstantDefined by
  ATTR_NAME : String = "geometry"
[static] The attr.name for ports defined in the <key> element for the edge <data> element.
ReadPortLayoutHandler
  _instance : ReadPortLayoutHandler
[static]
ReadPortLayoutHandler
Property detail
instanceproperty
instance:ReadPortLayoutHandler  [read-only]

Implementation
    public static function get instance():ReadPortLayoutHandler
Method detail
acceptKey()method
public override function acceptKey(keyElement:XML, scopeType:String):Boolean

This method defines whether a specific key/data pair is handled by the input handler. When it returns true, each occurence of data elements which match the id of the key element are forwarded to the input handler.

Parameters
keyElement:XML — the key element
 
scopeType:String — the scope type for which the key is defined.

One of

  • GraphMLConstants.SCOPE_ALL
  • GraphMLConstants.SCOPE_GRAPH
  • GraphMLConstants.SCOPE_NODE
  • GraphMLConstants.SCOPE_EDGE
  • GraphMLConstants.SCOPE_PORT

Returns
Booleantrue, if this hanlder can handle the data elements asked for.
parseItemData()method 
protected override function parseItemData(context:GraphMLParseContext, graph:IGraph, item:Object, defaultMode:Boolean, dataElement:XML):void

Parse the element for the given item.

Parameters
context:GraphMLParseContext — The parse context
 
graph:IGraph — The graph to work on
 
item:Object — The item.
 
defaultMode:Booleantrue when the default value, which is included in the key element, is processed, false otherwise.
 
dataElement:XML — The data element of the graphml file.
Constant detail
ATTR_NAMEconstant
public static const ATTR_NAME:String = "geometry"

The attr.name for ports defined in the <key> element for the edge <data> element.

_instanceconstant 
public static const _instance:ReadPortLayoutHandler