Projet

Général

Profil

Actions

Anomalie #56

fermé

The fileidentifier and identifier-code are changed always

Ajouté par Andrea Peri il y a plus de 9 ans. Mis à jour il y a plus de 9 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
Début:
07/11/2014
Echéance:
24/11/2014
% réalisé:

100%

Temps estimé:
0.00 h
# ref:

Description

Hi, I notice that when I import an XML ISO19139 metadata the FileIdentifier value
available in the xml file is rewrite.

Infact our xml has (coming from geonetwork) an UUID value like this:

<gmd:fileIdentifier>
      <gco:CharacterString>f93b913b-83b2-4d52-b9bf-b7753d087e58</gco:CharacterString>
  </gmd:fileIdentifier>

When loaded in the qsphere plugin and after re-export to iso19139 , I notice the fileidentifier is
containing the filename and the original fileientifier (UUID for us) is lost.

The FileIdentifier is an unique value identifi-ing the metadata.
But it should also be constant if the metadata is update.
It should change only when a metdata is create from scratch (new metadata) or imported but from a metadata where is is not available (because optional for iso it could not be present)

But I guess the value should not be change from the original value.

So if the FileIdentifier that is optional in ISO is not available I guess is k to add it using the filename, but if it is available in xml the qsphere should not change it.

Please note that the FileIdentifier is important to allow the usage of links in web pages.

Infact in geonetwork it is usable to link directly the html page of a metadata.

Also I notice is change also the
identification-info - citation - identifier - code.

I load infact an xml with this:

               <gmd:identifier>
                  <gmd:MD_Identifier>
                     <gmd:code>
                        <gco:CharacterString>RTSIGTA_UCS_PC_1</gco:CharacterString>
                     </gmd:code>
                  </gmd:MD_Identifier>
               </gmd:identifier>

and re-exporting I see it is became:

<gmd:identifier>
<gmd:RS_Identifier>
<gmd:code>
<gco:CharacterString>EN-2014-qIThrXZLnaRm_110708H59M16S</gco:CharacterString>
</gmd:code>
<gmd:codeSpace>
<gco:CharacterString>Unkwon</gco:CharacterString>
</gmd:codeSpace>
</gmd:RS_Identifier>
</gmd:identifier>

Please notice the usage of "RS_" instead of "MD_"

The RS_Identifier is an specialization of MD_Identifier.

But it is introduce for describe the ReferenceSystem (RS) not the Dataset.

SO I guess also if it is valid for XSD (as specialization of MD_) it is a wrng sage in semantic of metadata.

I attach an image fro ISO to try explain my dubt.

Regards,

A.


Fichiers

rs_identifier.gif (38,5 ko) rs_identifier.gif image from ISO to explain the RS_Identifier role Andrea Peri, 07/11/2014 09:18
ui_catalogue.py (121 ko) ui_catalogue.py Christophe MASSE, 07/11/2014 10:10
importexport.py (46,3 ko) importexport.py Christophe MASSE, 07/11/2014 10:10
transformation_en.xsl (26,4 ko) transformation_en.xsl Christophe MASSE, 07/11/2014 10:10
transformation_fr.xsl (27,4 ko) transformation_fr.xsl Christophe MASSE, 07/11/2014 10:10

Mis à jour par Andrea Peri il y a plus de 9 ans

The RS_Identifier issue is added as a separate issue.

https://qgis.projets.developpement-durable.gouv.fr/issues/57

regards,

Andrea.

Mis à jour par Christophe MASSE il y a plus de 9 ans

Pour l'importation (module ui_catalogue.py) :

zWidgetValues = {"intitule": myISO.title , "resume" : myISO.abstract, "typedata": myISO.typedata, "tablelocalisator" : myISO.localisators, \
"identificator" : myISO.identificator, "tablelangues" : myISO.languesjdd, "tableformats" : myISO.formatsjdd, "tablecarac": myISO.tablecarac, \
"tablecategories" : myISO.categories, "tablemotsclefsf" : myISO.keywordsF, \
"tablescr" : myISO.scr, "tableemprises" : myISO.boundingboxcoordinates, \
"tableetenduetemporelle" : myISO.timeperiodes, "groups:dates" : myISO.dates, \
"genealogie" : myISO.genealogie, "coherence" : myISO.coherence, "grouperesolutionscale" : myISO.scalesEC, \
"tablespecifications": myISO.conformities, "groupedroits" : myISO.accessconstraints, "licence" : myISO.legalconstraints, \
"tableroles:1" : myISO.pointsofcontactMDD, "tableroles:2" : myISO.pointsofcontact, "tableroles:3" : myISO.pointsofcontactCust, \
"datemetada" : (myISO.datemdd, myISO.datetmdd ), "langmetada" : myISO.languemdd
}

modification apportée pour fileIdentifier :

zWidgetValues = {"intitule": myISO.title , "resume" : myISO.abstract, "typedata": myISO.typedata, "tablelocalisator" : myISO.localisators, \
"identificator" : myISO.fileIdentifier, "tablelangues" : myISO.languesjdd, "tableformats" : myISO.formatsjdd, "tablecarac": myISO.tablecarac, \
"tablecategories" : myISO.categories, "tablemotsclefsf" : myISO.keywordsF, \
"tablescr" : myISO.scr, "tableemprises" : myISO.boundingboxcoordinates, \
"tableetenduetemporelle" : myISO.timeperiodes, "groups:dates" : myISO.dates, \
"genealogie" : myISO.genealogie, "coherence" : myISO.coherence, "grouperesolutionscale" : myISO.scalesEC, \
"tablespecifications": myISO.conformities, "groupedroits" : myISO.accessconstraints, "licence" : myISO.legalconstraints, \
"tableroles:1" : myISO.pointsofcontactMDD, "tableroles:2" : myISO.pointsofcontact, "tableroles:3" : myISO.pointsofcontactCust, \
"datemetada" : (myISO.datemdd, myISO.datetmdd ), "langmetada" : myISO.languemdd
}

L'ID reste modifiable. Raison : l'import peut être réalisé pour générer une nouvelle fiche de métadonnée à partir d'un modèle (pré-remplissage).
L'importance de l'UID est parfaitement connue.

Pour l'export (module importexport.py) :

Changement de la localisation de la source pour la gmd:MD_identifier

def MakeFileIdentifierXML(self, zLOG, zFile):
#TOTO 2.6.1
#zValue = os.path.basename(zFile)
zObj = getWidget(self, "identificator")
WriteInLOG(zLOG, '<gmd:fileIdentifier>\n')
WriteInLOG(zLOG, '<gco:CharacterString>%s</gco:CharacterString>\n' % (zObj.text()))
WriteInLOG(zLOG, '</gmd:fileIdentifier>\n')

Retrait de la fonction MakeIdentificationInfoXML des blocs "gmd:RS_Identifier"

Modification des feuilles de styles (en / fr) : fichiers xsl "transformation" sous le répertoire "xml/xsl"

Si vous souhaitez une transformation en italien, merci de me l'indiquer avant de pousser la 2.6.1 vers les dépôts, car outre la réalisation du fichier "transformation_it.xsl", il faut ajuster le code de QSphere qui jusqu'à présent était bicéphale (EN/FR). Rien de techniquement dur et long, mais à faire !

Encore merci à Andrea pour sont travail de qualification.

Mis à jour par Christophe MASSE il y a plus de 9 ans

  • Echéance mis à 07/11/2014
  • Statut changé de Nouveau à Résolu
  • Assigné à mis à Christophe MASSE
  • Version cible mis à QSphere 2.6.1
  • % réalisé changé de 0 à 100
  • Temps estimé mis à 0.50 h

Mis à jour par Christophe MASSE il y a plus de 9 ans

En aparté, je constate que le choix des noms de blocs parser XML n'étaient pas les plus idoines (myISO.fileIdentifier et myISO.identificator).
Ils seront remplacés par myISO.UUID et myISO.rs_identifier.

Mis à jour par Christophe MASSE il y a plus de 9 ans

  • Statut changé de Résolu à Fermé

Mis à jour par Andrea Peri il y a plus de 9 ans

Hi,

I see you decide to remove the fragment RS_Identification.
You also decide to not insert in data_identification a fragment MD_Identificator ?
I test it and see the export xml result is without it.

You confirm this , or is another issue ?

Mis à jour par Christophe MASSE il y a plus de 9 ans

  • Echéance changé de 07/11/2014 à 24/11/2014
  • Statut changé de Fermé à En cours
  • Temps estimé changé de 0.50 h à 0.00 h

Actuellement, les éléments "<gmd:RS_Identifier>" du bloc "<gmd:identificationInfo>" ne sont plus exportés...

Dans la version finale corrigée, on pourrait replacer les éléments suivants dans le bloc "<gmd:identificationInfo>" ("<gmd:citation>") :

<gmd:identifier>
<gmd:MD_Identifier>
<gmd:code>
<gco:CharacterString>UUID</gco:CharacterString>
</gmd:code>
</gmd:MD_Identifier>
</gmd:identifier>

Pour la libération de la 2.6.1, je prévois la dernière semaine de novembre.
En effet, cette semaine, mon "testeur" LINUX est absent (cf. bugs #60)

Mis à jour par Christophe MASSE il y a plus de 9 ans

  • Statut changé de En cours à Fermé
Actions

Formats disponibles : Atom PDF