rdf-validate-shacl
Version:
RDF SHACL validator
33 lines (32 loc) • 1.39 kB
TypeScript
import TermSet from '@rdfjs/term-set';
import type { DatasetCore, Quad, Term } from '@rdfjs/types';
import type { GraphPointer, MultiPointer } from 'clownface';
import NodeSet from './node-set.js';
import type { Shape } from './shapes-graph.js';
import type { Namespaces } from './namespaces.js';
/**
* Extracts all the quads forming the structure under a blank node. Stops at
* non-blank nodes.
*/
export declare function extractStructure(dataset: DatasetCore, startNode: Term, visited?: TermSet<Term>): Generator<Quad>;
/**
* Extracts all the quads forming the structure under a blank shape node. Stops at
* non-blank nodes. Replaces sh:in with a comment if the list is too long.
*/
export declare function extractSourceShapeStructure(shape: Shape, dataset: DatasetCore, startNode: Term, visited?: TermSet<Term>): Generator<Quad>;
/**
* Get instances of a class.
*/
export declare function getInstancesOf(cls: GraphPointer, ns: Namespaces): NodeSet;
/**
* Get subclasses of a class.
*/
export declare function getSubClassesOf(cls: GraphPointer, ns: Namespaces): NodeSet;
/**
* Check if a node is an instance of a class.
*/
export declare function isInstanceOf(instance: GraphPointer, cls: GraphPointer, ns: Namespaces): boolean;
/**
* Extract all the terms of an RDF-list and return then as an array.
*/
export declare function rdfListToArray(listNode: MultiPointer): Term[];