Default implementation of the
IGraphItemFactory interface.
clearGraphBeforeRead:Boolean [read-write]
Whether to clear an existing graph instance before reading
If set to true, an exisisting graph instance will be cleared
before the graph is read into this instance, otherwise the loaded
raph will be merged into the existing one.
Implementation
public function get clearGraphBeforeRead():Boolean
public function set clearGraphBeforeRead(value:Boolean):void
protected var _createdGraph:IGraph
Graph instance to work on.
public function DefaultGraphElementFactory(graph:IGraph)
Creates an element factory for the given graph instance.
Parameters
| graph:IGraph — graph instance to work on. Creates a new instance if none is provided.
|
public function createBend(context:GraphMLParseContext, edge:Object, index:int):Object
Returns a user object which represents a bend.
Parameters
| context:GraphMLParseContext — The current parse context.
|
| |
| edge:Object — The edge to create the bend for.
|
| |
| index:int |
Returns
| Object — a newly created bend.
|
public function createEdge(context:GraphMLParseContext, id:String, source:Object, target:Object, sourcePort:Object, targetPort:Object, directed:Boolean):Object
Returns a user object representing an edge.
Parameters
| context:GraphMLParseContext — the current parse context.
|
| |
| id:String — the identifier of the edge as defined in the
input data. May be null if no
id has been specified.
|
| |
| source:Object — the user object representing the source node
of the edge.
|
| |
| target:Object — the user object representing the target node
of the edge.
|
| |
| sourcePort:Object — the user object representing the source port
of the edge.
|
| |
| targetPort:Object — the user object representing the target port
of the edge.
|
| |
| directed:Boolean — indicates whether the edge is directed or not.
|
Returns
| Object — a user object representing an edge.
|
public function createGraph(context:GraphMLParseContext, id:String, edgeDefault:String):Object
Returns a user object which represents a graph.
Parameters
| context:GraphMLParseContext — the current parse context.
|
| |
| id:String — the identifier of the graph as defined in the input data.
May be null if no id has been specified.
|
| |
| edgeDefault:String — indicates whether edges are directed per default.
|
Returns
| Object — a user object representing a graph.
|
public function createGraphML(context:GraphMLParseContext):Object
Returns null.
Parameters
Returns
public function createLabel(context:GraphMLParseContext, labeledItem:Object):Object
Returns a user object which represents a label.
Parameters
Returns
| Object — a user object representing a label.
|
public function createNode(context:GraphMLParseContext, id:String):Object
Returns a user object which represents a node.
Parameters
| context:GraphMLParseContext |
| |
| id:String — the identifier of the node as defined in the
input data.
|
Returns
| Object — a user object representing a node.
|
public function createPort(context:GraphMLParseContext, name:String, owner:Object):Object
Returns a user object which represents a port.
Parameters
| context:GraphMLParseContext — the current parse context.
|
| |
| name:String — the identifier of the port as defined in the
input data.
|
| |
| owner:Object — the port owner
|
Returns
| Object — a user object representing a port.
|
protected function getLastContainer(context:GraphMLParseContext):IGraph
Gets the IGraph from the context.
Parameters
Returns
| IGraph —
the IGraph from the context.
|