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
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&request=GetRecordById&version=2.0.2&outputSchema=http://www.isotc211.org/2005/gmd&elementSetName=full&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:
- Export a dataset metadata with a linkage to a feature catalog metadata (iso19110) and also the feature catalog metadata from another GeoNetwork.
- Import the both metadata locally.
- Use the API request http://localhost:8080/geonetwork/srv/api/records/DATASETUUID/featureCatalog?_content_type=json
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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