geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
430 stars 489 forks source link

<dcat:Distribution rdf:about= count and <dcat:Distribution rdf:resource= counts does not match in CSW service DCAT output #8415

Open ThomasG77 opened 1 month ago

ThomasG77 commented 1 month ago

I encounter this trouble in third party server we harvest on data.gouv.fr website. It's a GeoNetwork 4.2.3.SNAPSHOT

When you look at https://data.ofb.fr/catalogue/data-eaufrance/fre/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&outputSchema=http://www.w3.org/ns/dcat%23&ID=6d52ad99-7918-4814-a21e-5b7f8a6d7ab5 Here <dcat:Distribution rdf:about= count is 9 whereas <dcat:Distribution rdf:resource= count is 10 and reference to WFS service is not mentionned in <dcat:Distribution rdf:about= I compared to a more recent version of Geonetwork 4.4.6 with another dataset where <dcat:Distribution rdf:about= and <dcat:Distribution rdf:resource= count is the same e.g 5. https://apps.titellus.net/geonetwork/srv/fre/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&outputSchema=http://www.w3.org/ns/dcat%23&ID=a5dc5bc7-3c37-4783-9c41-27ce2f83f3ae

When I look at the same dataset metadata with xml formatter for the Geonetwork I harvest, I get both WMS and WFS correctly referenced https://data.ofb.fr/catalogue/data-eaufrance/api/records/6d52ad99-7918-4814-a21e-5b7f8a6d7ab5/formatters/xml?approved=true https://apps.titellus.net/geonetwork/srv/api/records/a5dc5bc7-3c37-4783-9c41-27ce2f83f3ae/formatters/xml?approved=true

My guess is that because the URL between WFS and WMS in my harvested Geonetwork is exactly the same e.g https://services.sandre.eaufrance.fr/geo/topage2022? the DCAT formatter drop it during the xslt transformation. It could be related to https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19139/src/main/plugin/iso19139/layout/tpl-rdf.xsl#L159-L161

cc @maudetes