Skip to content

Commit 58d9097

Browse files
committed
see pycsw#1077 use field uselimitation to set rights property and license in othercontstraints
1 parent 9eab7a6 commit 58d9097

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pygeometa/schemas/iso19139/main.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,17 @@
239239
{% endfor %}
240240
<gmd:resourceConstraints>
241241
<gmd:MD_LegalConstraints>
242+
{{ 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'))) }}
242243
<gmd:accessConstraints>
243244
<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>
244245
</gmd:accessConstraints>
246+
{% if record['identification'].get('license',{}).get('url','').startswith('http') %}
247+
<gmd:otherConstraints>
248+
<gmx:Anchor xlink:href="{{ record['identification'].get('license',{}).get('url') }}">{{ record['identification'].get('license',{}).get('name') }}</gmx:Anchor>
249+
</gmd:otherConstraints>
250+
{% else %}
251+
{{ 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'))) }}
252+
{% endif %}
245253
</gmd:MD_LegalConstraints>
246254
</gmd:resourceConstraints>
247255
<gmd:spatialRepresentationType>

0 commit comments

Comments
 (0)