Closed wangf1122 closed 11 months ago
To check if this is a better way, hiding the service value for datasets: https://github.com/geonetwork/core-geonetwork/blob/376e9e6801a493d3163f60f1461317c142537e1a/schemas/iso19139/src/main/plugin/iso19139/loc/eng/codelists.xml#L1644-L1645
@josegar74
The hiding way works as well (see service removed from the regular gmd:MD_ScopeCode). I have commit some code and here is the end result. If you are ok with this approach, I will do some final clean up to remove those temporary comment out code.
See this service example:
The hierarchyLevel will be disabled like this:
The issue is service level metadata has validation of
https://github.com/metadata101/iso19139.ca.HNAP/blob/6066bd8a1504feebf2291d5945a6428d6c002c27/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-common.sch#L410-L417
If this metadata was created as dataset which has no such //srv:SV_ServiceIdentification , then switch to service in the hierarchy level, there will be validation error happens.
It's not recommended to switch the hierarchyLevel, therefore disabling it from edit mode is the best option.