ontocast.link.declarations¶
What the catalog declares about identity across documents.
Read from every catalog head, never from a document's retrieved context, so every document sees the same declarations whatever retrieval chose for it.
Attributes¶
Classes¶
IdentityDeclarations
¶
Bases: BaseModel
The catalog's identity declarations, read once per catalog state.
Attributes:
| Name | Type | Description |
|---|---|---|
globally_named |
dict[str, bool]
|
Each class with |
parents |
dict[str, frozenset[str]]
|
Each class's |
keys |
dict[str, tuple[tuple[str, ...], ...]]
|
Each class's |
inverse_functional |
frozenset[str]
|
Properties declared |
functional |
frozenset[str]
|
Properties the catalog caps at one value
( |
disjoint |
frozenset[frozenset[str]]
|
Class pairs declared disjoint. |
catalog_terms |
frozenset[str]
|
Every IRI the catalog declares or references. |
Source code in ontocast/link/declarations.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
Attributes¶
catalog_terms = frozenset()
class-attribute
instance-attribute
¶
declares_anything
property
¶
Whether any class or property can produce a link.
disjoint = frozenset()
class-attribute
instance-attribute
¶
functional = frozenset()
class-attribute
instance-attribute
¶
globally_named = Field(default_factory=dict)
class-attribute
instance-attribute
¶
inverse_functional = frozenset()
class-attribute
instance-attribute
¶
keys = Field(default_factory=dict)
class-attribute
instance-attribute
¶
model_config = ConfigDict(frozen=True)
class-attribute
instance-attribute
¶
parents = Field(default_factory=dict)
class-attribute
instance-attribute
¶
Methods:¶
ancestors(class_iri)
¶
class_iri and every class above it.
Source code in ontocast/link/declarations.py
are_disjoint(left_types, right_types)
¶
Whether some class of one typing is declared disjoint with one of the other.
Source code in ontocast/link/declarations.py
declaring_classes(types)
¶
The globally named classes an instance of types belongs to.
Walks up from each type and stops at the first class on each path that
states the annotation: true makes it a declaring class, false
stops the path.
Source code in ontocast/link/declarations.py
keys_for(types)
¶
Each (class, properties) key that applies to an instance of types.
Source code in ontocast/link/declarations.py
of(graphs)
classmethod
¶
The declarations stated across graphs.