Hello,
I have the following script which I used to convert my spreadsheet to RDF using SPARQL. It is working fine for my initial purpose, but I would like to modify it a little bit so that it creates rdfs:label and skos:prefLabel for every class.
I got from the TopBraid discussion group by Bob DuCharme.
CONSTRUCT {
?newClass a owl:Class .
?newClass rdfs:subClassOf ?superClass .
?newLabel rdfs:label ?label .
?newLabel skos:prefLabel ?label .
}
WHERE {
?c a ss:Cell .
?c ss:row ?row .
?c ss:column ?col .
?c ss:cellContents ?contents .
FILTER (?row > 0) .
BIND ((?col - 1) AS ?parentCol) .
OPTIONAL {
?parent ss:row ?row .
?parent ss:column ?parentCol .
?parent ss:cellContents ?parentContents .
} .
BIND (IRI(fn:concat("http://www.mysample.com/", ?contents)) AS ?newClass) .
BIND (IRI(fn:concat("http://www.mysample.com/", ?parentContents)) AS ?superClass) .
}
asked
15 Nov '12, 17:03
OntoLearner
62●1●6
accept rate:
0%
What is your question?
original question for context - https://groups.google.com/forum/#!msg/topbraid-users/Ru14BQBiqZg/xtuNBOwjKbIJ