@dasch-swiss/dsp-js
Version:
JavaScript library that handles API requests to Knora
41 lines (40 loc) • 1.44 kB
TypeScript
import { TypeGuard } from "../../resources/type-guard";
import { ClassDefinition } from "../class-definition";
import { ClassAndPropertyDefinitions } from "../ClassAndPropertyDefinitions";
import { PropertyDefinition } from "../property-definition";
/**
* @category Model V2
*/
export declare class ReadOntology extends ClassAndPropertyDefinitions {
id: string;
label: string;
comment?: string;
lastModificationDate?: string;
properties: {
[index: string]: PropertyDefinition;
};
classes: {
[index: string]: ClassDefinition;
};
dependsOnOntologies: Set<string>;
/**
* Gets all class definitions from the ontology's entity info.
*/
getAllClassDefinitions(): ClassDefinition[];
/**
* Gets class definitions restricted by type from the ontology's entity info.
*
* @param type restriction to a certain class definition type.
*/
getClassDefinitionsByType<T extends ClassDefinition>(type: TypeGuard.Constructor<T>): T[];
/**
* Gets all property definitions from the ontology's entity info.
*/
getAllPropertyDefinitions(): PropertyDefinition[];
/**
* Gets property definitions restricted by type from the ontology's entity info.
*
* @param type restriction to a certain property definition type.
*/
getPropertyDefinitionsByType<T extends PropertyDefinition>(type: TypeGuard.Constructor<T>): T[];
}