diff --git a/ogc2ckan/ckan_datasets/base.py b/ogc2ckan/ckan_datasets/base.py index 1667df7..0f244b4 100644 --- a/ogc2ckan/ckan_datasets/base.py +++ b/ogc2ckan/ckan_datasets/base.py @@ -107,6 +107,7 @@ def __init__(self, ckan_id, name, owner_org, license_id): self.owner_org = owner_org self.private = False self.groups = [] + self.graphic_overview = None # use http:///api/action/organization_list to see the organization ids in your CKAN site self.license_id = license_id self.identifier = None @@ -142,6 +143,9 @@ def set_private(self, private): def set_groups(self, groups): self.groups = groups + def set_graphic_overview(self, graphic_overview): + self.graphic_overview = graphic_overview + def set_publisher_uri(self, publisher_uri): self.publisher_uri = publisher_uri @@ -351,6 +355,7 @@ def dataset_dict(self): 'owner_org': self.owner_org, 'private': self.private, 'groups': self.groups, + 'graphic_overview': self.graphic_overview, 'title': self.title, 'notes': self.notes, 'license_id': self.license_id, @@ -448,6 +453,7 @@ def dataset_dict(self): 'owner_org': self.owner_org, 'private': self.private, 'groups': self.groups, + 'graphic_overview': self.graphic_overview, 'title_translated': self.title_translated, 'notes_translated': self.notes_translated, 'license_id': self.license_id, diff --git a/ogc2ckan/ckan_datasets/geodcatap.py b/ogc2ckan/ckan_datasets/geodcatap.py index fa13c03..934d5b2 100644 --- a/ogc2ckan/ckan_datasets/geodcatap.py +++ b/ogc2ckan/ckan_datasets/geodcatap.py @@ -108,6 +108,7 @@ def __init__(self, ckan_id, name, owner_org, license_id): self.owner_org = owner_org self.private = False self.groups = [] + self.graphic_overview = None # use http:///api/action/organization_list to see the organization ids in your CKAN site self.license_id = license_id self.identifier = ckan_id @@ -181,6 +182,9 @@ def set_private(self, private): def set_groups(self, groups): self.groups = groups + def set_graphic_overview(self, graphic_overview): + self.graphic_overview = graphic_overview + def set_publisher_uri(self, publisher_uri): self.publisher_uri = publisher_uri @@ -402,6 +406,7 @@ def dataset_dict(self): 'owner_org': self.owner_org, 'private': self.private, 'groups': self.groups, + 'graphic_overview': self.graphic_overview, 'title': self.title, 'notes': self.notes, 'license_id': self.license_id, @@ -505,6 +510,7 @@ def dataset_dict_multilang(self): 'owner_org': self.owner_org, 'private': self.private, 'groups': self.groups, + 'graphic_overview': self.graphic_overview, 'title_translated': self.title_translated, 'notes_translated': self.notes_translated, 'license_id': self.license_id, diff --git a/ogc2ckan/harvesters/table.py b/ogc2ckan/harvesters/table.py index ef12a83..d13fab7 100644 --- a/ogc2ckan/harvesters/table.py +++ b/ogc2ckan/harvesters/table.py @@ -313,6 +313,14 @@ def get_dataset(self, ckan_info: CKANInfo, record: str, table_dataset: object = metadata_profile = getattr(table_dataset, 'metadata_profile', OGC2CKAN_HARVESTER_MD_CONFIG['metadata_profile']) dataset.set_metadata_profile(metadata_profile) + # Set graphic overview + graphic_overview = getattr(table_dataset, 'graphic_overview', None) + dataset.set_graphic_overview(graphic_overview) + + # Set purpose + purpose = getattr(table_dataset, 'purpose', None) + dataset.set_purpose(purpose) + # Set Responsible Parties (Point of contact, Resource publisher and Resource contact/maintainer) self.set_default_responsible_parties(dataset, self.default_dcat_info, ckan_info, table_dataset)