@openhps/rdf
    Preparing search index...

    Class Store<Q_RDF, Q_N3, OutQuad, InQuad>

    Type Parameters

    • Q_RDF extends RDF.BaseQuad = RDF.Quad
    • Q_N3 extends BaseQuad = Quad
    • OutQuad extends RDF.BaseQuad = RDF.Quad
    • InQuad extends RDF.BaseQuad = RDF.Quad

    Implements

    Index

    Constructors

    • Type Parameters

      • Q_RDF extends BaseQuad = Quad
      • Q_N3 extends BaseQuad = Quad
      • OutQuad extends BaseQuad = Quad
      • InQuad extends BaseQuad = Quad

      Parameters

      Returns Store<Q_RDF, Q_N3, OutQuad, InQuad>

    Properties

    size: number

    A non-negative integer that specifies the number of quads in the set.

    Methods

    • Returns Iterator<OutQuad>

    • Adds the specified quad to the dataset.

      Existing quads, as defined in Quad.equals, will be ignored.

      Parameters

      Returns this

    • Imports the quads into this dataset.

      This method differs from Dataset.union in that it adds all quads to the current instance, rather than combining quads and the current instance to create a new instance.

      Parameters

      Returns this

    • Parameters

      • subject: Q_RDF["subject"]
      • predicate: Q_RDF["predicate"]
      • object: Q_RDF["object"]
      • Optionalgraph: Q_RDF["graph"]
      • Optionaldone: () => void

      Returns boolean

    • Parameters

      Returns boolean

    • Parameters

      Returns void

    • Returns true if the current instance is a superset of the given dataset; differently put: if the given dataset is a subset of, is contained in the current dataset.

      Blank Nodes will be normalized.

      Parameters

      Returns boolean

    • Parameters

      • subject: OTerm
      • predicate: OTerm
      • object: OTerm
      • graph: OTerm

      Returns number

    • Parameters

      • OptionalsuggestedName: string

      Returns BlankNode

    • Removes the specified quad from the dataset.

      Parameters

      Returns this

    • Deletes the given named graph.

      The end and error events are used like described in the Stream interface.

      Parameters

      • graph: string | Q_RDF["graph"]

        The graph term or string to match.

      Returns EventEmitter

      The resulting event emitter.

      Stream

    • This method removes the quads in the current instance that match the given arguments.

      The logic described in Matching is applied for each quad in this dataset to select the quads which will be deleted.

      Parameters

      • Optionalsubject: Term

        The optional exact subject to match.

      • Optionalpredicate: Term

        The optional exact predicate to match.

      • Optionalobject: Term

        The optional exact object to match.

      • Optionalgraph: Term

        The optional exact graph to match.

      Returns this

    • Returns a new dataset that contains all quads from the current dataset, not included in the given dataset.

      Parameters

      Returns Dataset<OutQuad, InQuad>

    • Returns true if the current instance contains the same graph structure as the given dataset.

      Blank Nodes will be normalized.

      Parameters

      Returns boolean

    • Universal quantification method, tests whether every quad in the dataset passes the test implemented by the provided iteratee.

      This method immediately returns boolean false once a quad that does not pass the test is found.

      This method always returns boolean true on an empty dataset.

      This method is aligned with Array.prototype.every() in ECMAScript-262.

      Parameters

      • iteratee: (quad: OutQuad, dataset: this) => boolean

      Returns boolean

    • Parameters

      • callback: QuadPredicate<Q_N3>
      • subject: OTerm
      • predicate: OTerm
      • object: OTerm
      • graph: OTerm

      Returns boolean

    • Parameters

      • Optionaloptions: extractListOptions

      Returns Record<string, RDF.Term[]>

    • Creates a new dataset with all the quads that pass the test implemented by the provided iteratee.

      This method is aligned with Array.prototype.filter() in ECMAScript-262.

      Parameters

      • iteratee: (quad: OutQuad, dataset: this) => boolean

      Returns Dataset<OutQuad, InQuad>

    • Executes the provided iteratee once on each quad in the dataset.

      This method is aligned with Array.prototype.forEach() in ECMAScript-262.

      Parameters

      • callback: (quad: OutQuad, dataset: this) => void

      Returns void

    • Parameters

      • callback: QuadCallback<Q_N3>
      • subject: OTerm
      • predicate: OTerm
      • object: OTerm
      • graph: OTerm

      Returns void

    • Parameters

      • callback: (result: Q_N3["graph"]) => void
      • subject: OTerm
      • predicate: OTerm
      • object: OTerm

      Returns void

    • Parameters

      • callback: (result: Q_N3["object"]) => void
      • subject: OTerm
      • predicate: OTerm
      • graph: OTerm

      Returns void

    • Parameters

      • callback: (result: Q_N3["predicate"]) => void
      • subject: OTerm
      • object: OTerm
      • graph: OTerm

      Returns void

    • Parameters

      • callback: (result: Q_N3["subject"]) => void
      • predicate: OTerm
      • object: OTerm
      • graph: OTerm

      Returns void

    • Parameters

      • subject: OTerm
      • predicate: OTerm
      • object: OTerm

      Returns Q_N3["graph"][]

    • Parameters

      • subject: OTerm
      • predicate: OTerm
      • graph: OTerm

      Returns Q_N3["object"][]

    • Parameters

      • subject: OTerm
      • object: OTerm
      • graph: OTerm

      Returns Q_N3["predicate"][]

    • Parameters

      • subject: OTerm
      • predicate: OTerm
      • object: OTerm
      • graph: OTerm

      Returns Quad[]

    • Parameters

      • predicate: OTerm
      • object: OTerm
      • graph: OTerm

      Returns Q_N3["subject"][]

    • Determines whether a dataset includes a certain quad.

      Parameters

      Returns boolean

    • Consumes the given stream.

      The end and error events are used like described in the Stream interface. Depending on the use case, subtypes of EventEmitter or Stream are used.

      Parameters

      • stream: Stream<Q_RDF & InQuad>

        The stream that will be consumed.

      Returns EventEmitter<DefaultEventMap> & Promise<Store<Q_RDF, Q_N3, OutQuad, InQuad>>

      The resulting event emitter.

      Stream

    • Returns a new dataset containing alls quads from the current dataset that are also included in the given dataset.

      Parameters

      Returns Dataset<OutQuad, InQuad>

    • Returns a new dataset containing all quads returned by applying iteratee to each quad in the current dataset.

      Parameters

      Returns Dataset<OutQuad, InQuad>

    • Returns a stream that processes all quads matching the pattern.

      Parameters

      • Optionalsubject: Term

        The optional subject.

      • Optionalpredicate: Term

        The optional predicate.

      • Optionalobject: Term

        The optional object.

      • Optionalgraph: Term

        The optional graph.

      Returns Stream<Q_RDF> & Dataset<OutQuad, InQuad>

      The resulting quad stream.

    • Parameters

      • subject: OTerm
      • predicate: OTerm
      • object: OTerm
      • graph: OTerm

      Returns Iterable<OutQuad>

    • This method calls the iteratee on each quad of the Dataset. The first time the iteratee is called, the accumulator value is the initialValue or, if not given, equals to the first quad of the Dataset. The return value of the iteratee is used as accumulator value for the next calls.

      This method returns the return value of the last iteratee call.

      This method is aligned with Array.prototype.reduce() in ECMAScript-262.

      Type Parameters

      • A

      Parameters

      • callback: (accumulator: A, quad: OutQuad, dataset: this) => A
      • OptionalinitialValue: A

      Returns A

    • Removes all streamed quads.

      The end and error events are used like described in the Stream interface.

      Parameters

      • stream: Stream<Q_RDF>

        The stream that will be consumed.

      Returns EventEmitter

      The resulting event emitter.

      Stream

    • All quads matching the pattern will be removed.

      The end and error events are used like described in the Stream interface.

      Parameters

      • Optionalsubject: Term

        The optional subject.

      • Optionalpredicate: Term

        The optional predicate.

      • Optionalobject: Term

        The optional object.

      • Optionalgraph: Term

        The optional graph.

      Returns EventEmitter

      The resulting event emitter.

      Stream

    • Parameters

      • subject: Q_RDF["subject"]
      • predicate: Q_RDF["predicate"]
      • object: Q_RDF["object"]
      • Optionalgraph: Q_RDF["graph"]
      • Optionaldone: () => void

      Returns boolean

    • Parameters

      Returns boolean

    • Parameters

      Returns void

    • Existential quantification method, tests whether some quads in the dataset pass the test implemented by the provided iteratee.

      This method immediately returns boolean true once a quad that passes the test is found.

      This method is aligned with Array.prototype.some() in ECMAScript-262.

      Parameters

      • iteratee: (quad: OutQuad, dataset: this) => boolean

      Returns boolean

    • Parameters

      • callback: QuadPredicate<Q_N3>
      • subject: OTerm
      • predicate: OTerm
      • object: OTerm
      • graph: OTerm

      Returns boolean

    • Returns the set of quads within the dataset as a host language native sequence, for example an Array in ECMAScript-262.

      Since a Dataset is an unordered set, the order of the quads within the returned sequence is arbitrary.

      Returns OutQuad[]

    • Returns an N-Quads string representation of the dataset, preprocessed with Dataset Normalization algorithm.

      Returns string

    • Returns a stream that contains all quads of the dataset.

      Returns Stream<OutQuad>

    • Returns a string representation of an object.

      Returns string

    • Returns a new Dataset that is a concatenation of this dataset and the quads given as an argument.

      Parameters

      Returns Dataset<OutQuad, InQuad>