core-geonetwork icon indicating copy to clipboard operation
core-geonetwork copied to clipboard

Metadata API to retrieve dataset feature catalog attributes returns an empty list when the feature catalog metadata it's a remote metadata

Open josegar74 opened this issue 2 years ago • 0 comments

Describe the bug

A dataset metadata that links to a feature catalogue, the linkage to the remote server is preserved, that is correct:

<gmd:featureCatalogueCitation uuidref="02d1436a-4f20-49f3-acca-eae72af916d7"
                                       xlink:href="https://REMOTESERVER/geonetwork/srv/dut/csw?service=CSW&amp;request=GetRecordById&amp;version=2.0.2&amp;outputSchema=http://www.isotc211.org/2005/gmd&amp;elementSetName=full&amp;id=02d1436a-4f20-49f3-acca-eae72af916d7"/>

But using the API to retrieve the dataset attributes, returns an empty list {"decodeMap":{}}:

http://localhost:8080/geonetwork/srv/api/records/DATASETUUID/featureCatalog?_content_type=json

To Reproduce

Steps to reproduce the behavior:

  1. Export a dataset metadata with a linkage to a feature catalog metadata (iso19110) and also the feature catalog metadata from another GeoNetwork.
  2. Import the both metadata locally.
  3. Use the API request http://localhost:8080/geonetwork/srv/api/records/DATASETUUID/featureCatalog?_content_type=json
  4. An empty list of attributed is returned:
{"decodeMap":{}}

Expected behavior

The list of attributes defined in the feature catalog metadata (iso19110) is returned.

Additional context

In version 3.12.x seems this was handled better, at least if the feature catalog metadata was imported also, the application seems it was checking for the local feature catalog metadata and returning the attributes. This is not the case in version 4.

josegar74 avatar Oct 07 '22 09:10 josegar74