Skip to main content

Interface: DataProvider

Defined in: data/dataProvider.ts:12

Asynchronously provides data for the elements, links and other graph entities.

Properties

PropertyModifierTypeDescription

factory

readonly

DataFactory

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

Methods

connectedLinkStats()

connectedLinkStats(params): Promise<DataProviderLinkCount[]>

Defined in: data/dataProvider.ts:123

Gets connected link types of an element for exploration.

Parameters

ParameterTypeDescription

params

{ elementId: ElementIri; inexactCount?: boolean; signal?: AbortSignal; }

params.elementId

ElementIri

Target element to count linked elements from/to.

params.inexactCount?

boolean

Whether to allow to return inexact count of elements connected by an each link type when result is non-zero.

Default

false

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<DataProviderLinkCount[]>


elements()

elements(params): Promise<Map<ElementIri, ElementModel>>

Defined in: data/dataProvider.ts:84

Gets the data for the specified elements.

Parameters

ParameterTypeDescription

params

{ elementIds: readonly ElementIri[]; signal?: AbortSignal; }

params.elementIds

readonly ElementIri[]

Target elements to query data for.

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<Map<ElementIri, ElementModel>>


elementTypes()

elementTypes(params): Promise<Map<ElementTypeIri, ElementTypeModel>>

Defined in: data/dataProvider.ts:42

Gets the data for the specified element types.

Parameters

ParameterTypeDescription

params

{ classIds: readonly ElementTypeIri[]; signal?: AbortSignal; }

params.classIds

readonly ElementTypeIri[]

Target element types to query data for.

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<Map<ElementTypeIri, ElementTypeModel>>


knownElementTypes()

knownElementTypes(params): Promise<ElementTypeGraph>

Defined in: data/dataProvider.ts:22

Gets the structure and data for all known element types.

Parameters

ParameterTypeDescription

params

{ signal?: AbortSignal; }

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<ElementTypeGraph>


knownLinkTypes()

knownLinkTypes(params): Promise<LinkTypeModel[]>

Defined in: data/dataProvider.ts:32

Gets the data and statistics for all known link types.

Parameters

ParameterTypeDescription

params

{ signal?: AbortSignal; }

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<LinkTypeModel[]>


links(params): Promise<LinkModel[]>

Defined in: data/dataProvider.ts:101

Get all links between two specified sets of entities (bipartite graph links).

To get all links between all entities in the set, it is possible to pass the same set to both primary and secondary sets of elements.

Parameters

ParameterTypeDescription

params

{ linkTypeIds?: readonly LinkTypeIri[]; primary: readonly ElementIri[]; secondary: readonly ElementIri[]; signal?: AbortSignal; }

params.linkTypeIds?

readonly LinkTypeIri[]

Return only links with specified types.

params.primary

readonly ElementIri[]

First set of entities to get links between them and secondary elements.

params.secondary

readonly ElementIri[]

Second set of entities to get links between them and primary elements.

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<LinkModel[]>


linkTypes()

linkTypes(params): Promise<Map<LinkTypeIri, LinkTypeModel>>

Defined in: data/dataProvider.ts:70

Gets the data for the specified link types.

Parameters

ParameterTypeDescription

params

{ linkTypeIds: readonly LinkTypeIri[]; signal?: AbortSignal; }

params.linkTypeIds

readonly LinkTypeIri[]

Target link types to query data for.

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<Map<LinkTypeIri, LinkTypeModel>>


lookup()

lookup(params): Promise<DataProviderLookupItem[]>

Defined in: data/dataProvider.ts:149

Looks up elements with different filters:

  • by an element type via elementTypeId;
  • by a connected element via refElementId, refElementLinkId and linkDirection;
  • by a text lookup via text;

Filters can be combined to produce an intersection of the results.

Parameters

ParameterType

params

DataProviderLookupParams

Returns

Promise<DataProviderLookupItem[]>


propertyTypes()

propertyTypes(params): Promise<Map<PropertyTypeIri, PropertyTypeModel>>

Defined in: data/dataProvider.ts:56

Gets the data for the specified property types.

Parameters

ParameterTypeDescription

params

{ propertyIds: readonly PropertyTypeIri[]; signal?: AbortSignal; }

params.propertyIds

readonly PropertyTypeIri[]

Target property types to query data for.

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<Map<PropertyTypeIri, PropertyTypeModel>>