Package | com.yworks.io.graphml.reader |
Class | public class AbstractInputHandler |
Inheritance | AbstractInputHandler Object |
Implements | IInputHandler |
Subclasses | EdgeStyleInputHandler, LabelInputHandler, NodeInsetsInputHandler, NodeStyleInputHandler, ObjectMapperAttributeInputHandler, PortLocationModelInputHandler, PortStyleInputHandler, ReadEdgeLayoutHandler, ReadEdgeRealizerHandler, ReadLabelRealizerHandler, ReadNodeLayoutHandler, ReadNodeRealizerHandler, ReadPortLayoutHandler |
IInputHandler
interface.
Method | Defined By | ||
---|---|---|---|
acceptKey(keyElement:XML, scopeType:String):Boolean
This method defines whether a specific key/data pair is
handled by the input handler. | AbstractInputHandler | ||
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 | ||
getAttributeName(keyElement:XML):String [static]
Returns the value of the first attribute with the name GraphMLConstants.ATTR_NAME. | AbstractInputHandler | ||
getAttributeType(keyElement:XML):String [static]
Returns the value of the first attribute with the name GraphMLConstants.ATTR_TYPE. | AbstractInputHandler | ||
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 | ||
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 |
Method | Defined By | ||
---|---|---|---|
parseItemData(context:GraphMLParseContext, graph:IGraph, item:Object, defaultMode:Boolean, element:XML):void
Parse the element for the given item. | AbstractInputHandler |
acceptKey | () | method |
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
|
Boolean — true , if this hanlder can handle the data elements asked for.
|
applyDefault | () | method |
public function 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.
Parameters
context:GraphMLParseContext — the current parse context.
| |
defaultElement:XML — he default xml element.
| |
value:Object — the parsed value of the default element
|
getAttributeName | () | method |
public static function getAttributeName(keyElement:XML):String
Returns the value of the first attribute with the name GraphMLConstants.ATTR_NAME
.
If there is no such attribute, null
is returned.
Parameters
keyElement:XML — The xml key element to retrieve the attribute name from.
|
String — The attribute name of the given key element.
|
getAttributeType | () | method |
public static function getAttributeType(keyElement:XML):String
Returns the value of the first attribute with the name GraphMLConstants.ATTR_TYPE
.
If there is no such attribute or the value is the empty string the default attribute type
GraphMLConstants.TYPE_COMPLEX
is returned.
Parameters
keyElement:XML — The xml key element to retrieve the attribute type from.
|
String — The attribute type of the given key element.
|
parseData | () | method |
public function 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.
Parse a data element of a graphml file.
Parameters
context:GraphMLParseContext — the parse context
| |
defaultValue:Boolean — true when the default value,
which is included in the key element, is processed,
false otherwise.
| |
dataElement:XML — The data element of the graphml file.
|
parseDefaultData | () | method |
public function parseDefaultData(context:GraphMLParseContext, keyElement:XML):Object
This method is invoked when the default value of the key element for a data element is parsed.
Parameters
context:GraphMLParseContext — the current parse context.
| |
keyElement:XML — the xml node representing the key element.
|
Object — null
|
parseItemData | () | method |
protected function parseItemData(context:GraphMLParseContext, graph:IGraph, item:Object, defaultMode:Boolean, element:XML):void
Parse the element for the given item. This method has to be overridden by subclass implementations.
Parameters
context:GraphMLParseContext — The current parse context
| |
graph:IGraph — The current graph
| |
item:Object — The current edge
| |
defaultMode:Boolean — Whether to parse default data
| |
element:XML — The current xml data element
|