plazi / gg2rdf

A tool to transform golden gate XML to RDF turtle
MIT License
2 stars 1 forks source link

Link to catalogueoflife rather than literal dwc:ID-Col #10

Closed retog closed 7 months ago

retog commented 7 months ago

The RDF currently use an undefined property http://rs.tdwg.org/dwc/terms/ID-Col pointing to literal representing the catalogueoflife ID. Instead it should use a defined property an point to the catalogueoflife URi (e.g. https://www.catalogueoflife.org/data/taxon/35X2)

retog commented 7 months ago

Finding 105439 statement with dwc:ID-CoL as predicate, but not where it is coming from.

retog commented 7 months ago

This line https://github.com/plazi/treatments-rdf/blob/f2a3f480cc10c0dbd937563f74b1a362682bc57d/data/00/49/C9/0049C912FFADAE16FC92FE733896F55F.ttl#L39 appears to have been added just 3 months ago.

retog commented 7 months ago

It appears the property name is taken from the XML attribute name of the taxonomicName Element.

Possibly here: https://github.com/plazi/gg2rdf/blob/4875932ecb21c9592f1ce7040af8f56090d0f5a2/src/gg2rdf.xslt#L579

retog commented 7 months ago

The XSLT has been adapted. Left to be done is a SPARQL-Update to change the existing RDF.

retog commented 7 months ago
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX dwc: <http://rs.tdwg.org/dwc/terms/>
INSERT {?g {?s rdfs:seeAlso ?uri} } WHERE {GRAPH ?g {?s dwc:ID-CoL ?o} BIND(iri(concat("https://www.catalogueoflife.org/data/taxon/",?o)) AS ?uri) }
retog commented 7 months ago

@nleanba did you manage to run the SPARQL to update the existing

retog commented 7 months ago

The now generated RDF contains "rdf:seeAlso" rather than "rdfs:seeAlso" https://github.com/plazi/gg2rdf/commit/2f1484edbec6c41ffe11840b30a8b3ea25bf5c27 was however correct.

nleanba commented 7 months ago

@nleanba did you manage to run the SPARQL to update the existing

@retog hat do you mean by that exactly?