ontocast.onto.ontology_header¶
Lightweight ontology catalog metadata read without materializing graphs.
Classes¶
OntologyHeader
¶
Bases: OntologyPropertiesWithLineage
Ontology header metadata for a single stored named graph.
A header describes one version of an ontology (one named graph), carrying
exactly the lineage fields terminal-version selection needs -- iri,
hash, parent_hashes, created_at, version -- without the graph
itself. This is deliberately not an :class:~ontocast.onto.ontology.Ontology:
constructing one recomputes hash from the graph and defaults version,
so a graph-less Ontology would carry fabricated lineage values.
Attributes:
| Name | Type | Description |
|---|---|---|
graph_uri |
str
|
Named graph URI holding this ontology version. May be the base
ontology IRI or a versioned form ( |
Source code in ontocast/onto/ontology_header.py
Attributes¶
graph_uri = Field(default='', description='Named graph URI holding this ontology version.')
class-attribute
instance-attribute
¶
Methods:¶
from_ontology(ontology)
classmethod
¶
Build a header from a materialized ontology.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ontology
|
Ontology
|
The ontology whose metadata should be captured. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
OntologyHeader |
OntologyHeader
|
Header carrying the ontology's lineage metadata, with |
OntologyHeader
|
|