Packagecom.yworks.io.graphml.reader
Classpublic class PortStyleInputHandler
InheritancePortStyleInputHandler Inheritance AbstractInputHandler Inheritance Object

This class manages the deserialization of all port styles in the graphml input.

To deserialize a custom style, AbstractDeserialzer instances can be registered with GraphMLIOHandler.registerDeserializer, which will be used automatically by this handler.



Public Properties
 PropertyDefined By
  instance : PortStyleInputHandler
[static] [read-only] Returns the shared instance of this handler.
PortStyleInputHandler
Public Methods
 MethodDefined By
  
acceptKey(keyElement:XML, scopeType:String):Boolean
[override] This method defines whether a specific key/data pair is handled by the input handler.
PortStyleInputHandler
 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
getAttributeName(keyElement:XML):String
[static] Returns the value of the first attribute with the name GraphMLConstants.ATTR_NAME.
AbstractInputHandler
 Inherited
getAttributeType(keyElement:XML):String
[static] Returns the value of the first attribute with the name GraphMLConstants.ATTR_TYPE.
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, element:XML):void
[override] Parses the data.
PortStyleInputHandler
Property Detail
instanceproperty
instance:PortStyleInputHandler  [read-only]

Returns the shared instance of this handler.


Implementation
    public static function get instance():PortStyleInputHandler
Method Detail
acceptKey()method
override public 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 
override protected function parseItemData(context:GraphMLParseContext, graph:IGraph, item:Object, defaultMode:Boolean, element:XML):void

Parses the data.

Parameters

context:GraphMLParseContext — The current parse context
 
graph:IGraph — The current graph
 
item:Object — The current node
 
defaultMode:Boolean — Whether to parse default data
 
element:XML — The current xml data element