3liz / qgis-pgmetadata-plugin

QGIS Plugin to manage some metadata from PostgreSQL layer
GNU General Public License v2.0
12 stars 10 forks source link

Adding new items to glossary table #152

Open mixedbredie opened 1 year ago

mixedbredie commented 1 year ago

Hello, thank you for an excellent plugin. We're using it to drive semi-automated updates of metadata from our PostGIS database to Geoserver and then to a Geonetwork catalogue.

I read the contributing guide but wasn't 100% sure how you go about compiling all the changes into a new migration file. I have had to add several contact roles and a license item to the Glossary table. From https://inspire.ec.europa.eu/metadata-codelist/ResponsiblePartyRole I have inserted (with deepl translations):

INSERT INTO pgmetadata.glossary (id, field, code, label_en, description_en, item_order, label_fr, description_fr, label_it, description_it, label_es, description_es, label_de, description_de) VALUES (137, 'contact.contact_role', 'AU', 'Author', 'Party who authored the resource.', 60, 'Auteur', 'Partie auteur de la ressource.', 'Autore', 'Parte autrice della risorsa.', 'Autor', 'Parte autora del recurso.', 'Autor', 'Partei, die die Ressource verfasst hat.');

INSERT INTO pgmetadata.glossary (id, field, code, label_en, description_en, item_order, label_fr, description_fr, label_it, description_it, label_es, description_es, label_de, description_de) VALUES (138, 'contact.contact_role', 'PC', 'Point of Contact', 'Party who can be contacted for acquiring knowledge about or acquisition of the resource.', 70, 'Point de contact', 'Partie qui peut être contactée pour acquérir des connaissances sur la ressource ou en faire l\'acquisition.', 'Punto di contatto', 'Soggetto che può essere contattato per acquisire la conoscenza o l\'acquisizione della risorsa.', 'Punto de contacto', 'Parte con la que se puede contactar para adquirir conocimientos sobre el recurso o adquirirlo.', 'Kontaktperson', 'Partei, die kontaktiert werden kann, um Wissen über die Ressource zu erlangen oder diese zu erwerben.');

INSERT INTO pgmetadata.glossary (id, field, code, label_en, description_en, item_order, label_fr, description_fr, label_it, description_it, label_es, description_es, label_de, description_de) VALUES (139, 'contact.contact_role', 'PI', 'Principal Investigator', 'Key party responsible for gathering information and conducting research.', 80, 'Chercheur principal', 'Personne clé responsable de la collecte d\'informations et de la conduite de recherches.', 'Sperimentatore principale', 'Responsabile della raccolta delle informazioni e della ricerca.', 'Investigador principal', 'Responsable clave de la recopilación de información y la realización de investigaciones.', 'Hauptuntersuchungsleiter', 'Hauptverantwortlicher für die Sammlung von Informationen und die Durchführung von Recherchen.');

INSERT INTO pgmetadata.glossary (id, field, code, label_en, description_en, item_order, label_fr, description_fr, label_it, description_it, label_es, description_es, label_de, description_de) VALUES (140, 'contact.contact_role', 'PU', 'Publisher', 'Party who published the resource.', 90, 'Éditeur', 'Partie qui a publié la ressource.', 'Editore', 'Parte che ha pubblicato la risorsa.', 'Editorial', 'Parte que publicó el recurso.', 'Herausgeber', 'Partei, die die Ressource veröffentlicht hat.');

INSERT INTO pgmetadata.glossary (id, field, code, label_en, description_en, item_order, label_fr, description_fr, label_it, description_it, label_es, description_es, label_de, description_de) VALUES (141, 'contact.contact_role', 'RP', 'Resource Provider', 'Party that supplies the resource.', 100, 'Fournisseur de ressources', 'Partie qui fournit la ressource.', 'Provider di risorse', 'Parte che fornisce la risorsa.', 'Proveedor de recursos', 'Parte que suministra el recurso.', 'Ressourcenanbieter', 'Partei, die die Ressource bereitstellt.');

From https://spdx.org/licenses/OGL-UK-3.0.html and https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/ I have added:

INSERT INTO pgmetadata.glossary (id, field, code, label_en, description_en, item_order, label_fr, description_fr, label_it, description_it, label_es, description_es, label_de, description_de) VALUES (142, 'dataset.license', 'OGL-UK-3.0', 'Open Government Licence v3.0', 'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/', 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

This improves our experience of using the plugin. Could these be included for others to use as well?

effjot commented 1 year ago

This could be implemented along my pull request #103. ;-) I could review the German translations, if you like.

Also, it would be nice to have a robust way to allow for local additions to the glossary. Currently, upgrades could break, because the id primary key is hardcoded in the upgrade scripts. I think there was a discussion about this a while ago, but I can’t find it.

effjot commented 1 year ago

Thanks @mixedbredie! I have added your suggestions to PR #103. The German translations are from the INSPIRE site you’ve linked to instead of DeepL translations. I have removed Italian and Spanish translations for the time being, as no other terms have been translated to these languages yet.