Class LocalGraph

A graph implementation which is a local cache of a remote graph

Hierarchy

  • LocalGraph

Implements

Constructors

Properties

_reactivityDecorator: (<T>(T: any) => T) = ...

Type declaration

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

      Parameters

      • T: any

      Returns T

cache: {
    subjects: Map<SubjectId, SubjectImpl>;
} = ...

Type declaration

client: TripleStore

Reference to the FDR environment which created this graph.

id: string
label: string
factory_impl: typeof __class = ...

Accessors

  • set reactivityDecorator(decorator: (<T>(T: any) => T)): void
  • Set the reactivity decorators for all working copies created from subjects in this graph.

    The reactivity decorator is called by the Subject.workingCopy() constructor function. It should wrap the working copy in whatever reactivity proxy is needed and return the proxy so that the wrapped working copy can be used whenever changes to the copy have to be propagated. That way the reactive layer will be notified correctly.

    This property can be overriden in every invocation of Subject.workingCopy()

    Parameters

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

          Parameters

          • T: any

          Returns T

    Returns void

  • get reactivityDecrator(): (<T>(T: any) => T)
  • Returns (<T>(T: any) => T)

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

        Parameters

        • T: any

        Returns T

Methods

  • Accept quad changes pushed from a remote source (e.g. BE triplestore)

    Parameters

    Returns void

  • Declare that the DataSpec is no longer in use

    Parameters

    • desc: DataSpec<any>

      the DataSpec to be disposed of

    Returns void

  • Called by the subjects in this graph when their properties change. A change is defined as a call to the Subject.apply() method. This callback should modify any internal Graph state so that its state is consistent with the changes made to the Subject

    Parameters

    • subject: Subject
    • modifiedKeys: string[]

    Returns void

  • Intending to use the specified data, make sure it is available.

    Note that this function is expected to be async

    Returns

    A promise which resolves with the parameter DataSpec object which is filled with the necessary data and is ready to use.

    Type Parameters

    Parameters

    • desc: T

      The description of the data to materialize. Must be a supported DataSpec implementation.

    Returns Promise<T>

Generated using TypeDoc