[BUG] OWLGenerator silently drops all datatype properties and subclass relationships when using the standard user-facing ontology dict
bug
Bug 1 — "name" ignored, only "label" read
Line 197 / 217: cls.get("label") / prop.get("label")
The user-facing dict (and the reference notebook) uses "name". The SHACL generator correctly falls back: cls.get("label") or cls.get("name"). The OWL generator doesn't.
Bug 2 — "subclassOf" key mismatch
Line 203: cls.get("subClassOf") (capital C)
The reference notebook and SHACL generator use "subclassOf" (lowercase). Nothing is ever found.
Bug 3 — "type": "datatype" not recognised
Line 240: elif prop.get("type") == "data"
The user-facing type value is "datatype". The SHACL generator correctly accepts all three variants: "datatype", "data", "DatatypeProperty". The OWL generator only matches "data", so all datatype properties are silently skipped.
Bug 4 — string "domain" iterates over characters
Lines 221 / 251: domains = prop.get("domain", []) then for domain in domains:
The user-facing dict stores domain as a string (a class name). Iterating a string yields individual characters. The SHACL generator handles this correctly with isinstance(domain, list) / isinstance(domain, str) guards.
关闭于 2026-04-11 0 条评论