diff --git a/ckanext/odsh/profiles/odsh_dcat_de_profile.py b/ckanext/odsh/profiles/odsh_dcat_de_profile.py index 97dd57e582ce05e6464032dc4ede45ff61302c48..de9bfa5a10cfa15ce70e68723124eb351045c778 100644 --- a/ckanext/odsh/profiles/odsh_dcat_de_profile.py +++ b/ckanext/odsh/profiles/odsh_dcat_de_profile.py @@ -27,6 +27,7 @@ class ODSHDCATdeProfile(DCATdeProfile): ) self._parse_distributions(dataset_dict, dataset_ref) self._parse_type(dataset_dict, dataset_ref) + self._parse_references(dataset_dict, dataset_ref) if self._belongs_to_collection(dataset_dict, dataset_ref): self._mark_for_adding_to_ckan_collection(dataset_dict, dataset_ref) return dataset_dict @@ -50,6 +51,11 @@ class ODSHDCATdeProfile(DCATdeProfile): ckan_type = helpers_tpsh.map_dct_type_to_ckan_type(str(dct_type)) dataset_dict.update({'type': ckan_type}) + def _parse_references(self, dataset_dict, dataset_ref): + value = self._object(dataset_ref, DCT.references) + if value: + ds_utils.insert_new_extras_field(dataset_dict, 'reference', value) + def _belongs_to_collection(self, dataset_dict, dataset_ref): dct_is_version_of = self._object(dataset_ref, DCT.isVersionOf) belongs_to_collection = True if dct_is_version_of else False