Interface: GraphStructure
Provides graph content: elements and connected links.
Extended by
Accessors
elements
get
elements(): readonlyElement
[]
All elements (nodes) in the graph.
Returns
readonly Element
[]
Defined in
factory
get
factory():DataFactory
Provides an RDF term factory to create RDF terms for identifiers and property values.
Returns
Defined in
links
get
links(): readonlyLink
[]
All links (edges) between elements in the graph.
Returns
readonly Link
[]
Defined in
Methods
findLink()
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
Parameter | Type |
---|---|
| |
|
|
|
|
Returns
undefined
| Link
Defined in
getElement()
getElement(
elementId
):undefined
|Element
Gets an element by its Element.id in the graph if exists.
Parameters
Parameter | Type |
---|---|
|
|
Returns
undefined
| Element
Defined in
getElementLinks()
getElementLinks(
element
): readonlyLink
[]
Gets all links connected to the specified element in the graph.
If element is not in the graph, no links would be returned.
Parameters
Parameter | Type |
---|---|
|
Returns
readonly Link
[]
Defined in
getLink()
getLink(
linkId
):undefined
|Link
Gets a link by its Link.id in the graph if exists.
Parameters
Parameter | Type |
---|---|
|
|
Returns
undefined
| Link
Defined in
getLinkVisibility()
getLinkVisibility(
linkTypeId
):LinkTypeVisibility
Gets current visibility mode for the specified link type.
Parameters
Parameter | Type |
---|---|
|
Returns
Defined in
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
Parameter | Type |
---|---|
|
Returns
undefined
| Element
Defined in
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
Parameter | Type |
---|---|
|
Returns
undefined
| Element