| Package | com.yworks.io.graphml.reader |
| Class | public class GraphMLParser |
| Inheritance | GraphMLParser Object |
| Implements | IContextLookup |
| Property | Defined By | ||
|---|---|---|---|
| contextLookup : Dictionary
The context dictionary which is used for populating the
parse context lookup. | GraphMLParser | ||
| idAcceptor : IIdAcceptor
Get or set the IIdAcceptor instance that this parser uses. | GraphMLParser | ||
| initialContext : GraphMLParseContext
A custom parse context instance that will be used by the parse process. | GraphMLParser | ||
| inputHandlerProvider : IInputHandlerProvider
Get or set the IInputHandlerProvider instance that this parser uses. | GraphMLParser | ||
| parseErrorHandler : IGraphMLParseErrorHandler
The error handler for parsing. | GraphMLParser | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new instance. | GraphMLParser | ||
addInputHandler(handler:IInputHandler):void
Adds an input handler to this instance
| GraphMLParser | ||
addXmlAttributesParser(attributesParser:IXmlAttributesParser):void
Adds a parser for xml attributes. | GraphMLParser | ||
lookupForItem(item:Object, type:Class):Object
Tries to create or retrieve an implementation of the given type
for a given item. | GraphMLParser | ||
parse(graphMLElement:XML):void
Parses a GraphML element
| GraphMLParser | ||
parseKeyElement(keyElement:XML):void
Parses a XML key element
| GraphMLParser | ||
registerDefaultDeserializer(deserializer:IDeserializer):void
Register a default deserializer for XML content. | GraphMLParser | ||
registerDeserializer(deserializer:IDeserializer):void
Register a deserializer. | GraphMLParser | ||
removeXmlAttributesParser(attributesParser:IXmlAttributesParser):void
Removes a parser for xml attributes. | GraphMLParser | ||
setContextProperty(name:String, value:Object):void
Set a context property which is considered when creating a GraphMLParseContext. | GraphMLParser | ||
setGraphItemFactory(factory:IGraphItemFactory):void
Sets the factory for graph element creation. | GraphMLParser | ||
| Method | Defined By | ||
|---|---|---|---|
Gets the GraphMLParseContext. | GraphMLParser | ||
nodeCreated(id:Object, node:Object):void
Called when a node was created by parseNodeElement. | GraphMLParser | ||
parseDataNodes(dataElements:IMapper, handlerDef:HandlerDefinition):void
Parses the data elements of a graphml element using a suitable handler. | GraphMLParser | ||
parseEdgeElement(edgeElement:XML):void
Parses a XML element representing an edge. | GraphMLParser | ||
parseFolderElement(element:XML):void
Parses a folder element. | GraphMLParser | ||
parseGraphElement(graphElement:XML):void
Parses a XML element representing a graph
| GraphMLParser | ||
parseNodeElement(nodeElement:XML):void
Parses a XML element representing a node. | GraphMLParser | ||
parsePortElement(portElement:XML):void
Parses a port element. | GraphMLParser | ||
processAfterParsing(context:GraphMLParseContext):void
Called at the end of parse(). | GraphMLParser | ||
sourceNodeCreated(id:Object, node:Object, edge:Object):void
Called when parseEdgeElement created an edge with a (yet)
unparsed source node. | GraphMLParser | ||
targetNodeCreated(id:Object, node:Object, edge:Object):void
Called when parseEdgeElement created an edge with a (yet)
unparsed target node. | GraphMLParser | ||
| contextLookup | property |
contextLookup:DictionaryThe context dictionary which is used for populating the parse context lookup.
public function get contextLookup():Dictionary public function set contextLookup(value:Dictionary):void| idAcceptor | property |
idAcceptor:IIdAcceptor
Get or set the IIdAcceptor instance that this parser uses.
public function get idAcceptor():IIdAcceptor public function set idAcceptor(value:IIdAcceptor):void| initialContext | property |
initialContext:GraphMLParseContextA custom parse context instance that will be used by the parse process.
If this property is not set, a default implementation that is just able to handle the basic graphml deserialization process is used
public function get initialContext():GraphMLParseContext public function set initialContext(value:GraphMLParseContext):void| inputHandlerProvider | property |
inputHandlerProvider:IInputHandlerProvider
Get or set the IInputHandlerProvider instance that this parser uses.
public function get inputHandlerProvider():IInputHandlerProvider public function set inputHandlerProvider(value:IInputHandlerProvider):voidSee also
| parseErrorHandler | property |
parseErrorHandler:IGraphMLParseErrorHandlerThe error handler for parsing.
public function get parseErrorHandler():IGraphMLParseErrorHandler public function set parseErrorHandler(value:IGraphMLParseErrorHandler):void| GraphMLParser | () | Constructor |
public function GraphMLParser()Creates a new instance.
| addInputHandler | () | method |
public function addInputHandler(handler:IInputHandler):voidAdds an input handler to this instance
Parameters
handler:IInputHandler — the input handler to add
|
| addXmlAttributesParser | () | method |
public function addXmlAttributesParser(attributesParser:IXmlAttributesParser):voidAdds a parser for xml attributes.
Parameters
attributesParser:IXmlAttributesParser — The parser to add.
|
| createParseContext | () | method |
protected function createParseContext():GraphMLParseContext
Gets the GraphMLParseContext.
GraphMLParseContext — The GraphMLParseContext.
|
See also
| lookupForItem | () | method |
public function lookupForItem(item:Object, type:Class):ObjectTries to create or retrieve an implementation of the given type for a given item.
Parameters
item:Object — the item to lookup a type for
| |
type:Class — the type to look up
|
Object — an implementation or null
|
| nodeCreated | () | method |
protected function nodeCreated(id:Object, node:Object):void
Called when a node was created by parseNodeElement.
Parameters
id:Object — The id of the newly created node.
| |
node:Object — The node which was created.
|
| parse | () | method |
public function parse(graphMLElement:XML):voidParses a GraphML element
Parameters
graphMLElement:XML — The element to parse.
|
| parseDataNodes | () | method |
protected function parseDataNodes(dataElements:IMapper, handlerDef:HandlerDefinition):void
Parses the data elements of a graphml element using a suitable handler.
Called for all registered input handlers.
Parameters
dataElements:IMapper | |
handlerDef:HandlerDefinition |
| parseEdgeElement | () | method |
protected function parseEdgeElement(edgeElement:XML):voidParses a XML element representing an edge.
Parameters
edgeElement:XML — The element to parse.
|
| parseFolderElement | () | method |
protected function parseFolderElement(element:XML):voidParses a folder element. A folder element contains the subgraph of a closed group node.
This method delegates to parseGraphElement().
Parameters
element:XML — The element to parse.
|
| parseGraphElement | () | method |
protected function parseGraphElement(graphElement:XML):voidParses a XML element representing a graph
Parameters
graphElement:XML — The element to parse.
|
| parseKeyElement | () | method |
public function parseKeyElement(keyElement:XML):voidParses a XML key element
Parameters
keyElement:XML — The element to parse.
|
| parseNodeElement | () | method |
protected function parseNodeElement(nodeElement:XML):voidParses a XML element representing a node.
Parameters
nodeElement:XML — The element to parse.
|
| parsePortElement | () | method |
protected function parsePortElement(portElement:XML):voidParses a port element.
Parameters
portElement:XML — The element to parse.
|
| processAfterParsing | () | method |
protected function processAfterParsing(context:GraphMLParseContext):void
Called at the end of parse(). Can be overridden to apply some context-dependent
modification after the graph was completely parsed.
This implementation applies some hierarchy-related modifications (if necessary) after a Java compatible GraphML has been parsed.
Parameters
context:GraphMLParseContext — The current GraphMLParseContext
|
| registerDefaultDeserializer | () | method |
public function registerDefaultDeserializer(deserializer:IDeserializer):voidRegister a default deserializer for XML content.
A default deserializer will only be used if no more specific deserializer for a given XML fragment exists.
Parameters
deserializer:IDeserializer — A deserializer instance that is to be used for graphml reading
|
| registerDeserializer | () | method |
public function registerDeserializer(deserializer:IDeserializer):voidRegister a deserializer.
Parameters
deserializer:IDeserializer — A deserializer instance that is to be used for graphml reading
|
| removeXmlAttributesParser | () | method |
public function removeXmlAttributesParser(attributesParser:IXmlAttributesParser):voidRemoves a parser for xml attributes.
Parameters
attributesParser:IXmlAttributesParser — The parser to remove.
|
| setContextProperty | () | method |
public function setContextProperty(name:String, value:Object):void
Set a context property which is considered when creating a GraphMLParseContext.
Parameters
name:String — The name of the property
| |
value:Object — the property
|
| setGraphItemFactory | () | method |
public function setGraphItemFactory(factory:IGraphItemFactory):voidSets the factory for graph element creation.
Parameters
factory:IGraphItemFactory |
See also
| sourceNodeCreated | () | method |
protected function sourceNodeCreated(id:Object, node:Object, edge:Object):void
Called when parseEdgeElement created an edge with a (yet)
unparsed source node.
Parameters
id:Object — The id of the newly created node.
| |
node:Object — The newly created node.
| |
edge:Object — The newly created edge.
|
| targetNodeCreated | () | method |
protected function targetNodeCreated(id:Object, node:Object, edge:Object):void
Called when parseEdgeElement created an edge with a (yet)
unparsed target node.
Parameters
id:Object — The id of the newly created node.
| |
node:Object — The newly created node.
| |
edge:Object — The newly created edge.
|