Skip to main content

Port

A Port models a logical connection point on some vertex. Examples are things like columns on a database table, or yes/no outputs in a flowchart question, or, from the real world, TCP ports on a server

Extends

Methods

getAllEdges()

getAllEdges(filter?): Edge[]

gets all the edges connected to this port, as source or target.

Parameters

filter?

(e) => boolean

Returns

Edge[]

Overrides

Vertex.getAllEdges


getEdges()

getEdges(params?): Edge[]

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,

Parameters

params?
filter

(e) => boolean

Optional function to test whether a given edge should be included.

Returns

Edge[]

List of matching edges.

See

#getAllEdges.

Inherited from

Vertex.getEdges


getFullId()

getFullId(): string

Overrides the getFullId of Node to return a value in dotted notation of the form nodeId.portId.

Returns

string

Overrides

Vertex.getFullId


getIndegreeCentrality()

getIndegreeCentrality(): number

Returns the indegree centrality of this vertex.

Returns

number

Inherited from

Vertex.getIndegreeCentrality


getOutdegreeCentrality()

getOutdegreeCentrality(): number

Returns the outdegree centrality of this vertex.

Returns

number

Inherited from

Vertex.getOutdegreeCentrality


getParent()

getParent(): Node

Gets the vertex this Port belongs to. Remember that Group extends Node, so this could be a Group, but Ports cannot have child Ports.

Returns

Node


getSourceEdges()

getSourceEdges(): Edge[]

Gets all Edges where this Vertex is the source.

Returns

Edge[]

Inherited from

Vertex.getSourceEdges


getTargetEdges()

getTargetEdges(): Edge[]

Gets all Edges where this Vertex is the target.

Returns

Edge[]

Inherited from

Vertex.getTargetEdges


inspect()

inspect(): string

Returns a string representation of the Vertex. *

Returns

string

Vertex dumped to a string.

Inherited from

Vertex.inspect


isChildOf()

isChildOf(v): boolean

Returns whether or not this port is a child of the given object.

Parameters

v

Object to test if this is a child.

Edge | Vertex | Graph

Returns

boolean

Overrides

Vertex.isChildOf

Properties

id

id: string

The vertex's id. Must be a string.

Inherited from

Vertex.id


type

type: string

Object's type.

Inherited from

Vertex.type