@faubulous/mentor-rdf
    Preparing search index...

    Class VocabularyRepository

    A repository for retrieving ontologies and ontology concepts from graphs.

    Hierarchy

    • ShapeRepository
      • VocabularyRepository
    Index

    Constructors

    Properties

    domainPredicate: NamedNode<string> = rdfs.domain

    The predicate used to indicate the domain of a property.

    rangePredicate: NamedNode<string> = rdfs.range

    The predicate used to indicate the range of a property.

    store: Store

    The RDF triple store.

    Methods

    • Get all sub classes of a given class, including indirect sub classes.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        URI of a class.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      An iterator of all sub classes of the given class.

    • Get all broader concepts of a concept scheme.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • subjectUri: string

        URI of a concept scheme.

      Returns IterableIterator<string>

    • Get the SHACL cardinality constraints of a given property.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        The URI of the subject.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns { maxCount: number; minCount: number }

      An object with the minimum and maximum cardinalities; values are -1 if not found.

    • Get all classes in the repository.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      An iterator of all classes in the repository.

    • Get the members of a collection. This includes both skos:member and skos:memberList properties.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • collectionUri: string

        URI of a collection.

      Returns string[]

      An array of URIs of the members of the collection.

    • Get all collections.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      Returns IterableIterator<string>

      An iterator of URIs of all collections.

    • Get all concepts.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      Returns IterableIterator<string>

      An iterator of URIs of all concepts.

    • Get all broader concepts up to and including a concept scheme.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • subjectUri: string

        URI of a concept.

      Returns string[]

    • Get all concept schemes in the repository.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      Returns IterableIterator<string>

      An iterator of all concept schemes in the repository.

    • Get the SHACL datatype of a given property.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        The URI of the subject.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns string | undefined

      A datatype URI on success, xsd:anyURI otherwise.

    • 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.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      • includeOntologies: boolean = false

      Returns IterableIterator<string>

      An iterator of sources of definitions for the given graph.

    • Get the domain of a given property.

      Parameters

      • graphUris: string | string[] | undefined
      • propertyUri: string

        URI of a property.

      Returns string

      The URI of the domain of the given property. If no domain is specified, rdfs:Resource is returned.

    • Get all individuals in the repository.

      Parameters

      • graphUris: string | string[] | undefined
      • OptionaltypeUri: string

        The type of the individuals to get.

      • Optionaloptions: DefinitionQueryOptions

        Options for retrieving the individuals.

      Returns IterableIterator<string>

      An iterator of all individuals in the repository.

    • Get all classes that have instances or all types of a specific individual.

      Parameters

      • graphUris: string | string[] | undefined

        The graph URIs to search.

      • OptionalsubjectUri: string

        The URI of a subject for which to get the types (optional).

      • Optionaloptions: DefinitionQueryOptions

        Options for retrieving the individuals.

      Returns IterableIterator<string>

      An iterator of all individual types, or all types of a specific individual.

    • Get the language tags used in the object of triples with a given set of predicates.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      Returns LanguageTagUsageStats

      An array of language tag statistics, sorted by the number of occurrences in descending order.

    • Get the most frequently used language tag in the object of triples with a given set of predicates.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      Returns string | undefined

    • Get all narrower concepts of a concept or top concepts of a concept scheme.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • OptionalsubjectUri: string

        URI of a concept or concept scheme.

      Returns IterableIterator<string>

    • Get all ontologies in the repository.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      Returns IterableIterator<string>

      An iterator of all ontologies in the repository.

    • 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".

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      • ontologyUri: string

        URI of the ontology.

      Returns string | undefined

      The version of the ontology, or undefined if it is not found.

    • Get information about the usage of predicates in the document such as the frequency of use and the use of language tags.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      • predicateUris: string[] | undefined = undefined

        URIs of the predicates to match.

      Returns PredicateUsageStats

    • Get all properties in the repository.

      Parameters

      • graphUris: string | string[] | undefined
      • Optionaloptions: DefinitionQueryOptions

        Optional options for retrieving properties.

      Returns IterableIterator<string>

      A list of all properties in the repository.

    • Get the RDF property path representation of the given SHACL property path. This method parses the SHACL property path and returns the RDF property path as a combination of nodes and strings.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subject: Quad_Subject

        The URI or blank id of the node referred to by sh:path.

      Returns (string | Quad_Subject)[]

      A flattened list of all path components, either as URIs or as strings.

    • Get all asserted and inferred property types.

      Parameters

      • graphUris: string | string[] | undefined

        The URI of the graph or an array of graphs to search for property types.

      • Optionaloptions: DefinitionQueryOptions

        Optional options for retrieving properties.

      Returns IterableIterator<string>

      An iterator of all property types in the repository.

    • Get the range of a given property.

      Parameters

      • graphUris: string | string[] | undefined
      • propertyUri: string

        URI of a property.

      Returns string | undefined

      The URI of the range of the given property. If no range is specified, undefined is returned.

    • Get all classes from the repository that have no super classes.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      An iterator of root classes in the repository.

    • Get the first discovered path from a given class to a root class.

      Parameters

      • graphUris: string | string[] | undefined
      • subjectUri: string

        URI of a class.

      • Optionaloptions: DefinitionQueryOptions

      Returns IterableIterator<string>

      An iterator containing the first path that is found from the given class to a root class.

    • Get all properties from the repository that have no super properties.

      Parameters

      • graphUris: string | string[] | undefined
      • Optionaloptions: DefinitionQueryOptions

        Optional options for retrieving properties.

      Returns IterableIterator<string>

      An iterator of root properties in the repository.

    • Get properties of a given type.

      Parameters

      • graphUris: string | string[] | undefined
      • typeUri: string

        URI of a property type.

      • Optionaloptions: DefinitionQueryOptions

      Returns IterableIterator<string>

      An iterator of properties of the given type.

    • Get the first discovered path from a given property to a root property.

      Parameters

      • graphUris: string | string[] | undefined
      • subjectUri: string

        URI of a property.

      • Optionaloptions: DefinitionQueryOptions

        Optional options for retrieving properties.

      Returns string[]

      A string array containing the first path that is found from the given property to a root property.

    • Get all shapes in the repository.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • OptionalsubjectUri: string
      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      An iterable of all shapes in the repository.

    • Get all target classes, nodes or properties of a given shape in the repository.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • shape: Quad_Subject

        The URI or blank id of the shape.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      An iterable of all targeted resources in the repository.

    • Get all shape types in the repository.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      A list of all shape types in the repository.

    • Get the sub classes of a given class or all root classes.

      Parameters

      • graphUris: string | string[] | undefined
      • OptionalsubjectUri: string

        URI of a class or undefined to get all root classes.

      • Optionaloptions: DefinitionQueryOptions

      Returns IterableIterator<string>

      An iterator of sub classes of the given class, or root classes if no subject is provided.

    • Get all subjects of a given class in the repository.

      Parameters

      Returns IterableIterator<string>

      An iterator of all subjects of the given class.

    • Get the sub properties of a given property or all root properties.

      Parameters

      • graphUris: string | string[] | undefined
      • OptionalsubjectUri: string

        URI of a property or undefined to get all root properties.

      • Optionaloptions: DefinitionQueryOptions

        Optional options for retrieving properties.

      Returns IterableIterator<string>

      An array of sub properties of the given property, an empty array if the property has no sub properties.

    • Get the super classes of a given class.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        URI of a class.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      An iterator of super classes of the given class.

    • Get the super properties of a given property.

      Parameters

      • graphUris: string | string[] | undefined
      • subjectUri: string

        URI of a property.

      • Optionaloptions: DefinitionQueryOptions

        Optional options for retrieving properties.

      Returns IterableIterator<string>

      An array of super properties of the given property, an empty array if the property has no super properties.

    • Get all validator types in the repository.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      An iterable of all shape types in the repository.

    • Indicates whether a concept has broader concepts.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • subjectUri: string

        URI of a concept.

      Returns boolean

    • Get the members of a collection. This includes both skos:member and skos:memberList properties.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • collectionUri: string

        URI of a collection.

      Returns boolean

      An array of URIs of the members of the collection.

    • Indicates whether the repository contains any concept schemes.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      Returns boolean

      true if the repository contains any concept schemes, false otherwise.

    • Indicate if there is an equivalent class of a given class.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        URI of a class.

      • Optionaloptions: QueryOptions

        Optional query parameters.

      Returns boolean

      true if the class has an equivalent class, false otherwise.

    • Indicate if there is an equivalent property of a given property.

      Parameters

      • graphUris: string | string[] | undefined
      • propertyUri: string

        URI of a property.

      Returns boolean

      true if the property has an equivalent property, false otherwise.

    • Indicate if a given class has at least one individual defined for it or for one of its sub classes.

      Parameters

      • graphUris: string | string[] | undefined

        Graph URIs to search in, undefined for the default graph.

      • classUri: string

        URI of a class.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns boolean

      true if the class has individuals, false otherwise.

    • Indicates whether a concept has narrower concepts.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • subjectUri: string

        URI of a concept.

      Returns boolean

    • Indicates whether the repository contains any ontology headers.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      Returns boolean

      true if the repository contains any ontology headers, false otherwise.

    • Indicate if there are shapes for a subject in the repository.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        The URI of the subject.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns boolean

      true if there are shapes for the subject, false otherwise.

    • Indicate if there are sub classes of a given class.

      Parameters

      • graphUris: string | string[] | undefined
      • subjectUri: string

        URI of a class.

      • Optionaloptions: DefinitionQueryOptions

      Returns boolean

      true if the class has sub classes, false otherwise.

    • Indicate if a given URI exists as the subject of a triple in the graph.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      • subjectUri:
            | string
            | BlankNode
            | Literal
            | Variable
            | Quad
            | NamedNode<string>
            | NamedNode<string>

        URI of the subject to search for.

      Returns boolean

      true if the URI is a subject, false otherwise.

    • Indicate if there are instances of a given class or any of its sub classes.

      Parameters

      Returns boolean

      true if the class has instances, false otherwise.

    • Indicate if there are sub properties of a given property.

      Parameters

      • graphUris: string | string[] | undefined
      • subjectUri: string

        URI of a property.

      • Optionaloptions: DefinitionQueryOptions

        Optional options for retrieving properties.

      Returns boolean

      true if the property has sub properties, false otherwise.

    • Indicate if a resource has a given type in the graph.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      • subjectUri: string

        URI or blank node id of the subject to match.

      • typeUri: string

        URI of the type to match.

      • Optionaloptions: QueryOptions

        Optional query parameters.

      Returns boolean

      true if the resource has the type, false otherwise.

    • Indicates whether a subject is a concept scheme.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • subjectUri: string

        URI of a subject.

      Returns boolean

      true if the subject is a concept scheme, false otherwise.

    • Indicate if a node is explicitly defined by the given URI using the rdfs:isDefinedBy property, or implicitly by sharing the same namespace.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search.

      • node: Quad_Subject

        A named node to check if it is defined by the given URI.

      • definedBy: string | null

        URI of the vocabulary that defines the resource (rdfs:isDefinedBy). Provide null to only return resources that have no rdfs:isDefinedBy property.

      Returns boolean

      true if the node is defined by the given URI, false otherwise.

    • Indicate if the subject is an instance of the type, or of one of its super types.

      Parameters

      • graphUris: string | string[] | undefined
      • subjectUri: string

        URI of the subject.

      • typeUri: string

        URI of the type to check.

      Returns boolean

      true if the subject is an instance of the type, or of one of its super types.

    • Indicate if a given class is the intersection of classes.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        URI of a class.

      Returns boolean

      true if the class is the intersection of classes, false otherwise.

    • Indicates whether a concept is a narrower concept of another concept.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • subjectUri: string

        URI of a concept.

      • broaderUri: string

        URI of a broader concept.

      Returns boolean

      true if the concept is a narrower concept of the broader concept, false otherwise.

    • Indicates whether a collection is an ordered collection.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • collectionUri: string

        URI of a collection.

      Returns boolean

      true if the collection is an ordered collection, false otherwise.

    • Indicate if a given class is direct or indirect (inferred) sub class of another class.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        URI of the sub class.

      • classUri: string

        URI of the super class.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns boolean

      true if the class is a sub class of the other class, false otherwise.

    • Indicate if a given property is direct or indirect (inferred) sub property of another property.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        URI of the sub property.

      • classUri: string

        URI of the super property.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns boolean

      true if the property is a sub property of the other property, false otherwise.

    • Indicate if a given class is a (disjoint) union of classes.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search, undefined for the default graph.

      • subjectUri: string

        URI of a class.

      Returns boolean

      true if the class is a (disjoint) union of classes, false otherwise.