Skip to main content

Interface: GraphStructure

Provides graph content: elements and connected links.

Extended by

Accessors

elements

get elements(): readonly Element[]

All elements (nodes) in the graph.

Returns

readonly Element[]

Defined in

diagram/model.ts:69


factory

get factory(): DataFactory

Provides an RDF term factory to create RDF terms for identifiers and property values.

Returns

DataFactory

Defined in

diagram/model.ts:65


get links(): readonly Link[]

All links (edges) between elements in the graph.

Returns

readonly Link[]

Defined in

diagram/model.ts:73

Methods

findLink(linkTypeId, sourceId, targetId): undefined | Link

Searches for any link of the specified type between elements with specified IDs in the graph if exists.

If multiple links is found, any of them could be returned.

Parameters

ParameterType

linkTypeId

LinkTypeIri

sourceId

string

targetId

string

Returns

undefined | Link

Defined in

diagram/model.ts:94


getElement()

getElement(elementId): undefined | Element

Gets an element by its Element.id in the graph if exists.

Parameters

ParameterType

elementId

string

Returns

undefined | Element

Defined in

diagram/model.ts:77


getElementLinks(element): readonly Link[]

Gets all links connected to the specified element in the graph.

If element is not in the graph, no links would be returned.

Parameters

ParameterType

element

Element

Returns

readonly Link[]

Defined in

diagram/model.ts:83


getLink(linkId): undefined | Link

Gets a link by its Link.id in the graph if exists.

Parameters

ParameterType

linkId

string

Returns

undefined | Link

Defined in

diagram/model.ts:87


getLinkVisibility()

getLinkVisibility(linkTypeId): LinkTypeVisibility

Gets current visibility mode for the specified link type.

Parameters

ParameterType

linkTypeId

LinkTypeIri

Returns

LinkTypeVisibility

Defined in

diagram/model.ts:110


sourceOf()

sourceOf(link): undefined | Element

Gets a source element for the specified link in the graph.

If link is not in the graph, undefined would be returned instead.

Parameters

ParameterType

link

Link

Returns

undefined | Element

Defined in

diagram/model.ts:100


targetOf()

targetOf(link): undefined | Element

Gets a target element for the specified link in the graph.

If link is not in the graph, undefined would be returned instead.

Parameters

ParameterType

link

Link

Returns

undefined | Element

Defined in

diagram/model.ts:106