Skip to main content

Interface: GraphStructure

Defined in: diagram/model.ts:60

Provides graph content: elements and connected links.

Extended by

Accessors

elements

Get Signature

get elements(): readonly Element[]

Defined in: diagram/model.ts:69

All elements (nodes) in the graph.

Returns

readonly Element[]


factory

Get Signature

get factory(): DataFactory

Defined in: diagram/model.ts:65

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

Returns

DataFactory


Get Signature

get links(): readonly Link[]

Defined in: diagram/model.ts:73

All links (edges) between elements in the graph.

Returns

readonly Link[]

Methods

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

Defined in: diagram/model.ts:94

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


getElement()

getElement(elementId): undefined | Element

Defined in: diagram/model.ts:77

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

Parameters

ParameterType

elementId

string

Returns

undefined | Element


getElementLinks(element): readonly Link[]

Defined in: diagram/model.ts:83

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[]


getLink(linkId): undefined | Link

Defined in: diagram/model.ts:87

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

Parameters

ParameterType

linkId

string

Returns

undefined | Link


getLinkVisibility()

getLinkVisibility(linkTypeId): LinkTypeVisibility

Defined in: diagram/model.ts:110

Gets current visibility mode for the specified link type.

Parameters

ParameterType

linkTypeId

LinkTypeIri

Returns

LinkTypeVisibility


sourceOf()

sourceOf(link): undefined | Element

Defined in: diagram/model.ts:100

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


targetOf()

targetOf(link): undefined | Element

Defined in: diagram/model.ts:106

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