Commit 12e5db6
committed
feat(lance-graph-ontology): seed NamespaceRegistry with bO-* upstream vocabs
Companion to PR #407 (merged). Expands `NamespaceRegistry::seed_defaults`
from 16 to 29 entries, registering the 13 external vocabularies that
PR #407 added hydrators for. This is the O(1) IRI ↔ context_id matching
table backed by `lance_cache.rs`'s Lance dataset; consumers like
smb-office-rs and woa-rs lookup by namespace shortname instead of
hand-rolling slot constants.
Why this lives in lance-graph-ontology, not in OGIT:
- Public OWL/RDF source files stay pristine in data/ontologies/
(DOLCE+DUL, FIBO-FND/BE, OWL-Time, PROV-O, QUDT, schema.org, SKOS,
ZUGFeRD CII XSDs + Schematron). Modifying them taints downstream use.
- The OGIT repo is authoritative for namespace registrations but adding
new TTL files there with hand-picked contextIds would be drift.
- The matching table belongs in the CLIENT (lance-graph-ontology), keyed
by namespace shortname, persisted via the existing lance_cache layer.
- Per user direction 2026-05-21: "expand always but drift is probably bad"
+ "deinterlace them locally and keep that matching table in a lance
table for O(1) and check what lance-graph-ontology has in regards"
→ expansion lives here, OGIT untouched.
Allocation:
ID Namespace PR / Hydrator
─────────────────────────────────────────────────────────
0 SMB (pre-existing)
1 WorkOrder (pre-existing)
2 Healthcare (pre-existing)
3 Network (pre-existing)
4 EmailCorrespondance (pre-existing)
5 SharePoint (pre-existing)
10-19 Medical/<sub> (pre-existing, dense)
20 Foundation/DOLCE-DUL bO-1 hydrate_dolce
21 Foundation/OWL-Time bO-2 hydrate_owltime
22 Foundation/PROV-O bO-3 hydrate_provo
23 Foundation/QUDT bO-4 hydrate_qudt
24 Foundation/schema-org bO-8 hydrate_schemaorg
25 Foundation/SKOS bO-5 hydrate_skos
30 FinancialAccounting/FIBO-FND bO-6 hydrate_fibo_fnd
31 FinancialAccounting/FIBO-BE bO-7 hydrate_fibo_be
32 FinancialAccounting/ZUGFeRD bO-16 hydrate_zugferd
33 FinancialAccounting/ZUGFeRD-Rules bO-15 hydrate_zugferd_rules
34 FinancialAccounting/SKR03 bO-13 hydrate_skr03
35 FinancialAccounting/SKR04 bO-13 hydrate_skr04
36 FinancialAccounting/SKR03-Bau bO-13 hydrate_skr03_bau
Allocation policy matches the existing Medical/<sub> pattern: dense
within family-range, gaps between ranges left as expansion room.
`allocate()` continues to fill gaps 6..=9 and 26..=29 first, then 37+.
Notes:
- `next_free_id` doc-comment updated to reflect the new seed layout.
First dynamic id is now 6 (was already 6 in practice; the prior
comment said "20" which was off by 14).
- Three regression tests updated:
* `seed_defaults_has_sixteen_entries` → `_has_twenty_nine_entries`
* `seed_defaults_assigns_canonical_ids` adds spot-checks at 20/25/30/34/35/36
* `allocate_skips_to_first_unused_id` len assertion 16 → 29
- One integration test (`tests/context_id_test.rs`) updated to match.
All 116 lance-graph-ontology tests pass; clippy clean (5 pre-existing
oxrdf deprecation warnings, no new); downstream consumers
(callcenter, consumer-conformance, cognitive-shader-driver) build clean.1 parent 2e3dd48 commit 12e5db6
2 files changed
Lines changed: 62 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
111 | 131 | | |
112 | 132 | | |
113 | 133 | | |
| |||
147 | 167 | | |
148 | 168 | | |
149 | 169 | | |
150 | | - | |
151 | | - | |
152 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
153 | 176 | | |
154 | 177 | | |
155 | 178 | | |
| |||
165 | 188 | | |
166 | 189 | | |
167 | 190 | | |
168 | | - | |
| 191 | + | |
169 | 192 | | |
170 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
171 | 200 | | |
172 | 201 | | |
173 | 202 | | |
| |||
183 | 212 | | |
184 | 213 | | |
185 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
186 | 224 | | |
187 | 225 | | |
188 | 226 | | |
189 | 227 | | |
190 | 228 | | |
191 | | - | |
| 229 | + | |
192 | 230 | | |
193 | 231 | | |
194 | 232 | | |
195 | 233 | | |
196 | | - | |
| 234 | + | |
197 | 235 | | |
198 | 236 | | |
199 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
| |||
88 | 100 | | |
89 | 101 | | |
90 | 102 | | |
91 | | - | |
| 103 | + | |
| 104 | + | |
92 | 105 | | |
93 | 106 | | |
94 | 107 | | |
| |||
0 commit comments