Skip to content

LdoDatasetFactory

LdoDatasetFactory is a helper class that includes methods for creating LdoDatasets.

This class exists for parity with RDF/JS. Most developers will not use it. Instead, it's better to use createLdoDataset.

Usage

import { createLdoDatasetFactory } from "ldo";

const datasetFactory = // some RDF/JS Dataset Factory
const ldoDatasetFactory = new LdoDatasetFactory(datasetFactory);
const ldoDataset = ldoDatasetFactory.dataset(initialDataset);

Definition

class LdoDatasetFactory implements DatasetFactory<Quad, Quad>

constructor

new LdoDatasetFactory(datasetFactory: DatasetFactory<Quad, Quad>)

Parameters

  • datasetFactory: A generic dataset factory this factory will wrap

dataset

dataset(quads?: Dataset<Quad, Quad> | Quad[]): LdoDataset

Parameters

  • quads: A list of quads to initialize the dataset