import { Quad } from "@rdfjs/types"; import jsonldDatasetProxy from "jsonld-dataset-proxy"; import { WrapperSubscribableDataset } from "o-dataset-pack"; import { LdoBuilder } from "./LdoBuilder"; import { ShapeType } from "./ShapeType"; import { LdoBase } from "./util"; /** * Utility for building a linked data object */ export class LdoDataset extends WrapperSubscribableDataset { /** * Gets a builder for a given type * @param shapeType A ShapeType * @returns A builder for the given type */ public usingType( shapeType: ShapeType ): LdoBuilder { const proxyBuilder = jsonldDatasetProxy(this, shapeType.context); return new LdoBuilder(proxyBuilder, shapeType); } }