Interface TripleStore

Interacting with a remote RDF endpoint is accomplished through this interface. This is typically a triplestore, but does not have to be. A custom REST interface could be serving RDF data and answering queries through some non-standard (non-SPARQL) interface.

The interface for fetching triples based on the subject as well as modifying the graph through quad change objects is well-defined and the same for different implementation. On the other hand, querying is open ended and depends entirely on the endpoint and therefore it is left to be specified, including at the interface level, to implementations.

Hierarchy

  • TripleStore

Implemented by

Methods

Methods

  • Retrieve all triples asserted for a given list of subjects. The subjects can be regular NamedNode or a quad (triple in a named graph).

    Returns

    a dataset which contains all the quads with the passed in subjects.

    Parameters

    • Rest ...subjects: (NamedNode<string> | Quad)[]

      The list of subjects of interest.

    Returns Promise<Dataset<Quad, Quad>>

  • Apply a set of changes to the remote data store.

    Returns

    An object with the ok boolean property indicating if the change was successful or not and an error property containing the error in case of failure.

    Parameters

    • changes: QuadChange[]

      The changes will result in a SPARQL query where they are applied in the passed in order.

    Returns Promise<{
        error?: string;
        ok: boolean;
    }>

Generated using TypeDoc