4
4
# Authors: Tom Kralidis <[email protected] >
5
5
# Ricardo Garcia Silva <[email protected] >
6
6
#
7
- # Copyright (c) 2023 Tom Kralidis
7
+ # Copyright (c) 2025 Tom Kralidis
8
8
# Copyright (c) 2016 James F. Dickens
9
9
# Copyright (c) 2017 Ricardo Garcia Silva
10
10
#
@@ -1760,7 +1760,7 @@ def _parse_oarec_record(context, repos, record):
1760
1760
_set (context , recobj , 'pycsw:InsertDate' , util .get_today_and_now ())
1761
1761
_set (context , recobj , 'pycsw:XML' , '' ) # FIXME: transform into XML? or not, to validate
1762
1762
_set (context , recobj , 'pycsw:Metadata' , json .dumps (record ))
1763
- _set (context , recobj , 'pycsw:MetadataType' , 'application/json' )
1763
+ _set (context , recobj , 'pycsw:MetadataType' , 'application/geo+ json' )
1764
1764
1765
1765
_set (context , recobj , 'pycsw:AnyText' , ' ' .join ([str (t ) for t in util .get_anytext_from_obj (record )]))
1766
1766
@@ -1820,6 +1820,7 @@ def _parse_stac_resource(context, repos, record):
1820
1820
LOGGER .debug ('Parsing STAC Item' )
1821
1821
conformance = 'https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md'
1822
1822
typename = 'stac:Item'
1823
+ metadata_type = 'application/geo+json'
1823
1824
stype = 'item'
1824
1825
title = record ['properties' ].get ('title' )
1825
1826
abstract = record ['properties' ].get ('description' )
@@ -1829,6 +1830,7 @@ def _parse_stac_resource(context, repos, record):
1829
1830
LOGGER .debug ('Parsing STAC Collection' )
1830
1831
conformance = 'https://github.com/radiantearth/stac-spec/tree/master/collection-spec/collection-spec.md'
1831
1832
typename = 'stac:Collection'
1833
+ metadata_type = 'application/json'
1832
1834
stype = 'collection'
1833
1835
title = record .get ('title' )
1834
1836
abstract = record .get ('description' )
@@ -1842,6 +1844,7 @@ def _parse_stac_resource(context, repos, record):
1842
1844
LOGGER .debug ('Parsing STAC Catalog' )
1843
1845
conformance = 'https://github.com/radiantearth/stac-spec/tree/master/catalog-spec/catalog-spec.md'
1844
1846
typename = 'stac:Catalog'
1847
+ metadata_type = 'application/json'
1845
1848
stype = 'catalog'
1846
1849
title = record .get ('title' )
1847
1850
abstract = record .get ('description' )
@@ -1853,7 +1856,7 @@ def _parse_stac_resource(context, repos, record):
1853
1856
_set (context , recobj , 'pycsw:InsertDate' , util .get_today_and_now ())
1854
1857
_set (context , recobj , 'pycsw:XML' , '' ) # FIXME: transform into XML? or not, to validate
1855
1858
_set (context , recobj , 'pycsw:Metadata' , json .dumps (record ))
1856
- _set (context , recobj , 'pycsw:MetadataType' , 'application/json' )
1859
+ _set (context , recobj , 'pycsw:MetadataType' , metadata_type )
1857
1860
_set (context , recobj , 'pycsw:AnyText' , ' ' .join ([str (t ) for t in util .get_anytext_from_obj (record )]))
1858
1861
_set (context , recobj , 'pycsw:Type' , stype )
1859
1862
_set (context , recobj , 'pycsw:Title' , title )
0 commit comments