1

I am using this documentation https://geonetwork-opensource.org/manuals/2.10.4/eng/developer/xml_services/metadata_xml_search_retrieve.html to search for XML metadata in my local GeoNetwork. Can I force GeoNetwork to return metadata title in xml.search response <geonet:info> element? Is it possible to do request that would return all metadata records like this

curl -X POST -u user:pass http://localhost:8080/geonetwork/srv/eng/xml.search

and would also return metadata title in response?

I'd like to be able to check if metadata with one of the titles from some group I'd like to insert into GeoNetwork is already in GeoNetwork. If so, remove it from GeoNetwork or just not allow to insert metadata with the same title again. There might many files to insert, so I don't think that search for specific title is a good option for me.

Or maybe is there a way to enforce unique metadata title in Geonetwork. By default, in my case, it doesnt't allow to insert metadata with the same UUID. Could this be done for title? I could provide more details if needed. Or maybe this looks like some kind of bad approach?

1
  • 1
    AFAIK, you can't enforce unique title on a record in GN. The uniqueness of any record is only dependent on its unique 'file' identifier. If harvesting from multiple sources, you should expect duplicate titles; it's not an error.
    – nmtoken
    Commented Sep 17, 2020 at 6:29

1 Answer 1

0

This is what I came up with (too long for comment). Feels like this is specific to the system I am working on. My GN is storing historical forecast data, which eventually might get recalculated and then again and so on. That's why I'd like to have this functionality to remove the metadata and insert new metadata for the same forecast period. The best option would be to find by tag gmd:timePeriod or gml:beginPosition. I've tried to use CSW GetRecords POST request and specify tag PropertyIs[Greater|Less]ThanOrEqualTo, like in this topic http://osgeo-org.1560.x6.nabble.com/CSW-GetRecords-filter-time-range-and-polygon-td3860324.html, but it returns whole XML metadata files (not the list), which I assumed could be to big if there were hundreds of matching files. List of all metadata would be probably much smaller.

So far I'd be using metadata UUIDs to check GN and my other database and remove those metadata from GN that are not present in my other database, as this database would contain all valid forecast information.

Also, this answer helped in getting list of all metadata, including UUIDs, from GN. Search for all data in GeoNetwork

1
  • I would view it like, you have the raw data and associated metadata, a forecast and a metadata record, a new forecast and a new set of metadata. You shouldn't delete the old metadata record, just because you have a new forecast. You may have a third metadata record for latest forecast and then you would update that metadata record. Generally once minted you should keep the metadata record with it's unique identifier; it becomes a permanent reference to the dataset that people may cite, or refer back to.
    – nmtoken
    Commented Oct 1, 2021 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.