Skip to main content

Interface: DataProvider

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

Gets connected link types of an element for exploration.

Parameters

ParameterTypeDescription

params

object

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

Defined in

data/provider.ts:123


elementTypes()

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

Gets the data for the specified element types.

Parameters

ParameterTypeDescription

params

object

params.classIds

readonly ElementTypeIri[]

Target element types to query data for.

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<Map<ElementTypeIri, ElementTypeModel>>

Defined in

data/provider.ts:42


elements()

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

Gets the data for the specified elements.

Parameters

ParameterTypeDescription

params

object

params.elementIds

readonly ElementIri[]

Target elements to query data for.

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<Map<ElementIri, ElementModel>>

Defined in

data/provider.ts:84


knownElementTypes()

knownElementTypes(params): Promise<ElementTypeGraph>

Gets the structure and data for all known element types.

Parameters

ParameterTypeDescription

params

object

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<ElementTypeGraph>

Defined in

data/provider.ts:22


knownLinkTypes()

knownLinkTypes(params): Promise<LinkTypeModel[]>

Gets the data and statistics for all known link types.

Parameters

ParameterTypeDescription

params

object

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<LinkTypeModel[]>

Defined in

data/provider.ts:32


linkTypes()

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

Gets the data for the specified link types.

Parameters

ParameterTypeDescription

params

object

params.linkTypeIds

readonly LinkTypeIri[]

Target link types to query data for.

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<Map<LinkTypeIri, LinkTypeModel>>

Defined in

data/provider.ts:70


links(params): Promise<LinkModel[]>

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

object

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

Defined in

data/provider.ts:101


lookup()

lookup(params): Promise<DataProviderLookupItem[]>

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

Defined in

data/provider.ts:149


propertyTypes()

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

Gets the data for the specified property types.

Parameters

ParameterTypeDescription

params

object

params.propertyIds

readonly PropertyTypeIri[]

Target property types to query data for.

params.signal?

AbortSignal

Cancellation signal.

Returns

Promise<Map<PropertyTypeIri, PropertyTypeModel>>

Defined in

data/provider.ts:56