Interface: DataGraphStructure
Provides entity graph content: elements and connected links, as well as element, link and property types.
Extends
Accessors
elements
get
elements(): readonlyElement
[]
All elements (nodes) in the graph.
Returns
readonly Element
[]
Inherited from
Defined in
factory
get
factory():DataFactory
Provides an RDF term factory to create RDF terms for identifiers and property values.
Returns
Inherited from
Defined in
links
get
links(): readonlyLink
[]
All links (edges) between elements in the graph.
Returns
readonly Link
[]
Inherited from
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
Inherited from
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
Inherited from
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
[]
Inherited from
GraphStructure
.getElementLinks
Defined in
getElementType()
getElementType(
elementTypeIri
):undefined
|ElementType
Gets an element type by its ElementType.id in the graph if exists.
Element types are added to the graph as requested by DataDiagramModel.createElementType so the data (e.g. labels) can be fetched from a data provider.
Parameters
Parameter | Type |
---|---|
|
Returns
undefined
| ElementType
See
DataDiagramModel.createElementType
Defined in
editor/dataDiagramModel.ts:115
getLink()
getLink(
linkId
):undefined
|Link
Gets a link by its Link.id in the graph if exists.
Parameters
Parameter | Type |
---|---|
|
|
Returns
undefined
| Link
Inherited from
Defined in
getLinkType()
getLinkType(
linkTypeIri
):undefined
|LinkType
Gets an link type by its LinkType.id in the graph if exists.
Link types are added to the graph as requested by DataDiagramModel.createLinkType so the data (e.g. labels) can be fetched from a data provider.
Parameters
Parameter | Type |
---|---|
|
Returns
undefined
| LinkType
See
DataDiagramModel.createLinkType
Defined in
editor/dataDiagramModel.ts:124
getLinkVisibility()
getLinkVisibility(
linkTypeId
):LinkTypeVisibility
Gets current visibility mode for the specified link type.
Parameters
Parameter | Type |
---|---|
|
Returns
Inherited from
GraphStructure
.getLinkVisibility
Defined in
getPropertyType()
getPropertyType(
propertyTypeIri
):undefined
|PropertyType
Gets an property type by its PropertyType.id in the graph if exists.
Property types are added to the graph as requested by DataDiagramModel.createPropertyType so the data (e.g. labels) can be fetched from a data provider.
Parameters
Parameter | Type |
---|---|
|
Returns
undefined
| PropertyType
See
DataDiagramModel.createPropertyType
Defined in
editor/dataDiagramModel.ts:134
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
Inherited from
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