geonetwork / geonetwork/core-geonetwork

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

Open
#6,595 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
521
Forks
515
Avg merge
6d 13h
Merged PRs (30d)
19

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the /srv/api/records/DATASETUUID/featureCatalog endpoint and reproduce the empty {"decodeMap":{}} response using imported dataset and ISO 19110 feature-catalog metadata. Compare the version 4 behavior with the described 3.12.x local-catalog lookup; done means the API returns the feature attributes for a linked remote catalog when its metadata is available locally.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.