Skip to content

Commit

Permalink
parse/set OARec themes (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Oct 30, 2023
1 parent 02c8756 commit 2ef5028
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pycsw/core/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1738,10 +1738,10 @@ def _parse_oarec_record(context, repos, record):

if 'keywords' in record['properties']:
keywords = record['properties']['keywords']
_set(context, recobj, 'pycsw:Keywords', ','.join(keywords))

if 'themes' in record['properties']:
for theme in record['properties']['themes']:
keywords.extend(theme['concepts'])
_set(context, recobj, 'pycsw:Themes', json.dumps(record['properties']['themes']))

if 'links' in record:
for link in record['links']:
Expand All @@ -1764,9 +1764,6 @@ def _parse_oarec_record(context, repos, record):
if links:
_set(context, recobj, 'pycsw:Links', json.dumps(links))

if keywords:
_set(context, recobj, 'pycsw:Keywords', ','.join(keywords))

_set(context, recobj, 'pycsw:BoundingBox', util.bbox2wktpolygon(util.geojson_geometry2bbox(record['geometry'])))

if 'temporal' in record['properties'].get('extent', []):
Expand Down

0 comments on commit 2ef5028

Please sign in to comment.