middleware.vocabulary_configuration =================================== .. py:module:: middleware.vocabulary_configuration .. autoapi-nested-parse:: Declarative vocabulary configuration and validated runtime vocabulary context. Attributes ---------- .. autoapisummary:: middleware.vocabulary_configuration.VocabularyNamespace middleware.vocabulary_configuration.ResolvedVocabularyNamespace Classes ------- .. autoapisummary:: middleware.vocabulary_configuration.VocabularyDeclaration middleware.vocabulary_configuration.VocabularyContext middleware.vocabulary_configuration.VocabularyConfiguration Module Contents --------------- .. py:type:: VocabularyNamespace :canonical: Namespace | type[DefinedNamespace] | URIRef | str .. py:type:: ResolvedVocabularyNamespace :canonical: Namespace | type[DefinedNamespace] .. py:class:: VocabularyDeclaration One developer-facing vocabulary declaration used to derive shared config. .. py:attribute:: prefix :type: str .. py:attribute:: namespace :type: rdflib.Namespace | type[rdflib.namespace.DefinedNamespace] | rdflib.URIRef | str .. py:attribute:: user_spec :type: middleware.namespaces.spec_cache.UserVocabularySource | None :value: None .. py:property:: resolved_namespace :type: ResolvedVocabularyNamespace Return the coerced namespace object stored on this declaration. .. py:property:: namespace_uri :type: str Return the namespace IRI string for this declaration. .. py:method:: as_whitelist_entry() -> middleware.namespaces.spec_whitelist.WhitelistEntry Convert this declaration into a whitelist entry. .. py:property:: is_indexed :type: bool Return whether a bundled or user specification backs this vocabulary. .. py:class:: VocabularyContext Validated runtime vocabulary state derived from a configuration. .. py:attribute:: declarations :type: tuple[VocabularyDeclaration, Ellipsis] .. py:property:: whitelist :type: middleware.namespaces.spec_whitelist.RestrictedNamespaceWhitelist Return the namespace whitelist derived from the declarations. .. py:property:: specification_cache :type: middleware.namespaces.spec_cache.SpecificationCache Return the read-only specification cache for indexed vocabularies. .. py:property:: indexed_vocabularies :type: tuple[str, Ellipsis] Return namespace IRIs that have searchable indexed term sets. .. py:property:: search_index :type: middleware.vocabulary.search_index.VocabularySearchIndex Return the lazily built lexical search index for indexed vocabularies. .. py:class:: VocabularyConfiguration Declarative vocabulary setup for building a shared vocabulary context. .. py:attribute:: declarations :type: tuple[VocabularyDeclaration, Ellipsis] :value: () .. py:method:: bundled_plus(*declarations: VocabularyDeclaration) -> VocabularyConfiguration :classmethod: Return the default bundled vocabularies extended by ``declarations``. .. py:method:: plus(*declarations: VocabularyDeclaration) -> VocabularyConfiguration Return a new configuration extended by the supplied declarations. .. py:method:: plus_dublin_core() -> VocabularyConfiguration Add the extended Dublin Core published as ISO 15836-2:2019: https://www.iso.org/standard/71341.html. .. py:method:: plus_vann() -> VocabularyConfiguration Add the bundled VANN vocabulary declaration to this configuration. .. py:method:: build_context() -> VocabularyContext Materialize whitelist, specification cache, and indexed vocabulary state.