geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
433 stars 489 forks source link

use localised title of thesaurus in keyword picker #3843

Closed pvgenuchten closed 8 months ago

pvgenuchten commented 5 years ago

When importing thesaurus from inspire registry

Currently when selecting a keyword from that thesaurus, gn uses the english title of the thesaurus in the thesaurus reference for the keyword in metadata. In stead it should use the localised title same as metadata language

<gmd:descriptiveKeywords>
        <gmd:MD_Keywords>
          <gmd:keyword>
            <gmx:Anchor xmlns:gmx="http://www.isotc211.org/2005/gmx" xlink:href="http://inspire.ec.europa.eu/metadata-codelist/PriorityDataset/HabitatTypesRange-dir-1992-43" xmlns:xlink="http://www.w3.org/1999/xlink">
              Verspreidingsgebied van habitattypen (Habitatrichtlijn)
            </gmx:Anchor>
          </gmd:keyword>
          <gmd:thesaurusName>
            <gmd:CI_Citation>
              <gmd:title>
                <gmx:Anchor xmlns:gmx="http://www.isotc211.org/2005/gmx" xlink:href="http://inspire.ec.europa.eu/metadata-codelist/PriorityDataset" xmlns:xlink="http://www.w3.org/1999/xlink">
                  INSPIRE prioritaire dataset
                </gmx:Anchor>
              </gmd:title>
              <gmd:date>
                <gmd:CI_Date>
                  <gmd:date>
                    <gco:Date xmlns:gco="http://www.isotc211.org/2005/gco">
                      2018-04-04
                    </gco:Date>
                  </gmd:date>
                  <gmd:dateType>
                    <gmd:CI_DateTypeCode codeListValue="publication" codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode"/>
                  </gmd:dateType>
                </gmd:CI_Date>
              </gmd:date>
            </gmd:CI_Citation>
          </gmd:thesaurusName>
        </gmd:MD_Keywords>
      </gmd:descriptiveKeywords>
fxprunayre commented 5 years ago

For this we can also remove that https://github.com/geonetwork/core-geonetwork/blob/master/core/src/main/java/org/fao/geonet/kernel/ThesaurusManager.java#L426 which is looking for thesaurus titles in loc files (not sure why and who is using that ? As it is now, if thesaurus is not found, it will not be cached so we are probably spending lot of time here for nothing) but it may be more relevant to store multilingual thesaurus titles in the SKOS files and use translations when available ?