ontocast.onto.content_unit¶
ContentUnit
¶
Bases: SourceUnit
A processing unit that extends source data with mutable output fields.
Source code in ontocast/onto/content_unit.py
generated_at_iso
property
¶
Get generated timestamp in ISO format.
Returns:
| Name | Type | Description |
|---|---|---|
str |
Timestamp in ISO format. |
SourceUnit
¶
Bases: BaseModel
Immutable source unit identity and input text.
Attributes:
| Name | Type | Description |
|---|---|---|
text |
str
|
Source text content for this unit. |
index |
int
|
Position of this unit in the source document. |
hid |
str
|
A stable hash id derived from text. |
doc_iri |
URIRef
|
IRI of parent document. |
type |
OutputType
|
Type of content unit (facts or ontology). |
Source code in ontocast/onto/content_unit.py
hid
property
¶
Stable hash id generated from source text.
iri
property
¶
Get the base IRI for this unit.
Returns:
| Name | Type | Description |
|---|---|---|
str |
The base unit IRI. |
iri_absolute
property
¶
Get the absolute IRI for this unit.
Returns:
| Name | Type | Description |
|---|---|---|
str |
The unit IRI. |
namespace
property
¶
Get the namespace for this unit.
Returns:
| Name | Type | Description |
|---|---|---|
str |
The unit namespace. |