rdf-dataset-fragmenter
Version:
Fragments an RDF dataset into multiple parts
28 lines (27 loc) • 1.07 kB
TypeScript
import type { Readable } from 'node:stream';
import type * as RDF from '@rdfjs/types';
import type { IQuadSink } from './io/IQuadSink';
import type { IQuadSource } from './io/IQuadSource';
import type { IFragmentationStrategy } from './strategy/IFragmentationStrategy';
import type { IQuadTransformer } from './transform/IQuadTransformer';
/**
* Fragments quads from a given source into a given sink.
*/
export declare class Fragmenter {
private readonly quadSource;
private readonly transformers?;
private readonly fragmentationStrategy;
private readonly quadSink;
constructor(options: IFragmenterOptions);
static getTransformedQuadStream(quadSource: IQuadSource, transformers: IQuadTransformer[]): RDF.Stream & Readable;
/**
* Read quads from a given source, fragment it into the sink, and close the sink.
*/
fragment(): Promise<void>;
}
export interface IFragmenterOptions {
quadSource: IQuadSource;
transformers?: IQuadTransformer[];
fragmentationStrategy: IFragmentationStrategy;
quadSink: IQuadSink;
}