ckan / ckanext-dcat

CKAN ♥ DCAT
164 stars 142 forks source link

DCAT Dataset URIs #209

Closed lucymc12 closed 1 year ago

lucymc12 commented 2 years ago

Hello,

I was wondering whether anyone could provide me with some insights on an issue I am experiencing when importing DCAT records into CKAN.

I have a large set of dataset records in DCAT format that I can successfully import into CKAN using the DCAT Harvester. When the harvesting takes place, the dataset URIs and IDs from the DCAT records are mapped as extra:uri and extra:identifier data fields. CKAN automatically generates an additional URI and ID data field for each dataset using the ckanext.dcat.base_uri configuration of my CKAN instance.

This of course makes sense for cases where the harvested URIs are in a different format to those generated by the CKAN instance. However, I have specifically modelled the URIs and IDs in my dataset records to follow the configuration of my CKAN instance. As such I am trying to figure out a way that my harvested URIs and IDs will be mapped as the main CKAN URI and ID data fields (and not just the extra:uri and extra:identifier fields). Would anyone have advice on how to implement this?

Below is a sample of the DCAT records that I am harvesting into CKAN. Here the datasets have URIs and IDs in the same format as those of my CKAN instance. These URIs and IDs are currently being imported as extra:uri and extra:identifier. This causes the following:

Thank you, Lucy @lucymc12

<https://myckansite.ie/MyCKANSiteName/dataset/4fd42b48-507b-4a9e-ba6a-c88245cb9ce1>
        a       <http://www.w3.org/ns/dcat#Dataset> ;
        <http://purl.org/dc/terms/accrualPeriodicity>
                "Monthly" ;
        <http://purl.org/dc/terms/creator>
                "Bob" ;
        <http://purl.org/dc/terms/description>
                "Dataset A descrption text" ;
        <http://purl.org/dc/terms/identifier>
                "4fd42b48-507b-4a9e-ba6a-c88245cb9ce1" ;
        <http://purl.org/dc/terms/publisher>
                <https://myckansite.ie/MyCKANSiteName/organization/f3885bc4-86aa-4f67-9554-951410352dcd> ;
        <http://purl.org/dc/terms/title>
                "Dataset A Title" .

<https://myckansite.ie/MyCKANSiteName/dataset/28d85de0-3e5a-4dfd-9c2b-5f059660bd6f>
        a       <http://www.w3.org/ns/dcat#Dataset> ;
        <http://purl.org/dc/terms/accrualPeriodicity>
                "Monthly" ;
        <http://purl.org/dc/terms/creator>
                "Jane" ;
        <http://purl.org/dc/terms/description>
                 "Dataset B descrption text" ;
        <http://purl.org/dc/terms/identifier>
                "28d85de0-3e5a-4dfd-9c2b-5f059660bd6f" ;
        <http://purl.org/dc/terms/publisher>
                <https://myckansite.ie/MyCKANSiteName/organization/f3885bc4-86aa-4f67-9554-951410352dcd> ;
        <http://purl.org/dc/terms/title>
                "Dataset B Title" .

<https://myckansite.ie/MyCKANSiteName/organization/f3885bc4-86aa-4f67-9554-951410352dcd>
        a       <http://xmlns.com/foaf/0.1/Organization> ;
        <http://xmlns.com/foaf/0.1/name>
                "Dublin City University" .