Class 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

Hierarchy (view full)

Methods

  • Adds a sub-graph to this vertex. If you provide an existing Graph instance that does not have an id, one will be assigned.

    Parameters

    • g: string | Graph

      Either a Graph instance, or the id you wish to assign to a new Graph.

    Returns Graph

    The Graph that was added.

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

    Parameters

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }
      • filter: ((e: Edge) => boolean)
          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

  • Sets some attribute on the object.

    Parameters

    • key: string

    Returns string

  • 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

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }
      • filter: ((e: Edge) => boolean)

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

          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

    List of matching edges.

    #getAllEdges.

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

    Returns string

  • Retrieves a sub-graph by id. *

    Parameters

    • id: string

    Returns Graph

    Sub-graph with the given id, null if not found.

  • Returns the indegree centrality of this vertex.

    Returns number

  • 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

  • Returns a string representation of the Vertex. *

    Returns string

    Vertex dumped to a string.

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

    Parameters

    Returns boolean

  • Gets some attribute from the object.

    Parameters

    • key: string
    • value: string

    Returns void

Properties

Underlying data for the object.

id: string

The vertex's id. A string.

transient?: boolean

Transient vertices are created at various points in the lifecycle of a renderer, such as dragging new edges, and are not exported in the dataset

type: string

Type of the object

Version :