UNPKG

@inrupt/solid-client

Version:

Make your web apps work with Solid Pods.

32 lines (31 loc) 1.36 kB
import type { DataFactory, DatasetCore, DatasetCoreFactory } from "@rdfjs/types"; import { type ImmutableDataset } from "./rdf.internal"; /** * Convert an RDF/JS Dataset into a [[SolidDataset]] * * Parse an RDF/JS * {@link https://rdf.js.org/dataset-spec/#datasetcore-interface DatasetCore}, * into a [[SolidDataset]]. Note that, when saving the returned SolidDataset to * a Solid Pod, only Quads in the Default Graph will be stored. * * @param rdfJsDataset The source RDF/JS Dataset. * @returns A [[SolidDataset]] containing the same data as the given RDF/JS Dataset. * @since 1.9.0 */ export declare function fromRdfJsDataset(dataset: DatasetCore): ImmutableDataset; export type ToRdfJsOptions = Partial<{ dataFactory: DataFactory; datasetFactory: DatasetCoreFactory; }>; /** * Convert a [[SolidDataset]] into an RDF/JS Dataset * * Export a [[SolidDataset]] into an RDF/JS * {@link https://rdf.js.org/dataset-spec/#datasetcore-interface DatasetCore}. * * @param set A [[SolidDataset]] to export into an RDF/JS Dataset. * @param options Optional parameter that allows you to pass in your own RDF/JS DataFactory or DatasetCoreFactory. * @returns An RDF/JS Dataset containing the data from the given SolidDataset. * @since 1.9.0 */ export declare function toRdfJsDataset(set: ImmutableDataset, options?: ToRdfJsOptions): DatasetCore;