Commit 6aa8377
committed
fix: register directory-loaded library files with OntoEnv
_load_shapes_from_directory loaded every file in a library directory
straight into the shape collection's graph via Oxigraph's native
loader, but never told OntoEnv these ontologies exist. Any owl:imports
referencing them - e.g. mediumOffice_constraints.ttl importing
urn:ashrae/g36, which guideline36.ttl declares - couldn't be resolved
by name, so OntoEnv fell back to treating the import as a relative
file path and failed with "No such file or directory".
Register each file with the ontology environment alongside the
existing bulk graph load. Files without their own owl:Ontology header
(guideline36's per-equipment fragments) just get a harmless synthetic
name; files that do declare an identity (Brick's imports/*.ttl, which
import each other) become resolvable the same way single-file
Library.load(ontology_graph=...) already registers them.
Verified: without this change, missing_imports() on a graph importing
urn:ashrae/g36 reports it as missing after loading the guideline36
directory; with it, the import resolves.1 parent 0128086 commit 6aa8377
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
379 | 391 | | |
380 | 392 | | |
381 | 393 | | |
| |||
0 commit comments