Skip to content

Commit

Permalink
blank node fix
Browse files Browse the repository at this point in the history
  • Loading branch information
situx committed Jan 20, 2024
1 parent ac96bd2 commit 2fdd6c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sparqlunicorn_ontdoc/docgeneration.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,10 @@ def getClassTree(self,graph, uritolabel,classidset,uritotreeitem):
for res in results:
#print(res)
if "_:" not in str(res["subject"]) and str(res["subject"]).startswith("http"):
ress[str(res["subject"])] = {"super": res["supertype"], "label": res["label"]}
if "_:" not in str(res["supertype"]) and str(res["supertype"]).startswith("http"):
ress[str(res["subject"])] = {"super": res["supertype"], "label": res["label"]}
else:
ress[str(res["subject"])] = {"super": None, "label": res["label"]}
#print(ress)
for cls in ress:
for obj in graph.subjects(URIRef(self.typeproperty), URIRef(cls),True):
Expand Down

0 comments on commit 2fdd6c4

Please sign in to comment.