Skip to main content

Nodes

Model object​

Node

extended by: Group
A Node is a Vertex that does not contain other nodes/groups.

Class Members​

NameTypeDescription
groupGroupGroup the node is a member of, if any. This property should never be written by your code.
idstringThe vertex's id. Must be a string.
typestringObject's type.

Class Methods​

getAllEdges​

Gets all of the edges connected to this node, both on the node itself and on all of its ports.
Signature
getAllEdges(filter:(e:Edge) => boolean)
Parameters
filter(e:Edge) => booleanOptional Edge filter.
Return value
Array<Edge>

getAllSourceEdges​

Gets all of the Edges connected to this Node, both on the Node itself and on all of its Ports, where this node/port is the source of edge
Signature
getAllSourceEdges()
Return value
Array<Edge>

getAllTargetEdges​

Gets all of the Edges connected to this Node, both on the Node itself and on all of its Ports, where this node/port is the target of edge
Signature
getAllTargetEdges()
Return value
Array<Edge>

getDirectEdges​

Gets all Edges directly connected to this Vertex, ie. not to one of the Ports on the Vertex. This is an alias for getEdges.
Signature
getDirectEdges(filter:(e:Edge) => boolean)
Parameters
filter(e:Edge) => booleanOptional Edge filter.
Return value
Array<Edge>

getDirectSourceEdges​

Gets all Edges directly connected to this Vertex, ie. not to one of the Ports on the Vertex, where this Vertex is the source.
This is an alias for
getSourceEdges.
Signature
getDirectSourceEdges()
Return value
Array<Edge>

getDirectTargetEdges​

Gets all Edges directly connected to this Vertex, ie. not to one of the Ports on the Vertex, where this Vertex is the target.
This is an alias for
getTargetEdges.
Signature
getDirectTargetEdges()
Return value
Array<Edge>

getEdges​

Gets all edges where this vertex is either the source or the target of the edge.
Note that this does not retrieve edges on any ports associated with this Vertex - for that,
Signature
getEdges(params:{
  filter:(e:Edge) => boolean
}
)
Parameters
params{
  filter:(e:Edge) => boolean
}
Return value
Array<Edge>

getFullId​

Gets the Vertex's id, which, for Nodes and Groups, is just the id property. This method is overridden by Ports.
Signature
getFullId()
Return value
string

getIndegreeCentrality​

Gets this Node's "indegree" centrality; a measure of how many other Nodes are connected to this Node as the target of some Edge.
Signature
getIndegreeCentrality()
Return value
number

getOutdegreeCentrality​

Gets this Node's "outdegree" centrality; a measure of how many other Nodes this Node is connected to as the source of some Edge.
Signature
getOutdegreeCentrality()
Return value
number

getPort​

Gets the Port with the given id, null if nothing found.
Signature
getPort(portId:string)
Parameters
portIdstringPort id.
Return value
Port

getPortEdges​

Gets all Edges that are connected to Ports on this Node, not directly to the Node itself.
Signature
getPortEdges(filter:(e:Edge) => boolean)
Parameters
filter(e:Edge) => booleanOptional edge filter
Return value
Array<Edge>

getPorts​

Gets all Ports associated with this Node.
Signature
getPorts()
Return value
Array<Port>

getPortSourceEdges​

Gets all Edges that are connected to Ports on this Node, not directly to the Node itself, where the Port on this Node is the source of the edge.
Signature
getPortSourceEdges()
Return value
Array<Edge>

getPortTargetEdges​

Gets all Edges that are connected to Ports on this Node, not directly to the Node itself, where the Port on this Node is the target of the edge.
Signature
getPortTargetEdges()
Return value
Array<Edge>

getSourceEdges​

Gets all Edges where this Vertex is the source.
Signature
getSourceEdges()
Return value
Array<Edge>

getTargetEdges​

Gets all Edges where this Vertex is the target.
Signature
getTargetEdges()
Return value
Array<Edge>

inspect​

Returns a string representation of the Vertex.
*
Signature
inspect()
Return value
string

Data format​

On load and save, nodes are represented by a NodeData object with this definition:

Sorry - we could not find this document.

Adding Nodes​

TBD

Removing Nodes​

TBD