Package | com.yworks.io.graphml.reader |
Class | public class DefaultGraphElementFactory |
Inheritance | DefaultGraphElementFactory Object |
Implements | IGraphItemFactory |
IGraphItemFactory
interface.
Property | Defined By | ||
---|---|---|---|
clearGraphBeforeRead : Boolean
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. | DefaultGraphElementFactory |
Property | Defined By | ||
---|---|---|---|
_createdGraph : IGraph
Graph instance to work on. | DefaultGraphElementFactory |
Method | Defined By | ||
---|---|---|---|
DefaultGraphElementFactory(graph:IGraph)
Creates an element factory for the given graph instance. | DefaultGraphElementFactory | ||
createBend(context:GraphMLParseContext, edge:Object, index:int):Object
Returns a user object which represents a bend. | DefaultGraphElementFactory | ||
createEdge(context:GraphMLParseContext, id:String, source:Object, target:Object, sourcePort:Object, targetPort:Object, directed:Boolean):Object
Returns a user object representing an edge. | DefaultGraphElementFactory | ||
createGraph(context:GraphMLParseContext, id:String, edgeDefault:String):Object
Returns a user object which represents a graph. | DefaultGraphElementFactory | ||
createGraphML(context:GraphMLParseContext):Object
Returns null. | DefaultGraphElementFactory | ||
createLabel(context:GraphMLParseContext, labeledItem:Object):Object
Returns a user object which represents a label. | DefaultGraphElementFactory | ||
createNode(context:GraphMLParseContext, id:String):Object
Returns a user object which represents a node. | DefaultGraphElementFactory | ||
createPort(context:GraphMLParseContext, name:String, owner:Object):Object
Returns a user object which represents a port. | DefaultGraphElementFactory |
Method | Defined By | ||
---|---|---|---|
Gets the IGraph from the context. | DefaultGraphElementFactory |
_createdGraph | property |
protected var _createdGraph:IGraph
Graph instance to work on.
clearGraphBeforeRead | property |
clearGraphBeforeRead:Boolean
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.
public function get clearGraphBeforeRead():Boolean
public function set clearGraphBeforeRead(value:Boolean):void
DefaultGraphElementFactory | () | Constructor |
public function DefaultGraphElementFactory(graph:IGraph)
Creates an element factory for the given graph instance.
Parametersgraph:IGraph — The graph instance to work on. Creates a new instance if none is provided.
|
createBend | () | method |
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 |
Object — a newly created bend.
|
createEdge | () | method |
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.
|
Object — a user object representing an edge.
|
createGraph | () | method |
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.
|
Object — a user object representing a graph.
|
createGraphML | () | method |
public function createGraphML(context:GraphMLParseContext):Object
Returns null
.
Parameters
context:GraphMLParseContext |
Object |
createLabel | () | method |
public function createLabel(context:GraphMLParseContext, labeledItem:Object):Object
Returns a user object which represents a label.
Parameters
context:GraphMLParseContext — the current parse context.
| |
labeledItem:Object — the label owner
|
Object — a user object representing a label.
|
createNode | () | method |
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.
|
Object — a user object representing a node.
|
createPort | () | method |
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
|
Object — a user object representing a port.
|
getLastContainer | () | method |
protected function getLastContainer(context:GraphMLParseContext):IGraph
Gets the IGraph
from the context.
Parameters
context:GraphMLParseContext — the current GraphMLParseContext
|
IGraph — the IGraph from the context.
|