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

    Class IndividualRepository

    A repository for retrieving classes from graphs.

    Hierarchy (View Summary)

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

    • Get all concepts that are displayed below a concept scheme, including indirectly narrower ones.

      The traversal starts at the getTopConcepts of the scheme and follows the narrower concepts that can be displayed below the scheme, so the result is exactly the set of concepts that a hierarchical view of the scheme can reach.

      Note: The hierarchical relations of the graphs are indexed once per call instead of querying the narrower concepts of every single concept, which is an order of magnitude faster on large thesauri. Prefer getConceptsOfScheme when the associated concepts are sufficient.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • schemeUri: string

        URI of a concept scheme.

      Returns IterableIterator<string>

      An iterator of URIs of all concepts below the concept scheme.

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

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      Returns IterableIterator<string>

      An iterator of URIs of all concept schemes.

    • Get the concepts that are explicitly associated with a concept scheme, either via skos:inScheme or via skos:topConceptOf.

      Note: Collections can be associated with a concept scheme via skos:inScheme as well. They are not returned, because skos:Collection is disjoint with skos:Concept.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • schemeUri: string

        URI of a concept scheme.

      Returns IterableIterator<string>

      An iterator of URIs of the concepts of the concept scheme.

    • 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 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 the top concepts of a concept scheme.

      If the subject is a concept scheme, the getTopConcepts of that scheme are returned. If the inScheme option is set, only concepts that can be displayed below that concept scheme are returned, which excludes concepts that are associated with a different scheme.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • OptionalsubjectUri: string

        URI of a concept or concept scheme, or undefined to get all concept schemes.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

    • 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 the first discovered path from a given collection to a root collection.

      The path does not contain the given collection and is ordered from the closest super collection to the root collection. If the collection is part of a membership cycle, the path ends at the last collection that has not been visited yet and does not reach a root collection.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • subjectUri: string

        URI of a collection.

      Returns string[]

      The first path that is found from the given collection to a root collection.

    • Get all collections that are not a member of another collection.

      Every collection returned by getCollections is either returned by this method, or is reachable from one of the returned collections via getSubCollections. If a group of collections is only reachable through a membership cycle, the first collection of that group is returned as a root collection so that no collection is lost.

      Note: Collections that are identified by a blank node cannot be queried for their members and are therefore always returned as root collections.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      An iterator of URIs of the root collections.

    • 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 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 the members of a collection that are collections themselves, or all root collections.

      The order of the members of a skos:OrderedCollection is preserved.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • OptionalsubjectUri: string

        URI of a collection or undefined to get all root collections.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns IterableIterator<string>

      An iterator of URIs of the nested collections of the given collection, or of the root collections if no subject is provided.

    • 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 collections that have a given subject as a member. This includes both skos:member and skos:memberList properties.

      Note: A collection that is a member of itself is returned as its own super collection, which is consistent with getBroaderConcepts. Use hasSuperCollections to test whether a collection is a member of another collection.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • subjectUri: string

        URI of a collection or concept.

      Returns IterableIterator<string>

      An iterator of URIs of the collections that contain the subject.

    • 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 the top concepts of a concept scheme.

      In addition to the concepts that are explicitly designated as top concepts via skos:hasTopConcept or skos:topConceptOf, this returns the concepts of the scheme that have no broader concept within the same scheme. Without the latter, concepts whose skos:broader property refers to a concept of another scheme would not be displayed below the scheme that they are associated with.

      Note: A concept that is its own broader concept is not excluded, so that recursive definitions do not remove it from the list of top concepts.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • schemeUri: string

        URI of a concept scheme.

      Returns IterableIterator<string>

      An iterator of URIs of the top concepts of the concept scheme.

    • Get the concepts that are not displayed below any concept scheme, i.e. the concepts that are neither associated with a concept scheme nor reachable from the top concepts of one.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • Optionaloptions: DefinitionQueryOptions

        Optional query options. definedBy and notDefinedBy filter the concepts by their definition source.

      Returns IterableIterator<string>

      An iterator of URIs of the concepts outside of all concept schemes.

    • Get the root concepts of the concepts that are not displayed below any concept scheme, see getUnscopedConcepts. These are the concepts without a broader concept among them, plus one concept of every group of concepts that can only be reached through a cycle of broader concepts, so that every unscoped concept can be reached from one of the roots.

      Note: A concept that is its own broader concept is not excluded, as in getTopConcepts.

      Parameters

      Returns IterableIterator<string>

      An iterator of URIs of the root concepts outside of all concept schemes.

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

    • Indicate if a resource is associated with any concept scheme via skos:inScheme.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • subjectUri: string

        URI of a resource.

      Returns boolean

      true if the resource is in a concept scheme, 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 a collection has members that are collections themselves.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • subjectUri: string

        URI of a collection.

      • Optionaloptions: DefinitionQueryOptions

        Optional query parameters.

      Returns boolean

      true if the collection has nested collections, 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.

    • Indicates whether a collection is a member of another collection.

      Note: A collection that is a member of itself is not considered to have a super collection, so that recursive definitions do not remove it from the list of root collections.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • subjectUri: string

        URI of a collection.

      Returns boolean

      true if the collection is a member of another collection, 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 collection.

      Parameters

      • graphUris: string | string[] | undefined

        URI of the graphs to search for collections.

      • subjectUri: string

        URI of a subject.

      Returns boolean

      true if the subject is a skos:Collection or a skos:OrderedCollection, false otherwise.

    • Indicate if a concept is explicitly associated with a given concept scheme, either via skos:inScheme or via skos:topConceptOf.

      Note: The skos:broader and skos:narrower relations are not taken into account, because they may cross the boundaries of a concept scheme. Use getAllConceptsInScheme to get the concepts that are displayed below a concept scheme.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • subjectUri: string

        URI of a concept.

      • schemeUri: string

        URI of a concept scheme.

      Returns boolean

      true if the concept is associated with the concept scheme, 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 a resource is associated with a given concept scheme via skos:inScheme.

      Parameters

      • graphUris: string | string[] | undefined

        URIs of the graphs to search for concepts.

      • subjectUri: string

        URI of a resource.

      • schemeUri: string

        URI of a concept scheme.

      Returns boolean

      true if the resource is in the given concept scheme, 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.