extract-cbd-shape
Version:
Extract an entity based on CBD and a SHACL shape
34 lines (33 loc) • 1.07 kB
TypeScript
import { Term } from "@rdfjs/types";
import { Path } from "./Path";
import { CbdExtracted } from "./CBDShapeExtractor";
export declare class NodeLink {
pathPattern: Path;
link: Term;
constructor(pathPattern: Path, link: Term);
}
export declare class ShapeError {
type: "and" | "or";
errors: (ShapeError | Path)[];
constructor(type: "and" | "or", errors?: (ShapeError | Path)[]);
toString(): string;
}
export declare class ShapeTemplate {
closed: boolean;
nodeLinks: Array<NodeLink>;
requiredPaths: Array<Path>;
optionalPaths: Array<Path>;
atLeastOneLists: Array<Array<ShapeTemplate>>;
label?: string;
constructor();
fillPathsAndLinks(extraPaths: Array<Path>, extraNodeLinks: Array<NodeLink>): void;
private invalidAtLeastOneLists;
private requiredPathsAreNotPresent;
requiredAreNotPresent(extract: CbdExtracted): ShapeError | undefined;
}
export declare class RDFMap<T> {
private namedNodes;
private blankNodes;
set(node: Term, item: T): void;
get(node: Term): T | undefined;
}