Skip to content

Conversation

@fxprunayre
Copy link
Member

@fxprunayre fxprunayre commented Oct 21, 2022

Mapping DCAT

Cleanup

Combine all XSLT producing RDF in order to have same output as former rdf.search service and CSW responses - trying to get last changes mainly made by @pvgenuchten.

CSW response was not containing referenced elements in response eg. Distribution, Concept, Org (maybe done on purpose?). Cf. #1407

eg.

Use Anchor for thesaurus and keywords

As we have Anchor support, use xlink:href when set on thesaurus and keywords. URI will point to registry applications (eg. Vocprez, R3gistry, LD-Registry) when defined and makes more sense than building custom internal URI.

ISO 19115-3 / CSW / Add support for DCAT output

Rely on the old 2012 ISO19139 mapping.

Test: Load an ISO19115-3 record eg. https://metawal.wallonie.be/geonetwork/srv/api/records/ea5f844f-2d61-4472-a75c-5fe7f322c123/formatters/xml then query using CSW http://localhost:8080/geonetwork/srv/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&ID=ea5f844f-2d61-4472-a75c-5fe7f322c123&outputSchema=http%3A%2F%2Fwww.w3.org%2Fns%2Fdcat%23&elementSetName=full

Using OGC API Records https://github.com/geonetwork/geonetwork-microservices/tree/main/modules/services/ogc-api-records is preferred. eg https://sextant.ifremer.fr/geonetwork/api/collections/main/items/e522f0b5-f090-40ea-8189-188be4e9849c?f=dcat

Main idea here is to avoid CSW errors in case of GetRecords query on catalogue mixing ISO19139 and 19115-3. BTW dublin core or ISO19110 have no mapping so may trigger exception. Filtering by documentStandard may still be required

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
                xmlns:gmd="http://www.isotc211.org/2005/gmd"
                service="CSW" version="2.0.2"
                resultType="results"
                outputSchema="http://www.w3.org/ns/dcat#">
  <csw:Query typeNames="gmd:MD_Metadata">
    <csw:ElementSetName>full</csw:ElementSetName>
    <csw:Constraint version="1.1.0">
      <Filter xmlns="http://www.opengis.net/ogc">
        <PropertyIsEqualTo>
          <PropertyName>documentStandard</PropertyName>
          <Literal>iso19139</Literal>
        </PropertyIsEqualTo>
      </Filter>
    </csw:Constraint>
  </csw:Query>
</csw:GetRecords>

Future work

  • Maybe add a conversion for dublin-core records ?

@fxprunayre fxprunayre added this to the 4.2.2 milestone Oct 21, 2022
@fxprunayre fxprunayre requested a review from josegar74 October 21, 2022 12:08
@fxprunayre fxprunayre changed the title Standard / ISO 19115-3 / CSW / Add support for DCAT output CSW / Improve DCAT support Oct 25, 2022
Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look fine. Also the test cases work, although is unclear if the result really validates, no easy to find a DCAT validator.

@fxprunayre fxprunayre merged commit 43b3c1e into main Nov 15, 2022
@fxprunayre fxprunayre deleted the iso19115-3-dcatcswoutput branch November 15, 2022 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants