import { type RDF } from "https://deno.land/x/ldkit@v0.5.1/rdf.ts";
const { Dataset } = RDF;
Methods
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.
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.
This method removes the quads in the current instance that match the given arguments.
The logic described in Quad Matching is applied for each quad in this dataset to select the quads which will be deleted.
Returns a new dataset that contains all quads from the current dataset, not included in the given dataset.
Returns true if the current instance contains the same graph structure as the given dataset.
Blank Nodes will be normalized.
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.
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.
Executes the provided iteratee
once on each quad in the dataset.
This method is aligned with Array.prototype.forEach()
in ECMAScript-262.
Imports all quads from the given stream into the dataset.
The stream events end
and error
are wrapped in a Promise.
Returns a new dataset containing alls quads from the current dataset that are also included in the given dataset.
Returns a new dataset containing all quads returned by applying iteratee
to each quad in the current dataset.
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.
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.
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 an N-Quads string representation of the dataset, preprocessed with RDF Dataset Normalization algorithm.
Returns an N-Quads string representation of the dataset.
No prior normalization is required, therefore the results for the same quads may vary depending on the Dataset
implementation.