metadata101 / iso19139.ca.HNAP

ISO Harmonized North American Profile (HNAP)
GNU General Public License v2.0
4 stars 19 forks source link

disable hierarchyLevel field #334

Closed wangf1122 closed 11 months ago

wangf1122 commented 1 year ago

The hierarchyLevel will be disabled like this:

image

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.

image

It's not recommended to switch the hierarchyLevel, therefore disabling it from edit mode is the best option.

josegar74 commented 1 year 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

wangf1122 commented 1 year ago

@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.

image

See this service example:

image