Package | com.yworks.io.graphml.reader |
Class | public class AttributeInputHandler |
Inheritance | AttributeInputHandler Object |
Implements | IInputHandler |
Subclasses | MapperAttributeInputHandler, MapperRegistryAttributeInputHandler |
Property | Defined By | ||
---|---|---|---|
attributeName : String [read-only]
The attribute name
| AttributeInputHandler | ||
contentType : String [read-only]
The content type of the attribute. | AttributeInputHandler |
Property | Defined By | ||
---|---|---|---|
_attributeFactory : IAttributeFactory
The IAttributeFactory to store parsed values in. | AttributeInputHandler | ||
_attributeName : String
The attribute name
| AttributeInputHandler | ||
_contentType : String | AttributeInputHandler |
Method | Defined By | ||
---|---|---|---|
AttributeInputHandler(attrName:String, scopeType:String, contentType:String, attributeFactory:IAttributeFactory)
Creates a new input handler for a given attribute. | AttributeInputHandler | ||
acceptKey(keyElement:XML, scopeType:String):Boolean
Whether this data handler can parse a data section with the given key and scope type. | AttributeInputHandler | ||
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. | AttributeInputHandler | ||
parseData(context:GraphMLParseContext, defaultValue:Boolean, dataElement:XML):void
This method is invoked each time a data element with matching key
is processed. | AttributeInputHandler | ||
parseDefaultData(context:GraphMLParseContext, keyElement:XML):Object
This method is invoked when the default value of the key element for a data tag is parsed. | AttributeInputHandler |
_attributeFactory | property |
protected var _attributeFactory:IAttributeFactory
The IAttributeFactory
to store parsed values in.
_attributeName | property |
protected var _attributeName:String
The attribute name
_contentType | property |
protected var _contentType:String
attributeName | property |
attributeName:String
[read-only] The attribute name
public function get attributeName():String
contentType | property |
contentType:String
[read-only] The content type of the attribute.
public function get contentType():String
See also
AttributeInputHandler | () | Constructor |
public function AttributeInputHandler(attrName:String, scopeType:String, contentType:String, attributeFactory:IAttributeFactory)
Creates a new input handler for a given attribute.
ParametersattrName:String — The value of the attr.name attribute of the
<key> element for the attribute this data handler should read.
| |
scopeType:String — the scope to accept
| |
contentType:String — the type of the attribute
| |
attributeFactory:IAttributeFactory |
See also
acceptKey | () | method |
public function acceptKey(keyElement:XML, scopeType:String):Boolean
Whether this data handler can parse a data section with the given key and scope type.
Parameters
keyElement:XML — the xml element which contains the key
| |
scopeType:String — the scope type that contains the data section
|
Boolean — true if this data can parse a data section with this key and scopeType .
|
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.
This implementation forwards the content of the default element to parseData()
.
Parameters
context:GraphMLParseContext — the current parse context.
| |
defaultElement:XML | |
value:Object |
parseData | () | method |
public function parseData(context:GraphMLParseContext, defaultValue:Boolean, dataElement:XML):void
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 tag is parsed.
Parameters
context:GraphMLParseContext — The current parse context.
| |
keyElement:XML — The xml node that represents the key element
|
Object — The parsed value of the xml element, may be null .
|