Skip to main content

Interface: SparqlDataProviderOptions

Defined in: data/sparql/sparqlDataProvider.ts:50

Options for SparqlDataProvider.

See

SparqlDataProvider

Properties

PropertyTypeDescription

chunk?

null | SparqlProviderChunkOptions

Chunk size to split each SPARQL request with multiple input IRIs into.

To disable batch splitting pass null.

Default is {maxSize: 2500, unit: 'totalLength'} when queryMethod is GET, otherwise null.

endpointUrl

string

SPARQL endpoint URL to send queries to.

factory?

DataFactory

RDF/JS-compatible term factory to create RDF terms.

imagePropertyUris?

readonly string[]

Element property type IRIs to use to get image URLs for elements.

If needed, image URL extraction can be customized via prepareImages.

prepareImagePredicate?

PropertyTypeIri

Property IRI to store prepared image URL for an entity.

Default

"http://schema.org/thumbnailUrl"

prepareImages?

(elementInfo, signal) => Promise<Map<ElementIri, string>>

Allows to extract/fetch image URLs externally instead of using imagePropertyUris option.

prepareLabelPredicate?

PropertyTypeIri

Property IRI to store prepared labels for an entity.

Default

"http://www.w3.org/2000/01/rdf-schema#label"

prepareLabels?

(resources, signal) => Promise<Map<string, Literal[]>>

Allows to extract/fetch labels separately from SPARQL query as an alternative or in addition to label output binding.

queryFunction?

SparqlQueryFunction

Custom function to send SPARQL requests.

By default, a global fetch() is used with the following options:

{
...params,
credentials: 'same-origin',
mode: 'cors',
cache: 'default',
}

queryMethod?

"GET" | "POST"

Query method for SPARQL queries to use:

  • GET - more compatible, may have issues with large request URLs;
  • POST - less compatible, better on large data sets.

Default

"GET"