Interface DataSpec<SELF>

A description of some data. Could be simply a reference, e.g. URI or a query or some other form of a specification what the data is. In this context, data is its own description.

The main inspiration for this concept (which probably needs a better name) is the fact that data may not be available locally. We want to have an interface, something that represents some data, but without necessarily having it ready for use yet. A resource in RDF, described via triples where it appears as subject, is the main, basic example of this - having the IRI is in a sense a specification of what data we want to use (all triples with subject that IRI).

The DataSpec interface is a base interface for the different user-facing types e.g. Subject

The SELF type parameter is a simulated self type i.e. the user facing types should set this parameter to that specific type so that the DataSpec methods will return the user-facing type

Type Parameters

Hierarchy

Properties

Methods

Properties

ready: boolean

Whether this dataspec is ready to use

Methods

  • Commit changes performed to this DataSpec object to its source of truth

    Returns Promise<void>

  • Construct a working copy of this dataspec.

    Changes to a working copy will not be automatically applied to its backing object. In order to propagate the changes, the user needs to explicitly call WorkingCopy.commit()

    When changes are applied to this object, they are automatically propagated to its working copies

    Parameters

    • Optional reactivityDecoratorFunction: (<T>(T: any) => T)

      optional function which will apply reactivity to the working copy. The function is expected to take the working copy, wrap it in a reactive proxy and return the wrapper. If specified, it will be invoked with the created working copy and the resulting object will be stored as a working copy. Alternatively the graph itself could allow for setting of a reactivity decorator with the same function

        • <T>(T: any): T
        • Type Parameters

          Parameters

          • T: any

          Returns T

    Returns SELF

Generated using TypeDoc