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 fe3febc commit 48b3f6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/sparqlunicorn_ontdoc/docgeneration.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ def generateOntDocForNameSpace(self, prefixnamespace,dataformat="HTML"):
self.logoname=outpath+"/logo/logo."+self.logoname[self.logoname.rfind("."):]
self.updateProgressBar(0, 1, "Creating classtree and search index")
subjectstorender = set()
subjectstorender(URIRef(voidds))
for sub in self.graph.subjects(None,None,True):
if (prefixnamespace in sub and (isinstance(sub,URIRef)) or isinstance(sub,BNode)):
subjectstorender.add(sub)
Expand Down Expand Up @@ -352,7 +353,7 @@ def generateOntDocForNameSpace(self, prefixnamespace,dataformat="HTML"):
tree["core"]["data"].append(tr)
voidstats["http://rdfs.org/ns/void#classes"]=len(classidset)
voidstats["http://rdfs.org/ns/void#triples"] = len(self.graph)
voidgraph=VoidExporter.createVoidDataset(self.datasettitle,prefixnamespace,self.deploypath,self.outpath,self.licenseuri,self.modtime,voidstats,self.startconcept)
voidgraph=VoidExporter.createVoidDataset(self.datasettitle,prefixnamespace,self.deploypath,self.outpath,self.licenseuri,self.modtime,self.labellang,voidstats,self.startconcept)
self.voidstatshtml=VoidExporter.toHTML(voidstats,self.deploypath)
self.graph+=voidgraph
with open(outpath + "style.css", 'w', encoding='utf-8') as f:
Expand Down
5 changes: 4 additions & 1 deletion src/sparqlunicorn_ontdoc/export/data/voidexporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class VoidExporter:

@staticmethod
def createVoidDataset(dsname,prefixnamespace,deploypath,outpath,licenseuri,modtime,stats,startconcept=None):
def createVoidDataset(dsname,prefixnamespace,deploypath,outpath,licenseuri,modtime,language,stats,startconcept=None):
g=Graph()
if dsname==None or dsname=="":
dsname="dataset"
Expand All @@ -17,6 +17,9 @@ def createVoidDataset(dsname,prefixnamespace,deploypath,outpath,licenseuri,modti
Literal(dsname,lang="en")))
g.add((URIRef(voidds), URIRef("http://purl.org/dc/terms/title"),
Literal(dsname,lang="en")))
if language!=None and language!="":
g.add((URIRef(voidds), URIRef("http://purl.org/dc/elements/1.1/"),
URIRef("http://www.lexvo.org/page/iso639-1/"+str(language))))
g.add((URIRef(voidds), URIRef("http://purl.org/dc/terms/modified"),
Literal(modtime,datatype="http://www.w3.org/2001/XMLSchema#dateTime")))
if licenseuri!=None:
Expand Down

0 comments on commit 48b3f6a

Please sign in to comment.