@faubulous/mentor-rdf
Version:
A library for working with RDF vocabularies with support for basic RDFS and OWL inference.
96 lines (95 loc) • 4.67 kB
TypeScript
import { ResourceRepository } from "./resource-repository";
export declare class ConceptRepository extends ResourceRepository {
/**
* Get all concepts.
* @param graphUris URIs of the graphs to search for concepts.
* @returns A list of URIs of all concepts.
*/
getConcepts(graphUris: string | string[] | undefined): string[];
/**
* Get all concept schemes.
* @param graphUris URIs of the graphs to search for concepts.
* @returns A list of URIs of all concepts.
*/
getConceptSchemes(graphUris: string | string[] | undefined): string[];
/**
* Get all collections.
* @param graphUris URI of the graphs to search for collections.
* @returns A list of URIs of all collections.
*/
getCollections(graphUris: string | string[] | undefined): string[];
/**
* Get the members of a collection. This includes both `skos:member` and `skos:memberList` properties.
* @param graphUris URI of the graphs to search for collections.
* @param collectionUri URI of a collection.
* @returns An array of URIs of the members of the collection.
*/
getCollectionMembers(graphUris: string | string[] | undefined, collectionUri: string): string[];
/**
* Get the members of a collection. This includes both `skos:member` and `skos:memberList` properties.
* @param graphUris URI of the graphs to search for collections.
* @param collectionUri URI of a collection.
* @returns An array of URIs of the members of the collection.
*/
hasCollectionMembers(graphUris: string | string[] | undefined, collectionUri: string): boolean;
/**
* Indicates whether a collection is an ordered collection.
* @param graphUris URI of the graphs to search for collections.
* @param collectionUri URI of a collection.
* @returns `true` if the collection is an ordered collection, `false` otherwise.
*/
isOrderedCollection(graphUris: string | string[] | undefined, collectionUri: string): boolean;
/**
* Get all broader concepts of a concept scheme.
* @param graphUris URIs of the graphs to search for concepts.
* @param subjectUri URI of a concept scheme.
*/
getBroaderConcepts(graphUris: string | string[] | undefined, subjectUri: string): string[];
/**
* Indicates whether a concept has broader concepts.
* @param graphUris URIs of the graphs to search for concepts.
* @param subjectUri URI of a concept.
*/
hasBroaderConcepts(graphUris: string | string[] | undefined, subjectUri: string): boolean;
/**
* Get all narrower concepts of a concept or top concepts of a concept scheme.
* @param graphUris URIs of the graphs to search for concepts.
* @param subjectUri URI of a concept or concept scheme.
*/
getNarrowerConcepts(graphUris: string | string[] | undefined, subjectUri?: string): string[];
/**
* Indicates whether a concept has narrower concepts.
* @param graphUris URIs of the graphs to search for concepts.
* @param subjectUri URI of a concept.
*/
hasNarrowerConcepts(graphUris: string | string[] | undefined, subjectUri: string): boolean;
/**
* Indicates whether a concept is a narrower concept of another concept.
* @param graphUris URIs of the graphs to search for concepts.
* @param subjectUri URI of a concept.
* @param broaderUri URI of a broader concept.
* @returns `true` if the concept is a narrower concept of the broader concept, `false` otherwise.
*/
isNarrowerConceptOf(graphUris: string | string[] | undefined, subjectUri: string, broaderUri: string): boolean;
/**
* Indicates whether a subject is a concept scheme.
* @param graphUris URIs of the graphs to search for concepts.
* @param subjectUri URI of a subject.
* @returns `true` if the subject is a concept scheme, `false` otherwise.
*/
isConceptScheme(graphUris: string | string[] | undefined, subjectUri: string): boolean;
/**
* Get all broader concepts up to and including a concept scheme.
* @param graphUris URIs of the graphs to search for concepts.
* @param subjectUri URI of a concept.
*/
getConceptSchemePath(graphUris: string | string[] | undefined, subjectUri: string): string[];
/**
* Recursively find the first path from a given class to a root class.
* @param subjectUri URI of a class.
* @param path The current class path.
* @param backtrack Set of URIs that have already been visited.
* @returns The first path that is found from the given class to a root class.
*/
private _getConceptSchemePath;
}