UNPKG

sparnatural

Version:

Visual client-side SPARQL query builder and knowledge graph exploration tool

106 lines (105 loc) 4.39 kB
import { SHACLSpecificationProvider } from "./SHACLSpecificationProvider"; import { SHACLSpecificationEntry } from "./SHACLSpecificationEntry"; import ISHACLSpecificationEntity from "./ISHACLSpecificationEntity"; import { RdfStore } from "rdf-stores"; import { DagIfc } from "../../dag/Dag"; import { ISpecificationEntity } from "../ISpecificationEntity"; import ISpecificationProperty from "../ISpecificationProperty"; import { Term } from '@rdfjs/types'; export declare class SHACLSpecificationEntity extends SHACLSpecificationEntry implements ISHACLSpecificationEntity { constructor(uri: string, provider: SHACLSpecificationProvider, n3store: RdfStore, lang: string); getLabel(): string; getTooltip(): string | undefined; getConnectingProperties(range: string): string[]; /** * Return the tree of properties connecting this entity to the specified range entity * @param range The URI of the selected target entity * @returns */ getConnectingPropertiesTree(range: string): DagIfc<ISpecificationProperty>; getConnectedEntities(): string[]; getConnectedEntitiesTree(): DagIfc<ISpecificationEntity>; hasConnectedEntities(): boolean; /** * @returns all (non-deactivated) properties available on this node shape, including inherited properties from superclasses */ getProperties(): string[]; /** * * @returns true if sh:nodeKind = sh:Literal, or if sh:datatype is present, or if sh:languageIn is present */ isLiteralEntity(): boolean; isBlankNodeEntity(): boolean; /** * @returns true if this shape has a target, either a targetClass or sh:target, or is itself a Class */ hasTypeCriteria(): boolean; /** * @returns a property labelled with dash:propertyRole = dash:LabelRole */ getDefaultLabelProperty(): string | undefined; getParents(): string[]; getChildren(): string[]; /** * @returns all values of sh:targetClass on this entity, as RDF Terms */ getShTargetClass(): Term[]; /** * @returns true if this shape as an sh:target predicate (indicating it is associated to a SPARQL query target) */ hasShTarget(): boolean; couldBeSkosConcept(): boolean; static compare(item1: SHACLSpecificationEntity, item2: SHACLSpecificationEntity): number; } export declare class SpecialSHACLSpecificationEntity implements ISHACLSpecificationEntity { private id; private icon; private label; private isRangeOfFunction; constructor(id: string, icon: string, label: string, isRangeOfFunction: Function); getId(): string; getLabel(): string; getColor(): string | undefined; getIcon(): string; isRangeOf(n3store: RdfStore, shapeUri: any): boolean; getConnectedEntities(): string[]; getConnectedEntitiesTree(): DagIfc<ISpecificationEntity>; hasConnectedEntities(): boolean; getConnectingProperties(range: string): string[]; getConnectingPropertiesTree(range: string): DagIfc<ISpecificationProperty>; isLiteralEntity(): boolean; isBlankNodeEntity(): boolean; hasTypeCriteria(): boolean; getDefaultLabelProperty(): string | undefined; getOrder(): string | undefined; getTooltip(): string | undefined; getDatasource(): any; getTreeChildrenDatasource(): any; getTreeRootsDatasource(): any; getHighlightedIcon(): string; getParents(): string[]; getChildren(): string[]; couldBeSkosConcept(): boolean; } export declare class SpecialSHACLSpecificationEntityRegistry { private registry; static SPECIAL_SHACL_ENTITY_DATES: string; static SPECIAL_SHACL_ENTITY_LOCATION: string; static SPECIAL_SHACL_ENTITY_TEXT: string; static SPECIAL_SHACL_ENTITY_NUMBER: string; static SPECIAL_SHACL_ENTITY_OTHER: string; static instance: SpecialSHACLSpecificationEntityRegistry; /** * The Singleton's constructor should always be private to prevent direct * construction calls with the `new` operator. */ private constructor(); /** * The static method that controls the access to the singleton instance. * * This implementation let you subclass the Singleton class while keeping * just one instance of each subclass around. */ static getInstance(): SpecialSHACLSpecificationEntityRegistry; getRegistry(): Map<string, SpecialSHACLSpecificationEntity>; }