This is the interface for a factory that is used for creating the constituents of an IGraph that are encountered during the parsing of GraphML
Inheritance Hierarchy
IGraphElementFactory
Type Details
- yFiles module
- view
Methods
Adds a new port to the given IPortOwner.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IParseContext
- The context from which the graph, the CreationProperties, and the objectStack can be queried.
- owner - IPortOwner
- The owner of the port.
Returns
- ↪IPort
- A newly created port.
createEdge
(context: IParseContext, sourceNode: INode, sourcePort: IPort, targetNode: INode, targetPort: IPort) : IEdgeCreates an edge for the given context and the provided source and target nodes or ports.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IParseContext
- The context from which the graph, the CreationProperties, and the objectStack can be queried.
- sourceNode - INode
- The source node for the edge.
- sourcePort - IPort
- The source port for the edge, if specified, otherwise
null
. - targetNode - INode
- The target node for the edge.
- targetPort - IPort
- The target port for the edge, if specified, otherwise
null
.
Returns
- ↪IEdge
- A newly created edge.
Creates a node for the given context.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IParseContext
- The context from which the graph, the CreationProperties, and the objectStack can be queried.
Returns
- ↪INode
- A newly created node
Static Methods
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- createNode - function(IParseContext):INode
Creates a node for the given context.
This property holds the implementation for createNode.
- createEdge - function(IParseContext, INode, IPort, INode, IPort):IEdge
Creates an edge for the given context and the provided source and target nodes or ports.
This property holds the implementation for createEdge.
- addPort - function(IParseContext, IPortOwner):IPort
Adds a new port to the given IPortOwner.
This property holds the implementation for addPort.