Package | com.yworks.io.graphml.reader |
Class | public class AutoMapperAttributeInputHandler |
Inheritance | AutoMapperAttributeInputHandler ![]() |
Implements | IInputHandler |
For reading complex mapper data, use ObjectMapperAttributeInputHandler
instead.
See also
Property | Defined By | ||
---|---|---|---|
autoCreateMapper : Boolean
Whether to create a new mapper instance if no mapper is found in the graph's mapper registry for the
provided mapper attribute name. | AutoMapperAttributeInputHandler |
Method | Defined By | ||
---|---|---|---|
AutoMapperAttributeInputHandler(attributeName:String, scopeType:String, valueType:String, autoCreateMapper:Boolean = true) | AutoMapperAttributeInputHandler | ||
acceptKey(keyElement:XML, scopeType:String):Boolean
Whether this data handler can parse a data section with the given key and scope type. | AutoMapperAttributeInputHandler | ||
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. | AutoMapperAttributeInputHandler | ||
initialize(context:GraphMLParseContext):void
Initializes this input handler. | AutoMapperAttributeInputHandler | ||
parseData(context:GraphMLParseContext, defaultValue:Boolean, dataElement:XML):void
This method is invoked each time a data element with matching key
is processed. | AutoMapperAttributeInputHandler | ||
parseDefaultData(context:GraphMLParseContext, keyElement:XML):Object
This method is invoked when the default value of the key element for a data tag is parsed. | AutoMapperAttributeInputHandler |
Method | Defined By | ||
---|---|---|---|
Create a mapper to store the parsed mapper values, if autoCreateMapper is true and
no matching mapper has been registered with the graph's mapper registry. | AutoMapperAttributeInputHandler | ||
Get the mapper that will be used to store the parsed mapper values. | AutoMapperAttributeInputHandler |
autoCreateMapper | property |
autoCreateMapper:Boolean
Whether to create a new mapper instance if no mapper is found in the graph's mapper registry for the provided mapper attribute name.
public function get autoCreateMapper():Boolean
public function set autoCreateMapper(value:Boolean):void
See also
AutoMapperAttributeInputHandler | () | Constructor |
public function AutoMapperAttributeInputHandler(attributeName:String, scopeType:String, valueType:String, autoCreateMapper:Boolean = true)
Parameters
attributeName:String — The name of the mapper attribute. The input handler will try to retrieve
a mapper from the graph's mapper registry using the attribute name.
| |
scopeType:String — The scope type of the attribute. One of
| |
valueType:String — The attribute content type. One of
| |
autoCreateMapper:Boolean (default = true ) — Whether a new mapper instance should be created if no mapper has been registered
with the graph's mapper registry for the provided attribute name.
|
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.
Parameters
context:GraphMLParseContext — the current parse context.
| |
defaultElement:XML — he default xml element.
| |
value:Object — the parsed value of the default element
|
createMapper | () | method |
protected function createMapper(graph:IGraph = null):DictionaryMapper
Create a mapper to store the parsed mapper values, if autoCreateMapper
is true and
no matching mapper has been registered with the graph's mapper registry.
Parameters
graph:IGraph (default = null )
|
DictionaryMapper |
getMapper | () | method |
protected function getMapper(graph:IGraph):IMapper
Get the mapper that will be used to store the parsed mapper values.
If no matching mapper is found in the graph's mapper registry and autoCreateMapper
is true, the mapper is created using createMapper()
an registered with the graph's mapper
registry.
Parameters
graph:IGraph |
IMapper |
See also
initialize | () | method |
public function initialize(context:GraphMLParseContext):void
Initializes this input handler.
This method is called by AutoMapperInputHandlerProvider
.
Parameters
context:GraphMLParseContext — The current parse context.
|
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 .
|