geonode
geonode copied to clipboard
Bad role CI_RoleCode codelistvalues
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
@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.
@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
@ridoo at the moment we have
- a list of ISO19115 roles https://github.com/GeoNode/geonode/blob/4.4.1/geonode/people/enumerations.py#L21-L39
- an enumeration of roles with attributes mainly related to the UI: https://github.com/GeoNode/geonode/blob/4.4.1/geonode/people/init.py#L33-L46
- a quite large set of methods (https://github.com/GeoNode/geonode/blob/master/geonode/base/models.py#L1789-L1917 ) for dealing with resource contacts, sometime referred by
Role.name(e.g. https://github.com/GeoNode/geonode/blob/master/geonode/base/models.py#L1789-L1917), sometimes referred by a constant string (e.g. https://github.com/GeoNode/geonode/blob/master/geonode/base/models.py#L1803-L1807)
I don't think we want a further mapping to correlate all this things, but rather a cleanup of the existing code.
Since we're working on the new metadata editor and schema definition, and since the stuff in geonode.people.Roles is strictly related to schema and editor info, I guess we could refact that piece of code.
User's firstname and lastname is missing in the iso metadata under gmd:pointOfContact (although available in user profile). There were 3 roles assigned under the metadata editor, viz. PointofContact, Metadata_author and Owner for the below dataset, but only Pointofcontact is reflected in the iso metadata with the gmd:role=Owner : https://stable.demo.geonode.org/catalogue/#/dataset/15386 https://stable.demo.geonode.org/catalogue/csw?request=GetRecordById&service=CSW&version=2.0.2&id=6dd6e5e8-456c-42b1-a102-9a27b416a6a1&outputschema=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd&elementsetname=full
Is this point related to the issue being discussed ?