UNPKG

rdf-dataset-fragmenter

Version:
42 lines (41 loc) 1.57 kB
import { QuadSinkFile, type IQuadSinkFileOptions } from './QuadSinkFile'; export declare class QuadSinkHdt extends QuadSinkFile { private readonly generateIndexes; private readonly removeSourceFiles; private readonly conversionConcurrency; private readonly docker; private readonly filesToConvert; constructor(options: IQuadSinkHdtOptions); protected getFilePath(iri: string): string; /** * Runs the equivalent of `docker pull` for the rdf2hdt Docker image */ protected pullDockerImage(): Promise<void>; /** * Runs the equivalent of `docker run` to convert `rdfFilePath` into a HDT file * @param rdfFilePath The path to the RDF file to convert */ protected convertSingleFile(rdfFilePath: string): Promise<string>; /** * Converts all files stored in `filesToConvert` into HDT format using the Docker image, * with a maximum concurrency of `conversionConcurrency` */ protected convertToHdt(): Promise<void>; protected attemptConversionLog(count: number): void; close(): Promise<void>; } export interface IQuadSinkHdtOptions extends IQuadSinkFileOptions { /** * Whether to generate indexes using rdf2hdt */ generateIndexes?: boolean; /** * Whether to clean up the RDF files after HDT generation */ removeSourceFiles?: boolean; /** * The level of parallelism in the conversion, which will affect the number of * concurrently running Docker containers performing the conversion */ conversionConcurrency?: number; }