Open ianwallen opened 4 years ago
Tested with ISO19139
metadata using the upload thumbnail dialog, but should be similar with HNAP:
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.
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?
@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>
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.
Problem