Closed alko-k closed 3 years ago
I can't easily do this because I'm just "passing through" the RDF for Concept & Collection from your triplestore. So, the XML/RDf result for C30 that looks like this:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:j.0="http://purl.org/dc/terms/"
xmlns:j.1="http://www.isotc211.org/schemas/grg/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:j.2="http://purl.org/pav/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:j.3="http://rdfs.org/ns/void#">
<skos:Collection rdf:about="http://vocab.nerc.ac.uk/collection/C30/current/">
<skos:member>
<skos:Concept rdf:about="http://vocab.nerc.ac.uk/collection/C30/current/EC/">
<skos:note xml:lang="en">accepted</skos:note>
<j.2:version>1</j.2:version>
<j.2:hasCurrentVersion rdf:resource="http://vocab.nerc.ac.uk/collection/C30/current/EC/1/"/>
<j.0:date>2009-07-29 11:45:57.0</j.0:date>
<dc:identifier>SDN:C30::EC</dc:identifier>
<skos:prefLabel xml:lang="en">European Commission</skos:prefLabel>
<j.3:inDataset rdf:resource="http://vocab.nerc.ac.uk/.well-known/void"/>
<skos:notation>SDN:C30::EC</skos:notation>
<j.2:authoredOn>2009-07-29 11:45:57.0</j.2:authoredOn>
<owl:versionInfo>1</owl:versionInfo>
<skos:definition xml:lang="en">Governance for vocabularies used in INSPIRE spatial data infrastructure metadata</skos:definition>
<skos:altLabel>EC</skos:altLabel>
<j.0:identifier>SDN:C30::EC</j.0:identifier>
<owl:deprecated>false</owl:deprecated>
</skos:Concept>
</skos:member>
<skos:member>
<skos:Concept rdf:about="http://vocab.nerc.ac.uk/collection/C30/current/IHO/">
This is exactly the same as using DESCRIBE <http://vocab.nerc.ac.uk/collection/C30/current/>
directly on the SPARQL endpoint with the results set to RDF/XML.
When I do a DESCRIBE with a Turtle result, I get this:
<http://vocab.nerc.ac.uk/collection/C30/current/>
a <http://www.w3.org/2004/02/skos/core#Collection> ;
<http://www.w3.org/2000/01/rdf-schema#comment>
"Governance for vocabularies used within the data centre" ;
<http://purl.org/dc/terms/alternative>
"Vocabulary governance" ;
<http://purl.org/dc/terms/creator>
...
See that full URIs for PAV, SKOS etc. are used, not prefixed CURIES.
These results mean that the graph, as sent from the SPARQL endpoint, doesn't know what the prefixes for SKOS, PAV etc are.
If I intercept this graph to add prefixes then I will have to process the whole thing in memory and this will be unfeasably slow for P01 etc.
Best is for your back-end to add system to bind SKOS, PAV etc within the triplestore. Then whenever it exports data, the namespaces will be bound.
Ii have resolved this at the Concept level with all Concept elements having good prefixes like SKOS, PAV etc.:
This is because I do parse the RDF I receive for an individual Concept and add these prefixes:
prefixes = {
"dc": "http://purl.org/dc/terms/",
"dce": "http://purl.org/dc/elements/1.1/",
"grg": "http://www.isotc211.org/schemas/grg/",
"owl": "http://www.w3.org/2002/07/owl#",
"pav": "http://purl.org/pav/",
"skos": "http://www.w3.org/2004/02/skos/core#",
"void": "http://rdfs.org/ns/void#",
}
But, as I said above, I can't do this for a whole Collection.
@nicholascar It is great that the RDF includes all properties for collections and classes. I identified some namespace issues that would need changing and are listed below:
Concept level (add the right namespaces) <j.2:version>1</j.2:version> <j.2:hasCurrentVersion rdf:resource="http://vocab.nerc.ac.uk/collection/C30/current/EC/1/" /> <j.0:date>2009-07-29 11:45:57.0</j.0:date> <j.3:inDataset rdf:resource="http://vocab.nerc.ac.uk/.well-known/void" /> <j.2:authoredOn>2009-07-29 11:45:57.0</j.2:authoredOn> <j.0:identifier>SDN:C30::EC</j.0:identifier>
Collection level (add the right namespaces)
<j.0:publisher>Natural Environment Research Council</j.0:publisher> <j.1:RE_RegisterManager>British Oceanographic Data Centre</j.1:RE_RegisterManager> <j.0:description>Bodies responsible for the intellectual control of vocabularies served by the NDG/SeaDataNet vocabulary server.</j.0:description> <j.0:creator>British Oceanographic Data Centre</j.0:creator>