diff --git a/ckanext/odsh/profiles/odsh_dcat_de_profile.py b/ckanext/odsh/profiles/odsh_dcat_de_profile.py index 889e8bab48bb1f0feea7404adce64171e98fa2c1..e890e76330e433d12f512368f3026aa7a51a3603 100644 --- a/ckanext/odsh/profiles/odsh_dcat_de_profile.py +++ b/ckanext/odsh/profiles/odsh_dcat_de_profile.py @@ -28,6 +28,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 @@ -51,6 +52,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