diff --git a/ansible/roles/ckan/vars/main.yml b/ansible/roles/ckan/vars/main.yml index 209ebb63e4..34d136e62f 100644 --- a/ansible/roles/ckan/vars/main.yml +++ b/ansible/roles/ckan/vars/main.yml @@ -7,7 +7,7 @@ celery_user: "{{ www_user }}" ckan_plugins_default: stats scheming_datasets fluent # order matters, when templates call super() -ckan_plugins: harvest ckan_harvester hri_harvester dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface spatial_metadata spatial_query csw_harvester drupal7 datarequests report qa archiver ytp_organizations ytp_comments ytp_request ytp_report hierarchy_display ytp_theme ytp_drupal ytp_tasks ytp_dataset ytp_user ytp_service datastore showcase datapusher recline_grid_view recline_graph_view recline_map_view text_view image_view pdf_view geo_view geojson_view +ckan_plugins: harvest ckan_harvester hri_harvester dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface spatial_metadata spatial_query csw_harvester drupal7 datarequests report qa archiver ytp_organizations ytp_comments ytp_request ytp_report hierarchy_display ytp_theme ytp_drupal ytp_tasks ytp_dataset ytp_spatial ytp_user ytp_service datastore showcase datapusher recline_grid_view recline_graph_view recline_map_view text_view image_view pdf_view geo_view geojson_view ckan_aws_plugins: cloudstorage diff --git a/modules/ckanext-ytp-main/ckanext/ytp/dataset/plugin.py b/modules/ckanext-ytp-main/ckanext/ytp/dataset/plugin.py index 82b4be7b23..928a4e7e1e 100644 --- a/modules/ckanext-ytp-main/ckanext/ytp/dataset/plugin.py +++ b/modules/ckanext-ytp-main/ckanext/ytp/dataset/plugin.py @@ -201,7 +201,6 @@ class YTPDatasetForm(plugins.SingletonPlugin, toolkit.DefaultDatasetForm): plugins.implements(plugins.IPackageController, inherit=True) plugins.implements(plugins.IActions) plugins.implements(plugins.IConfigurable) - plugins.implements(ISpatialHarvester, inherit=True) plugins.implements(plugins.IAuthFunctions) plugins.implements(plugins.IValidators) @@ -576,6 +575,29 @@ def before_index(self, pkg_dict): def get_actions(self): return {'package_show': action_package_show} + + + # IValidators + def get_validators(self): + return { + 'lower_if_exists': validators.lower_if_exists, + 'upper_if_exists': validators.upper_if_exists, + 'tag_string_or_tags_required': validators.tag_string_or_tags_required, + 'create_tags': validators.create_tags, + 'create_fluent_tags': validators.create_fluent_tags, + 'set_private_if_not_admin': validators.set_private_if_not_admin, + 'list_to_string': validators.list_to_string, + 'convert_to_list': validators.convert_to_list, + 'tag_list_output': validators.tag_list_output, + 'repeating_text': validators.repeating_text, + 'repeating_text_output': validators.repeating_text_output, + 'only_default_lang_required': validators.only_default_lang_required + } + + +class YTPSpatialHarvester(plugins.SingletonPlugin): + plugins.implements(ISpatialHarvester, inherit=True) + # ISpatialHarvester def get_package_dict(self, context, data_dict): @@ -690,20 +712,3 @@ def get_package_dict(self, context, data_dict): return package_dict - - # IValidators - def get_validators(self): - return { - 'lower_if_exists': validators.lower_if_exists, - 'upper_if_exists': validators.upper_if_exists, - 'tag_string_or_tags_required': validators.tag_string_or_tags_required, - 'create_tags': validators.create_tags, - 'create_fluent_tags': validators.create_fluent_tags, - 'set_private_if_not_admin': validators.set_private_if_not_admin, - 'list_to_string': validators.list_to_string, - 'convert_to_list': validators.convert_to_list, - 'tag_list_output': validators.tag_list_output, - 'repeating_text': validators.repeating_text, - 'repeating_text_output': validators.repeating_text_output, - 'only_default_lang_required': validators.only_default_lang_required - } diff --git a/modules/ckanext-ytp-main/setup.py b/modules/ckanext-ytp-main/setup.py index a29eb8d7c1..82650df262 100644 --- a/modules/ckanext-ytp-main/setup.py +++ b/modules/ckanext-ytp-main/setup.py @@ -34,6 +34,7 @@ hri_harvester=ckanext.ytp.organizations.harvesters.hriharvester:HRIHarvester ytp_theme=ckanext.ytp.theme.plugin:YtpThemePlugin ytp_dataset=ckanext.ytp.dataset.plugin:YTPDatasetForm + ytp_spatial=ckanext.ytp.dataset.plugin:YTPSpatialHarvester ytp_service=ckanext.ytp.service.plugin:YTPServiceForm ytp_report=ckanext.ytp.report.plugin:YtpReportPlugin