metadata101 / iso19139.ca.HNAP

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

Multilingual resource filename not properly supported. #47

Open ianwallen opened 4 years ago

ianwallen commented 4 years ago

HNAP plugin currently does not support multilingual gmd:filename. It seems to be based on the older ECCC/FGP code.

We need to be able to upload multilingual thumbnails and other resources.

Here is what seems to be produced based on the samples.

      <gmd:graphicOverview>
        <gmd:MD_BrowseGraphic>
          <gmd:fileName>
            <gco:CharacterString>Ricker_Beam_Trawl_Transects_Map.JPG</gco:CharacterString>
          </gmd:fileName>
          <gmd:fileDescription>
            <gco:CharacterString>large_thumbnail</gco:CharacterString>
          </gmd:fileDescription>
        </gmd:MD_BrowseGraphic>
      </gmd:graphicOverview>
      <gmd:graphicOverview>
        <gmd:MD_BrowseGraphic>
          <gmd:fileName>
            <gco:CharacterString>Ricker_Beam_Trawl_Transects_Map.JPG</gco:CharacterString>
          </gmd:fileName>
          <gmd:fileDescription>
            <gco:CharacterString>large_thumbnail_fre</gco:CharacterString>
          </gmd:fileDescription>
        </gmd:MD_BrowseGraphic>
      </gmd:graphicOverview>

Problem

is not a real description of the resource. Instead it is a code. Of which the code are very specific to ECCC/FGP. There is no linkage between the first and second resource even though it is the same data in both French and English Much more difficult to validate that both English and French exists. Here is the changes that is suggested ``` Ricker_Beam_Trawl_Transects_Map.JPG Ricker_Beam_Trawl_Transects_Map.JPG Resource description Description de ressource ``` If anyone has any extra information to supply in regards to this issue then please add some comments.
josegar74 commented 4 years ago

Tested with ISO19139 metadata using the upload thumbnail dialog, but should be similar with HNAP:

add-thumbnail

The snippet created is the following:

         <gmd:graphicOverview>
            <gmd:MD_BrowseGraphic>
               <gmd:fileName>
                  <gco:CharacterString>https://vanilla.geocat.net/geonetwork/srv/api/records/b7917dee-b28e-4a69-9923-7931cfb78c6e/attachments/thumbnail.png</gco:CharacterString>
               </gmd:fileName>
               <gmd:fileDescription xsi:type="gmd:PT_FreeText_PropertyType">
                  <gco:CharacterString>thumbnail.png</gco:CharacterString>
                  <gmd:PT_FreeText>
                     <gmd:textGroup>
                        <gmd:LocalisedCharacterString locale="#EN">thumbnail.png</gmd:LocalisedCharacterString>
                     </gmd:textGroup>
                     <gmd:textGroup>
                        <gmd:LocalisedCharacterString locale="#FR">thumbnail.png</gmd:LocalisedCharacterString>
                     </gmd:textGroup>
                  </gmd:PT_FreeText>
               </gmd:fileDescription>
            </gmd:MD_BrowseGraphic>
         </gmd:graphicOverview>

The Resource name field is stored in the gmd:description field, while gmd:fileName stores the full (there's a migration task to handled existing metadata). Would that be fine?

What is not really supported, is to identify a thumbnail for specific language, so if are uploaded 2 thumbnails, the metadata detail page will display both independently of the language.

ianwallen commented 4 years ago

I as suggesting that the fileName should support multilingual such as the following.

     <gmd:fileName>
        <gco:CharacterString>Ricker_Beam_Trawl_Transects_Map.JPG</gco:CharacterString>
         <gmd:PT_FreeText>
          <gmd:textGroup>
            <gmd:LocalisedCharacterString xmlns="" locale="#fra">Ricker_Beam_Trawl_Transects_Map.JPG</gmd:LocalisedCharacterString>
          </gmd:textGroup>
        </gmd:PT_FreeText>
      </gmd:fileName>

I agree that I don't think it is currently supported in Geonetwork core. But I think this would be a good enhancement. Not sure how complex it would be to implement. Should this be raised as a bug on geonetwork core?

ianwallen commented 4 years ago

@josegar74 - regarding "(there's a migration task to handled existing metadata)" What is the approach of he migration task? Is it just to add the missing translation in gmd:fileDescription? And is FGP going to accept the French and English thumbnails being shown on both languages?

I also just noticed that your example has the following output.

               <gmd:fileDescription xsi:type="gmd:PT_FreeText_PropertyType">
                  <gco:CharacterString>thumbnail.png</gco:CharacterString>
                  <gmd:PT_FreeText>
                     <gmd:textGroup>
                        <gmd:LocalisedCharacterString locale="#EN">thumbnail.png</gmd:LocalisedCharacterString>
                     </gmd:textGroup>
                     <gmd:textGroup>
                        <gmd:LocalisedCharacterString locale="#FR">thumbnail.png</gmd:LocalisedCharacterString>
                     </gmd:textGroup>
                  </gmd:PT_FreeText>
               </gmd:fileDescription>

I believe version 3.10.x fixed this issues where gco:CharacterString and the gmd:LocalisedCharacterString are being duplicated. So I'm guessing this was output from geonetwork 3.6

as it should be something like

                <gmd:fileDescription xsi:type="gmd:PT_FreeText_PropertyType">
                  <gco:CharacterString>thumbnail.png</gco:CharacterString>
                  <gmd:PT_FreeText>
                     <gmd:textGroup>
                        <gmd:LocalisedCharacterString locale="#FR">thumbnail.png</gmd:LocalisedCharacterString>
                     </gmd:textGroup>
                  </gmd:PT_FreeText>
               </gmd:fileDescription>