OpenWork-NZ / core-geonetwork

GeoNetwork repository
http://geonetwork-opensource.org/
GNU General Public License v2.0
0 stars 3 forks source link

Create a sitemap that indexes the metadata record landing page, and embed JSON into metadata page #98

Open ghost opened 1 year ago

ghost commented 1 year ago

To enable Google Datasets proper access to our metadata with a new sitemap and embedding the json into the metadata page.

When a metadata record is returned by Google Datasets, it provides a link to our catalogue's record:

image

However, since the site map we provided to Google is the jsonld sitemap, it means that following the link takes the user to the metadata's JSON instead of the metadata landing page at our catalogue. This is perfect for POLDER, but doesn't it's undesirable for Google (an oversight on my behalf).

The AAD and other repositories get this to work by providing Google with a sitemap of the metadata landing pages. See AAD as an example: https://data.aad.gov.au/sitemap.xml

And have the JSON embedded on the metadata page:

image

See SEANOE as another example: https://www.seanoe.org/sitemap.xml view-source:https://www.seanoe.org/data/00629/74128/

ghost commented 1 year ago

I came across this GeoNetwork Catalogue at the University of Tasmania: https://metadata.imas.utas.edu.au/geonetwork/srv/eng/catalog.search#/home

And they've embedded the JSON into their metadata page: view-source:https://metadata.imas.utas.edu.au/geonetwork/srv/api/records/01b862fd-6f8d-4d9a-8bd8-ad8567e498d9?language=all

See their sitemap here: https://metadata.imas.utas.edu.au/geonetwork/srv/api/0.1/sitemap

They're also referencing their API version of the record: image

However, this seems crazy when the full metadata record is more complete and better presented: https://metadata.imas.utas.edu.au/geonetwork/srv/eng/catalog.search#/metadata/01b862fd-6f8d-4d9a-8bd8-ad8567e498d9

ghost commented 1 year ago

I've just noticed that you're already doing this on the geodata.nz catalogue: view-source:https://geodata.nz/geonetwork/srv/api/records/6c0642f4-8cc7-413c-9e74-4d8bc99c8edf

ghost commented 1 year ago

And have found that there is already a sitemap available for the API record: https://ant-nz.geodata.nz/geonetwork/srv/api/records/056b6470-3cab-4f65-abf8-063a869e440b?language=all

The mark-up for your catalogue's API record is so much better than our catalogue (it's just as good as the full metadata record): https://geodata.nz/geonetwork/srv/api/records/6c0642f4-8cc7-413c-9e74-4d8bc99c8edf https://geodata.nz/geonetwork/srv/eng/catalog.search#/metadata/6c0642f4-8cc7-413c-9e74-4d8bc99c8edf

Is there an issue with the way this has been implemented on our catalogue? We won't require a sitemap to the full metadata record if our API metadata version is fixed.

ByronCinNZ commented 1 year ago

The issue appears to be due to differences between how metadata display is handled in ISO19139 vs ISO19115-3. Will update code (in the file .../formatter/xsl-view/view.xsl) to fix. These changes will be pushed to core GeoNetwork