Fix type designator handling #180

Merged
christian-monch merged 2 commits from fix-type-designator-handling into master 2025-12-17 09:04:26 +00:00
3 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,12 @@
# 5.3.3 (2025-12-16)
## Bugfixes
- fix type designator handling in `RDFLibLoader.from_rdf_graph`. This fixes an
issue where subclasses of ranges, e.g. `dlidentifiers:Identifier`, were not
properly handled.
# 5.3.2 (2025-12-15)
## Bugfixes

View file

@ -1 +1 @@
__version__ = '5.3.2'
__version__ = '5.3.3'

View file

@ -125,8 +125,9 @@ def from_rdf_graph(
logger.info(f'Replacing {subject_class} with {type_classes}')
subject_class = type_classes[0].name
# PATCH >>>>>
if type_classes[0].class_uri is not None:
dict_obj[type_designator_slot.name] = type_classes[0].class_uri
type_class_iri = schemaview.get_uri(type_classes[0])
if type_class_iri is not None:
dict_obj[type_designator_slot.name] = type_class_iri
# PATCH <<<<<
# process all triples for this node
for (_, p, o) in graph.triples((subject, None, None)):