ontocast.onto.ontology_access¶
Read-only accessors for ontology context on document vs unit workflow state.
Centralizes prompt-effective ontology resolution so agents and stategraph code
use :class:~ontocast.onto.ontology_snapshot.OntologySnapshot views (assemble
product) rather than treating snapshots as catalog :class:Ontology instances.
Classes¶
DocumentOntologyAccess
¶
Accessor for :class:AgentState (document-level reduce / serialize).
Source code in ontocast/onto/ontology_access.py
Attributes¶
__slots__ = ('_state',)
class-attribute
instance-attribute
¶
Methods:¶
__init__(state)
¶
has_any_artifacts()
¶
has_non_null_artifacts()
¶
ontology_by_anchor(anchor_iri)
¶
Source code in ontocast/onto/ontology_access.py
reduced_artifacts()
¶
serialization_targets()
¶
Ontologies to version and persist (per-catalog-IRI artifacts after apply).
OntologyPromptSource
¶
Bases: Protocol
Ontology material used to build LLM prompts (TTL, prefixes, seed checks).
Source code in ontocast/onto/ontology_access.py
UnitFactsOntologyAccess
¶
Accessor for :class:UnitFactsState; facts prompts use snapshot context only.
Source code in ontocast/onto/ontology_access.py
Attributes¶
__slots__ = ('_state',)
class-attribute
instance-attribute
¶
Methods:¶
__init__(state)
¶
domain_prefix_pairs()
¶
effective_graph_for_prompt()
¶
effective_ontology_for_prompt()
¶
has_non_empty_seed()
¶
has_non_null_seed_snapshot()
¶
ontology_for_prefixes()
¶
ontology_graph_for_prefixes()
¶
prompt_ontology_description()
¶
UnitOntologyAccess
¶
Accessor for :class:UnitOntologyState (ontology map loop).
Source code in ontocast/onto/ontology_access.py
Attributes¶
__slots__ = ('_state',)
class-attribute
instance-attribute
¶
Methods:¶
__init__(state)
¶
domain_prefix_pairs()
¶
effective_graph_for_prompt()
¶
effective_ontology_for_prompt()
¶
Return a transient snapshot view of the effective prompt graph.
Source code in ontocast/onto/ontology_access.py
has_non_empty_seed()
¶
has_non_null_seed_snapshot()
¶
ontology_for_prefixes()
¶
ontology_graph_for_prefixes()
¶
prompt_ontology_description()
¶
Functions:¶
build_llm_prefix_map(primary, supplemental=())
¶
Collect namespace prefixes for LLM Turtle/JSON-LD ingest repair.
Accepts a catalog :class:Ontology, an :class:OntologySnapshot, or a raw
:class:RDFGraph as primary.
Source code in ontocast/onto/ontology_access.py
build_llm_prefix_map_from_graphs(primary, supplemental=())
¶
Collect namespace prefixes for LLM Turtle/JSON-LD ingest repair from graphs.