Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
situx committed Oct 25, 2024
1 parent 666a117 commit 661d790
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/srsbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,23 @@
if "Definition" in row and row["Definition"]!="":
gcore.add((URIRef(row["Concept"].replace(curprefix+":",curns)),SKOS.definition,Literal(row["Definition"],lang="en")))
if "SuperClass" in row and row["SuperClass"]!="":
gcore.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.subClassOf,URIRef(row["SuperClass"].replace("geosrs:",geocrsNS))))
if " " in row["SuperClass"]:
for spl in row["SuperClass"]:
gcore.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.subClassOf,URIRef(spl.replace("geosrs:",geocrsNS))))
else:
gcore.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.subClassOf,URIRef(row["SuperClass"].replace("geosrs:",geocrsNS))))
else:
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDF.type,OWL.Class))
if "Label" in row and row["Label"]!="":
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.label,Literal(row["Label"],lang="en")))
if "Definition" in row and row["Definition"]!="":
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),SKOS.definition,Literal(row["Definition"],lang="en")))
if "SuperClass" in row and row["SuperClass"]!="":
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.subClassOf,URIRef(row["SuperClass"].replace(curprefix+":",curns))))
if " " in row["SuperClass"]:
for spl in row["SuperClass"]:
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.subClassOf,URIRef(spl.replace(curprefix+":",curns))))
else:
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.subClassOf,URIRef(row["SuperClass"].replace(curprefix+":",curns))))
else:
continue

Expand Down

0 comments on commit 661d790

Please sign in to comment.