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

    Class ClassRepository

    A repository for retrieving classes from graphs.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

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

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

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

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