Skip to content

Commit

Permalink
namespace to topic
Browse files Browse the repository at this point in the history
  • Loading branch information
situx committed Jan 20, 2024
1 parent 8ce292e commit a19eb9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/sparqlunicorn_ontdoc/docgeneration.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,8 @@ def createVoidDataset(self,dsname,numtriples,numclasses,numinds,numpredicates,nu
URIRef(self.deploypath+"/index.ttl")))
g.add((URIRef(voidds), URIRef("http://rdfs.org/ns/void#feature"),
URIRef("http://www.w3.org/ns/formats/Turtle")))
g.add((URIRef(voidds), URIRef("http://rdfs.org/ns/void#feature"),
URIRef("http://www.w3.org/ns/formats/RDFa")))
g.add((URIRef(voidds), URIRef("http://rdfs.org/ns/void#classes"),
Literal(numclasses,datatype="http://www.w3.org/2001/XMLSchema#integer")))
g.add((URIRef(voidds), URIRef("http://rdfs.org/ns/void#entities"),
Expand All @@ -617,8 +619,8 @@ def createVoidDataset(self,dsname,numtriples,numclasses,numinds,numpredicates,nu
for ns_prefix, namespace in g.namespaces():
g.add((URIRef(voidds), URIRef("http://rdfs.org/ns/void#vocabulary"),
URIRef(namespace)))
if namespace in DocConfig.namespaceToTopic:
for entry in DocConfig.namespaceToTopic[namespace]:
if str(namespace) in DocConfig.namespaceToTopic:
for entry in DocConfig.namespaceToTopic[str(namespace)]:
g.add((URIRef(voidds), URIRef("http://purl.org/dc/terms/subject"),
URIRef(DocConfig.namespaceToTopic[entry])))
g.serialize(self.outpath+"/void.ttl", encoding="utf-8")
Expand Down

0 comments on commit a19eb9d

Please sign in to comment.