metadata101 / iso19139.ca.HNAP

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

Metadata status not correct in geonetwork 4.2 #368

Open ianwallen opened 7 months ago

ianwallen commented 7 months ago

Metadata status not correct in geonetwork 4.2

In 3.12 it looks like this image

In 4.2 it looks like this image

Looks like it is using the code instead of the label?

josegar74 commented 7 months ago

@ianwallen you need to change this section to load the codelist values from HNAP:

https://github.com/geonetwork/core-geonetwork/blob/a9a7f04e6801926538672835b59f310bf6d59d57/web/src/main/webResources/WEB-INF/config-spring-geonetwork.xml#L266-L305

Change:

<util:map id="translationPacks">
    <entry key="gnui">
      <util:list>
        <value>json/gnui</value>
        <value>standards/iso19139.ca.HNAP/codelists/gmd:MD_TopicCategoryCode+gmd:CI_DateTypeCode+gmd:MD_ScopeCode+gmd:MD_MaintenanceFrequencyCode+gmd:MD_ProgressCode+gmd:DS_InitiativeTypeCode+gmd:MD_SpatialRepresentationTypeCode+gmd:CI_RoleCode</value>
        <value>standards/iso19139/codelists/gmd:CI_RoleCode</value>
        <value>db/MetadataCategory+Operation+Group+StatusValue+Source+Translations</value>
      </util:list>
    </entry>
    <entry key="login">
      <util:list>
        <value>json/core</value>
      </util:list>
    </entry>
    <entry key="search">
      <util:list>
        <value>json/core+search+v4+custom</value>
        <value>json/schemas</value>
        <value>standards/iso19139.ca.HNAP/codelists/gmd:MD_TopicCategoryCode+gmd:CI_DateTypeCode+gmd:MD_ScopeCode+gmd:MD_MaintenanceFrequencyCode+gmd:MD_ProgressCode+gmd:MD_SpatialRepresentationTypeCode</value>
        <value>standards/iso19139/codelists/gmd:CI_RoleCode</value>
        <value>standards/iso19115-3.2018/codelists/indeterminatePosition+mri:DS_InitiativeTypeCode+mri:DS_AssociationTypeCode</value>
        <value>db/MetadataCategory+Operation+Group+StatusValue+Source+Translations</value>
      </util:list>
    </entry>
    <entry key="admin">
      <util:list>
        <value>json/core+search+admin+v4+custom</value>
        <value>json/schemas</value>
        <value>db/MetadataCategory+Operation+Group+StatusValue+Source+Translations</value>
      </util:list>
    </entry>
    <entry key="editor">
      <util:list>
        <value>json/core+search+editor+v4+custom</value>
        <value>json/schemas</value>
        <value>standards/iso19139.ca.HNAP/codelists/gmd:MD_TopicCategoryCode+gmd:CI_DateTypeCode+gmd:MD_ScopeCode+gmd:MD_MaintenanceFrequencyCode+gmd:MD_ProgressCode+gmd:MD_SpatialRepresentationTypeCode</value>
        <value>standards/iso19139/codelists/gmd:CI_RoleCode</value>
        <value>standards/iso19115-3.2018/codelists/indeterminatePosition+mri:DS_InitiativeTypeCode+mri:DS_AssociationTypeCode</value>
        <value>db/MetadataCategory+Operation+Group+StatusValue+Source+Translations</value>
      </util:list>
    </entry>
  </util:map>
ianwallen commented 7 months ago

This is not documented in the readme. https://github.com/metadata101/iso19139.ca.HNAP/blob/4.2.x/README.md

It would also be nice if this could be automatically applied as part the schema installation (https://github.com/metadata101/iso19139.ca.HNAP/tree/4.2.x/src/main/java/ca/gc/schemas/iso19139hnap/init).