44# Authors: Tom Kralidis <tomkralidis@gmail.com>
55# Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com>
66#
7- # Copyright (c) 2023 Tom Kralidis
7+ # Copyright (c) 2025 Tom Kralidis
88# Copyright (c) 2016 James F. Dickens
99# Copyright (c) 2017 Ricardo Garcia Silva
1010#
@@ -1760,7 +1760,7 @@ def _parse_oarec_record(context, repos, record):
17601760 _set (context , recobj , 'pycsw:InsertDate' , util .get_today_and_now ())
17611761 _set (context , recobj , 'pycsw:XML' , '' ) # FIXME: transform into XML? or not, to validate
17621762 _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' )
17641764
17651765 _set (context , recobj , 'pycsw:AnyText' , ' ' .join ([str (t ) for t in util .get_anytext_from_obj (record )]))
17661766
@@ -1820,6 +1820,7 @@ def _parse_stac_resource(context, repos, record):
18201820 LOGGER .debug ('Parsing STAC Item' )
18211821 conformance = 'https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md'
18221822 typename = 'stac:Item'
1823+ metadata_type = 'application/geo+json'
18231824 stype = 'item'
18241825 title = record ['properties' ].get ('title' )
18251826 abstract = record ['properties' ].get ('description' )
@@ -1829,6 +1830,7 @@ def _parse_stac_resource(context, repos, record):
18291830 LOGGER .debug ('Parsing STAC Collection' )
18301831 conformance = 'https://github.com/radiantearth/stac-spec/tree/master/collection-spec/collection-spec.md'
18311832 typename = 'stac:Collection'
1833+ metadata_type = 'application/json'
18321834 stype = 'collection'
18331835 title = record .get ('title' )
18341836 abstract = record .get ('description' )
@@ -1842,6 +1844,7 @@ def _parse_stac_resource(context, repos, record):
18421844 LOGGER .debug ('Parsing STAC Catalog' )
18431845 conformance = 'https://github.com/radiantearth/stac-spec/tree/master/catalog-spec/catalog-spec.md'
18441846 typename = 'stac:Catalog'
1847+ metadata_type = 'application/json'
18451848 stype = 'catalog'
18461849 title = record .get ('title' )
18471850 abstract = record .get ('description' )
@@ -1853,7 +1856,7 @@ def _parse_stac_resource(context, repos, record):
18531856 _set (context , recobj , 'pycsw:InsertDate' , util .get_today_and_now ())
18541857 _set (context , recobj , 'pycsw:XML' , '' ) # FIXME: transform into XML? or not, to validate
18551858 _set (context , recobj , 'pycsw:Metadata' , json .dumps (record ))
1856- _set (context , recobj , 'pycsw:MetadataType' , 'application/json' )
1859+ _set (context , recobj , 'pycsw:MetadataType' , metadata_type )
18571860 _set (context , recobj , 'pycsw:AnyText' , ' ' .join ([str (t ) for t in util .get_anytext_from_obj (record )]))
18581861 _set (context , recobj , 'pycsw:Type' , stype )
18591862 _set (context , recobj , 'pycsw:Title' , title )
0 commit comments