Skip to content

Commit

Permalink
see pycsw#1077 use field uselimitation to set rights property and lic…
Browse files Browse the repository at this point in the history
…ense in othercontstraints
  • Loading branch information
pvgenuchten committed Feb 5, 2025
1 parent 9eab7a6 commit 58d9097
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pygeometa/schemas/iso19139/main.j2
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,17 @@
{% endfor %}
<gmd:resourceConstraints>
<gmd:MD_LegalConstraints>
{{ cs.get_freetext('useLimitation', record.get('metadata',{}).get('language_alternate'), get_charstring(record['identification'].get('rights'), record.get('metadata',{}).get('language'), record.get('metadata',{}).get('language_alternate'))) }}
<gmd:accessConstraints>
<gmd:MD_RestrictionCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_RestrictionCode" codeSpace="ISOTC211/19115" codeListValue="{{ record['identification']['accessconstraints'] }}">{{ record['identification']['accessconstraints'] }}</gmd:MD_RestrictionCode>
</gmd:accessConstraints>
{% if record['identification'].get('license',{}).get('url','').startswith('http') %}
<gmd:otherConstraints>
<gmx:Anchor xlink:href="{{ record['identification'].get('license',{}).get('url') }}">{{ record['identification'].get('license',{}).get('name') }}</gmx:Anchor>
</gmd:otherConstraints>
{% else %}
{{ cs.get_freetext('otherConstraints', record.get('metadata',{}).get('language_alternate'), get_charstring(record['identification'].get('license',{}).get('name',''), record.get('metadata',{}).get('language'), record.get('metadata',{}).get('language_alternate'))) }}
{% endif %}
</gmd:MD_LegalConstraints>
</gmd:resourceConstraints>
<gmd:spatialRepresentationType>
Expand Down

0 comments on commit 58d9097

Please sign in to comment.