GeoNode / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
1.46k stars 1.13k forks source link

Bad role CI_RoleCode codelistvalues #12534

Open etj opened 2 months ago

etj commented 2 months ago

Codelist values for gmd:CI_RoleCode should be

Entry Description Notes
author party who authored the resource
custodian party that accepts accountability and responsability for the data and ensures appropriate care and maintenance of the resource
distributor party who distributes the resource
originator party who created the resource
owner party that owns the resource
pointOfContact party who can be contacted for acquiring knowledge about or acquisition of the resource
principalInvestigator key party responsible for gathering information and conducting research
processor party who has processed the data in a manner such that the resource has been modified
publisher party who published the resource
resourceProvider party that supplies the resource
sponsor party that sponsors the resource
user party who uses the resource

In GeoNode they are defined as

https://github.com/GeoNode/geonode/blob/ec24c991c50fc9c0078d3994d35f133608376fbd/geonode/people/__init__.py#L33-L46

where the label is also set as codeListValue:

https://github.com/GeoNode/geonode/blob/ec24c991c50fc9c0078d3994d35f133608376fbd/geonode/catalogue/templates/catalogue/full_metadata.xml#L78-L80

This values are still not inserted into the xml metadata because of https://github.com/GeoNode/geonode/issues/12533

ridoo commented 1 week ago

@etj we already mapped these roles via template tag. Do you think that kind of fix/change would resolve this issue? Then we would be happy to provide an upstream PR.

ridoo commented 4 days ago

@etj if you intend to support this more natively, we also can think of adding code to Role like:

class Role:
    def __init__(self, label, code, is_required, is_multivalue, is_toggled_in_metadata_editor):
        self.label = label
        self.code = code
        self.is_required = is_required
        self.is_multivalue = is_multivalue
        self.is_toggled_in_metadata_editor = is_toggled_in_metadata_editor

    def __repr__(self):
        return self.label