Skip to content

Commit

Permalink
Properly handle owl:Thing as parent class in generator
Browse files Browse the repository at this point in the history
Signed-off-by: Holger Frydrych <[email protected]>
  • Loading branch information
fholger committed Nov 17, 2023
1 parent 722e0a8 commit 036ab6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev/gen_model_to_rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def is_literal_type(self, typename: str, namespace_name: str, model: dict) -> bo
if not clazz:
return True
parent_class = clazz["metadata"].get("SubclassOf") or "none"
if parent_class == "none" or parent_class.startswith("xsd:"):
if parent_class == "none" or parent_class.startswith("xsd:") or parent_class.startswith("owl:"):
return not clazz["properties"]
return False

Expand All @@ -245,7 +245,7 @@ def prop_conversion_code(self, typename: str, namespace_name: str, model: dict)

def handle_class(self, output_file: IO[str], clazz: dict, namespace_name: str, model: dict):
parent_class = clazz["metadata"].get("SubclassOf")
if parent_class == "none":
if parent_class == "none" or parent_class == "owl:Thing":
parent_class = None
if parent_class == "xsd:string":
return
Expand Down

0 comments on commit 036ab6b

Please sign in to comment.