Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface GraphInterface

Interface describing basic graph operations

Hierarchy

  • GraphInterface

Implemented by

Index

Methods

addConnector

  • addConnector(id: Guid, type: string, nodeId: Guid, properties?: Dictionary<any>): void
  • Adds a Connector to the Graph

    Parameters

    • id: Guid

      Identifier of the Connector to add, this GUID should not already exist in the system

    • type: string

      String representing the type of the connector (i.e. "NETWORK_LAN" or "FAM_DATA_CONNECTOR")

    • nodeId: Guid

      Identifier of the Node that contains this Connector

    • Optional properties: Dictionary<any>

      Dictionary of properties of the Connector

    Returns void

addEdge

  • addEdge(id: Guid, type: string, modelId: Guid, startConnectorId: Guid, endConnectorId: Guid, properties?: Dictionary<any>): void
  • Adds an Edge to the Graph

    Parameters

    • id: Guid

      Identifier of the Edge to add, this GUID should not already exist in the system

    • type: string

      string String representing the type of the Edge (i.e. "FAM_DATA_FLOW" or "UML_INHERITS")

    • modelId: Guid

      Identifier of the model that contains this Edge

    • startConnectorId: Guid
    • endConnectorId: Guid

      Identifier of the connector to which this Edge will go

    • Optional properties: Dictionary<any>

      Dictionary of properties of the Edge

    Returns void

addModel

  • addModel(id: Guid, type: string, properties?: Dictionary<any>, parentId?: Guid): void
  • Adds a Model to the Graph

    Parameters

    • id: Guid

      Identifier of the Model to add, this GUID should not already exist in the system

    • type: string

      String representing the type of the connector (i.e. "MODEL_FAM" or "MODEL_UML")

    • Optional properties: Dictionary<any>

      Dictionary of properties of the Model

    • Optional parentId: Guid

      Identifier of the parent of this subgraph. Leave empty to create a model under the root

    Returns void

addNode

  • addNode(id: Guid, type: string, modelId: Guid, properties?: Dictionary<any>): void
  • Adds a Node to the Graph

    Parameters

    • id: Guid

      Identifier of the Node to add, this GUID should not already exist in the system

    • type: string

      String representing the type of the node (i.e. "FAM_NODE" or "UML_CLASS")

    • modelId: Guid

      Identifier of the model that contains this Node

    • Optional properties: Dictionary<any>

      Dictionary of properties of the Node

    Returns void

deleteConnector

  • deleteConnector(id: Guid): void
  • Deletes a Connector from the Graph

    Parameters

    • id: Guid

      Identifier of the Connector to delete

    Returns void

deleteEdge

  • deleteEdge(id: Guid): void
  • Deletes an Edge from the Graph

    Parameters

    • id: Guid

      Identifier of the Edge to delete

    Returns void

deleteModel

  • deleteModel(id: Guid): void
  • Deletes a Model from the Graph

    Parameters

    • id: Guid

      Identifier of the Model to delete

    Returns void

deleteNode

  • deleteNode(id: Guid): void
  • Deletes a Node from the Graph

    Parameters

    • id: Guid

      Identifier of the Node to delete

    Returns void

deleteProperty

  • deleteProperty(id: Guid, name: string): void
  • Deletes a Property from the Graph

    Parameters

    • id: Guid

      Identifier of the Element that contains the property

    • name: string

      of the property that should be deleted

    Returns void

deserialize

  • Creates a new GraphInterface from a JSON Graph

    For the expected format, please read the documentation The expected format is the same as the format returned by serialize()

    Parameters

    • jsonObject: Object

      JSON Object that should be converted to GraphInterface

    Returns GraphInterface

hasConnector

  • hasConnector(id: Guid): boolean
  • Returns whether a Connector with the ID exists

    Parameters

    • id: Guid

      Identifier to check

    Returns boolean

hasEdge

  • hasEdge(id: Guid): boolean
  • Returns whether an Edge with the ID exists

    Parameters

    • id: Guid

      Identifier to check

    Returns boolean

hasElement

  • hasElement(id: Guid): boolean
  • Returns whether an Element with the ID exists

    Parameters

    • id: Guid

      Identifier to check

    Returns boolean

hasModel

  • hasModel(id: Guid): boolean
  • Returns whether a Model with the ID exists

    Parameters

    • id: Guid

      Identifier to check

    Returns boolean

hasNode

  • hasNode(id: Guid): boolean
  • Returns whether a Node with the ID exists

    Parameters

    • id: Guid

      Identifier to check

    Returns boolean

serialize

  • serialize(): Object

setProperty

  • setProperty(nodeId: Guid, name: string, value: any): void
  • Sets a property on an Element

    Parameters

    • nodeId: Guid

      Identifier of the Element on which the property should be set

    • name: string

      Name of the property that will be set

    • value: any

      The value to set the property with

    Returns void

Generated using TypeDoc