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