Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
situx committed Jan 21, 2024
1 parent c90508a commit d6aac9d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sparqlunicorn_ontdoc/doc/docconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DocConfig:

#,"http://www.w3.org/ns/lemon/ontolex#Form":""

metadatanamespaces=["http://purl.org/dc/terms/","http://purl.org/dc/elements/1.1/","http://www.w3.org/ns/prov#","http://www.w3.org/ns/prov-o/","http://creativecommons.org/ns#","http://www.w3.org/ns/dcat#","http://purl.org/cerif/frapo/","http://www.lido-schema.org/"]
metadatanamespaces=["http://rdfs.org/ns/void#","http://purl.org/dc/terms/","http://purl.org/dc/elements/1.1/","http://www.w3.org/ns/prov#","http://www.w3.org/ns/prov-o/","http://creativecommons.org/ns#","http://www.w3.org/ns/dcat#","http://purl.org/cerif/frapo/","http://www.lido-schema.org/"]

collectionclasses = {
"http://www.w3.org/2006/vcard/ns#Group":"personcollection",
Expand Down
7 changes: 6 additions & 1 deletion src/sparqlunicorn_ontdoc/docgeneration.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ def generateOntDocForNameSpace(self, prefixnamespace,dataformat="HTML"):
res=self.getPropertyRelations(self.graph, outpath)
voidstats["http://rdfs.org/ns/void#properties"]=res["preds"]
voidstats["http://rdfs.org/ns/void#distinctObjects"]=res["objs"]
dsname=self.datasettitle
if dsname==None or dsname=="":
dsname="dataset"
voidds=prefixnamespace+dsname
if self.createColl:
self.graph=self.createCollections(self.graph,prefixnamespace)
if self.logoname!=None and self.logoname!="" and not self.logoname.startswith("http"):
Expand All @@ -302,7 +306,8 @@ def generateOntDocForNameSpace(self, prefixnamespace,dataformat="HTML"):
subjectstorender.add(sub)
label=DocUtils.shortenURI(str(sub))
restriction=False
ressubcls=""
self.graph.add((sub, URIRef("http://rdfs.org/ns/void#inDataset"),
URIRef(voidds)))
for tup in self.graph.predicate_objects(sub):
if str(tup[0]) in DocConfig.labelproperties:
labeltouri[str(tup[1])] = str(sub)
Expand Down
2 changes: 1 addition & 1 deletion src/sparqlunicorn_ontdoc/export/data/voidexporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class VoidExporter:
def createVoidDataset(dsname,prefixnamespace,deploypath,outpath,licenseuri,modtime,stats,startconcept=None):
g=Graph()
if dsname==None or dsname=="":
dsname="theds"
dsname="dataset"
voidds=prefixnamespace+dsname
g.add((URIRef(voidds),URIRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),URIRef("http://rdfs.org/ns/void#Dataset")))
g.add((URIRef(voidds), URIRef("http://www.w3.org/2000/01/rdf-schema#label"),
Expand Down

0 comments on commit d6aac9d

Please sign in to comment.