middleware.namespaces.spec_index ================================ .. py:module:: middleware.namespaces.spec_index .. autoapi-nested-parse:: Indexed RDF vocabulary term records derived from specification graphs. Classes ------- .. autoapisummary:: middleware.namespaces.spec_index.VocabularyTerm middleware.namespaces.spec_index.RDFVocabulary Module Contents --------------- .. py:class:: VocabularyTerm(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` One indexed RDF vocabulary term with label, definition, and kind. .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: uri :type: rdflib_reasoning.axiom.common.N3IRIRef .. py:attribute:: label :type: str .. py:attribute:: definition :type: str .. py:attribute:: termType :type: middleware.namespaces.common.VocabularyTermType .. py:class:: RDFVocabulary(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Term sets for one vocabulary namespace, grouped by normalized term kind. .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: namespace :type: rdflib_reasoning.axiom.common.N3IRIRef .. py:attribute:: classes :type: collections.abc.Set[VocabularyTerm] .. py:attribute:: datatypes :type: collections.abc.Set[VocabularyTerm] .. py:attribute:: individuals :type: collections.abc.Set[VocabularyTerm] .. py:attribute:: properties :type: collections.abc.Set[VocabularyTerm] .. py:property:: all_terms :type: collections.abc.Set[VocabularyTerm] Return every indexed term across classes, datatypes, individuals, and properties. .. py:method:: get_term(uri: rdflib.URIRef) -> VocabularyTerm Return the indexed term for ``uri``. .. py:method:: contains_term(uri: rdflib.URIRef) -> bool Return whether ``uri`` is indexed in this vocabulary. .. py:method:: from_graph(namespace: type[rdflib.Namespace] | type[rdflib.namespace.DefinedNamespace], graph: rdflib.Graph) -> RDFVocabulary from_graph(namespace: rdflib.Namespace | rdflib.namespace.DefinedNamespace, graph: rdflib.Graph) -> RDFVocabulary from_graph(namespace: rdflib.URIRef | str, graph: rdflib.Graph) -> RDFVocabulary :classmethod: Build an indexed vocabulary from ``graph`` for ``namespace``.