rdf-dataset-fragmenter
Version:
Fragments an RDF dataset into multiple parts
23 lines (22 loc) • 934 B
TypeScript
import type * as RDF from '@rdfjs/types';
import type { IQuadMatcher } from './IQuadMatcher';
/**
* A quad matcher that matches all resources of the given type.
*
* Blank nodes are not supported.
*
* WARNING: This matcher assumes that all the applicable resources
* have `rdf:type` occurring as first triple with the resource IRI as subject.
*/
export declare class QuadMatcherResourceType implements IQuadMatcher {
private readonly type;
private readonly matchFullResource;
readonly matchingSubjects: Record<string, boolean>;
/**
* @param typeRegex Regular expression for type IRIs that need to be matched.
* @param matchFullResource If not only the quad containing the type must be matched,
* but also all other quads sharing the same subject of that quad.
*/
constructor(typeRegex: string, matchFullResource: boolean);
matches(quad: RDF.Quad): boolean;
}