rdf-dataset-fragmenter
Version:
Fragments an RDF dataset into multiple parts
22 lines (21 loc) • 1.04 kB
TypeScript
import type * as RDF from '@rdfjs/types';
import { ResourceIdentifier } from './identifier/ResourceIdentifier';
import type { IQuadTransformer } from './IQuadTransformer';
/**
* A quad transformer that wraps over other quad transformers,
* and varies based on the configured resource type.
*
* Concretely, it will match all resources of the given type,
* and evenly distribute these resources to the different quad transformers.
* It will make sure that different triples from a given resources will remain coupled.
*
* WARNING: This transformer assumes that all the applicable resources
* have `rdf:type` occurring as first triple with the resource IRI as subject.
*/
export declare class QuadTransformerCompositeVaryingResource implements IQuadTransformer {
private readonly transformers;
readonly resourceIdentifier: ResourceIdentifier<IQuadTransformer>;
constructor(typeRegex: string, targetPredicateRegex: string, transformers: IQuadTransformer[]);
transform(quad: RDF.Quad): RDF.Quad[];
end(): void;
}