@faubulous/mentor-rdf
Version:
A library for working with RDF vocabularies with support for basic RDFS and OWL inference.
46 lines (45 loc) • 2.33 kB
TypeScript
import { ShapeRepository } from "./shape-repository";
/**
* A repository for retrieving ontologies and ontology concepts from graphs.
*/
export declare class VocabularyRepository extends ShapeRepository {
/**
* Get all concept schemes in the repository.
* @param graphUris URIs of the graphs to search.
* @returns An iterator of all concept schemes in the repository.
*/
getConceptSchemes(graphUris: string | string[] | undefined): IterableIterator<string>;
/**
* Indicates whether the repository contains any concept schemes.
* @param graphUris URIs of the graphs to search.
* @returns `true` if the repository contains any concept schemes, `false` otherwise.
*/
hasConceptSchemes(graphUris: string | string[] | undefined): boolean;
/**
* Get all ontologies in the repository.
* @param graphUris URIs of the graphs to search.
* @returns An iterator of all ontologies in the repository.
*/
getOntologies(graphUris: string | string[] | undefined): IterableIterator<string>;
/**
* Indicates whether the repository contains any ontology headers.
* @param graphUris URIs of the graphs to search.
* @returns `true` if the repository contains any ontology headers, `false` otherwise.
*/
hasOntologies(graphUris: string | string[] | undefined): boolean;
/**
* Get the version (owl:versionInfo) of an ontology. If the version is a date, it is returned as a string in the format "YYYY-MM-DD".
* @param graphUris URIs of the graphs to search.
* @param ontologyUri URI of the ontology.
* @returns The version of the ontology, or undefined if it is not found.
*/
getOntologyVersionInfo(graphUris: string | string[] | undefined, ontologyUri: string): string | undefined;
/**
* Get the sources of definitions for a given graph. These are ontology definitions
* or the objects of `rdfs:isDefinedBy` triples. If the rdfs:isDefinedBy object can be
* matched with an ontology definition, the ontology URI is returned.
* @param graphUris URIs of the graphs to search.
* @returns An iterator of sources of definitions for the given graph.
*/
getDefinitionSources(graphUris: string | string[] | undefined, includeOntologies?: boolean): IterableIterator<string>;
}