Skip to content

Commit a209c2e

Browse files
committed
add license queryable (#1208)
1 parent 73f1483 commit a209c2e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pycsw/core/metadata.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,6 +1834,7 @@ def _parse_stac_resource(context, repos, record):
18341834
_set(context, recobj, 'pycsw:CreationDate', record['properties'].get('created'))
18351835
_set(context, recobj, 'pycsw:Modified', record['properties'].get('updated'))
18361836
_set(context, recobj, 'pycsw:Platform', record['properties'].get('platform'))
1837+
_set(context, recobj, 'pycsw:OtherConstraints', record['properties'].get('license'))
18371838
instruments = record['properties'].get('instruments')
18381839
if instruments is not None:
18391840
_set(context, recobj, 'pycsw:Instrument', ','.join(instruments))
@@ -1853,6 +1854,7 @@ def _parse_stac_resource(context, repos, record):
18531854
_set(context, recobj, 'pycsw:CreationDate', record.get('created'))
18541855
_set(context, recobj, 'pycsw:Modified', record.get('updated'))
18551856
_set(context, recobj, 'pycsw:Platform', record.get('platform'))
1857+
_set(context, recobj, 'pycsw:OtherConstraints', record.get('license'))
18561858
instruments = record.get('instruments')
18571859
if instruments is not None:
18581860
_set(context, recobj, 'pycsw:Instrument', ','.join(instruments))
@@ -1876,6 +1878,7 @@ def _parse_stac_resource(context, repos, record):
18761878
_set(context, recobj, 'pycsw:CreationDate', record.get('created'))
18771879
_set(context, recobj, 'pycsw:Modified', record.get('updated'))
18781880
_set(context, recobj, 'pycsw:Platform', record.get('platform'))
1881+
_set(context, recobj, 'pycsw:OtherConstraints', record.get('license'))
18791882
instruments = record.get('instruments')
18801883
if instruments is not None:
18811884
_set(context, recobj, 'pycsw:Instrument', ','.join(instruments))

pycsw/core/repository.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ def __init__(self, database, context, app_root=None, table='records', repo_filte
169169
'instrument': self.dataset.instrument,
170170
'sensortype': self.dataset.sensortype,
171171
'off_nadir': self.dataset.illuminationelevationangle,
172-
'distancevalue': self.dataset.distancevalue
172+
'distancevalue': self.dataset.distancevalue,
173+
'license': self.dataset.otherconstraints
173174
}
174175

175176
if self.dbtype == 'postgresql':

0 commit comments

Comments
 (0)