Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: implement use_constraints with restrictioncodes #112

Open
mwallschlaeger opened this issue Jun 14, 2024 · 0 comments
Open

Feature: implement use_constraints with restrictioncodes #112

mwallschlaeger opened this issue Jun 14, 2024 · 0 comments
Labels
API changes to rest API feature Forms changes to metadata forms Metadata MetadataXML changes to the metadata XML

Comments

@mwallschlaeger
Copy link

mwallschlaeger commented Jun 14, 2024

Feature Description

COMPLICATED TO DESCRIBE, ASK @mwallschlaeger for details

We're decided to have a two part approach for constraints:

  1. use constraints for defined constraints by us (zalf) with 3 default restrictionscodes (copyright, ...)
  2. other constraints for user defined constraints with default restrictionscode (other restrichtions)
    .

Upstream geonode implements this with Restrictions and Other constraints like:
image
This we can use to impl. 2. as it is exactly what we need.

for 1. we need to reimplement the field use_constraints (which is in zalf/geonode, but not in the way we need it) to be a free text field, and another field use_constraints_restrictions which holds the restriction codes applied to use_constraints so they can also be written to the xml like:

   <gmd:resourceConstraints>
         <gmd:MD_LegalConstraints>
           <gmd:useConstraints>
              <gmd:MD_RestrictionCode codeSpace="ISOTC211/19115" codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_RestrictionCode" codeListValue="limitation not listed">limitation not listed</gmd:MD_RestrictionCode>
           </gmd:useConstraints>
           <gmd:otherConstraints>
             <gco:CharacterString>CC BYgfdhfg</gco:CharacterString>
           </gmd:otherConstraints>
         </gmd:MD_LegalConstraints>
       </gmd:resourceConstraints>

tasks todo:

  • make sure use_constraints and other_constraints are in geonode.base.models.ResourceBase and described well
  • check that there are two fields that are referencing to restrction_codes, use_constraints_restrictions and other_constraints_restrictions, best impliment both as onetomany, they can share the same database table in the backend
  • make sure the fields are available as forms in the metadata editor
  • make sure the fields are available in the resourcebase API and editable via API
  • make sure both combinations are part of the geonode.catalogue.templates.full_metadata.xml
  • check if also changes to pycsw local_mapping need to take place

PART OF #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API changes to rest API feature Forms changes to metadata forms Metadata MetadataXML changes to the metadata XML
Projects
None yet
Development

No branches or pull requests

1 participant