CKAN extension for the European Data Portal
- Requirements
- DCAT versions included
- Installation
- Development Installation
- Running the Tests
- Mapping CKAN - DCAT AP v x.x.x
- OAI-PMH version 2
- Examples
- License
- The extension was developed for CKAN 2.9
- It is based on the ckanext-dcat extension v1.1.3
- 2.0.1
- 2.1.0
-
Install the ckanext-dcat extension
-
Activate your CKAN virtual environment, for example::
. /usr/lib/ckan/default/bin/activate
-
Download the extension in the CKAN path extensions (e.g.
/usr/lib/ckan/venv/src
):git clone https://github.com/YourOpenDAta/ckanext-dcatapedp.git
-
Install the ckanext-dcatapedp Python package into your virtual environment::
pip install -e ckanext-dcatapedp
-
Active the dcat_ap_x.x.x profile and add the oaipmh_edp plugin in the
production.ini
file:ckanext.dcat.rdf.profiles = euro_dcat_ap dcat_ap_x.x.x (dcat_ap_2.1.0 or dcat_ap.2.0.1) ckan.plugins = (other plugins) oaipmh_edp
-
Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::
sudo service apache2 reload
To install ckanext-dcatapedp for development, activate your CKAN virtualenv and do::
git clone https://github.com/YourOpenDAta/ckanext-dcatapedp.git
cd ckanext-dcatapedp
python setup.py develop
pip install -r dev-requirements.txt
To run the tests, do::
pytest --ckan-ini=test.ini ckanext/dcatapedp/tests/
- DCAT prop: dcat property name
- CKAN fields: field or fields used for the mapping with the DCAT edp profile. CKAN fields are sorted by order of preference in the CKAN metadata
- Type: origin of the dcat mapping being
- O: taken from original profile without modifying it (euro_dcat_ap);
- M: taken from the original profile (euro_dcat_ap) modifying it;
- A: new property added in the dcat_ap_x.x.x profile
- Stored as: way it is stored in the CKAN instance
- Ref. vocab.: reference vocabularies recommended to use
- Notes: additional information
DCAT prop. | CKAN fields | Type | Stored as | Ref. vocab. | Notes |
---|---|---|---|---|---|
DCAT prop. | CKAN fields | Type | Stored as | Ref. vocab. | Notes |
---|---|---|---|---|---|
dct:identifier | extra:identifier, guid, id | O | text | ||
dct:description | notes | O | text | ||
dct:title | title | O | text | ||
dcat:contactPoint | extra:contact_uri | M | text | ||
dcat:distribution | resources | O | text | ||
dcat:keyword | tags | O | list | ||
dct:publisher | extra:publisher_uri | M | text | http://publications.europa.eu/resource/authority/corporate-body | |
dct:spatial | extra:spatial_uri | M | text | http://publications.europa.eu/resource/authority/continent http://publications.europa.eu/resource/authority/country http://publications.europa.eu/resource/authority/place http://sws.geonames.org/ |
|
dct:temporal | extra:temporal_start + extra:temporal_end |
M | text | ||
dcat:theme | extra:theme | M | list | http://publications.europa.eu/resource/authority/data-theme | |
adms:identifier | extra:alternate_identifier | M | list | ||
adms:sample | extra:sample | M | list | ||
adms:versionNotes | adms:versionNotes | O | text | ||
dcat:landingPage | url | M | text | ||
dct:accessRights | extra:access_rights | M | text | https://publications.europa.eu/resource/authority/access-right (not in the specification) [2.0.1] -> http://publications.europa.eu/resource/authority/access-right [2.1.0] |
|
dct:accrualPeriodicity | extra:frequency | O | text | http://purl.org/cld/freq | |
dct:conformsTo | extra:conforms_to | M | list | ||
dct:hasVersion | extra:has_version | O | list | ||
dct:isVersionOf | extra:is_version_of | O | list | ||
dct:issued | extra:issued, metadata_created | O | text | ||
dct:language | extra:language | M | list | http://publications.europa.eu/resource/authority/language | |
dct:modified | extra:modified, metadata_modified |
O | text | ||
dct:provenance | extra:provenance | M | text | ||
dct:source | extra:source | M | list | ||
dct:type | extra:dcat_type | M | text | () -> http://publications.europa.eu/resource/dataset/dataset-type [2.1.0] | |
foaf:page | extra:documentation | M | list | ||
owl:versionInfo | version, extra:dcat_version | O | text |
DCAT prop. | CKAN fields | Type | Stored as | Ref. vocab. | Notes |
---|---|---|---|---|---|
dcat:accessURL | resource:access_url | O | text | ||
dcatap:availability | resource:availability | A | text | http://data.europa.eu/r5r/availability/ https://www.dcat-ap.de/def/plannedAvailability/1_0.html -> [2.0.1] http://publications.europa.eu/resource/authority/planned-availability -> [2.1.0] |
|
dct:description | resource:description | O | text | ||
dct:format | resource:format | M | text | http://publications.europa.eu/resource/authority/file-type | |
dct:license | resource:license | M | text | TODO:include | |
adms:status | resource:status | M | text | http://purl.org/adms/status | |
dcat:byteSize | resource:size | O | number | ||
dcat:downloadURL | resource:download_url | O | text | ||
dcat:mediaType | resource:mimetype | M | text | http://www.iana.org/assignments/media-types/media-types.xhtml | |
dct:conformsTo | resource:conforms_to | M | list | ||
dct:issued | resource:issued | O | text | ||
dct:language | resource:languague | M | list | http://publications.europa.eu/resource/authority/language | |
dct:modified | resource:modified | O | text | ||
dct:rights | resource:rights | M | text | https://publications.europa.eu/resource/authority/access-right (not in the specification) | |
dct:title | resource:name | O | text | ||
foaf:page | resurce:documentation | M | list | ||
DCAT prop. | CKAN fields | Type | Stored as | Ref. vocab. | Notes |
---|---|---|---|---|---|
-
Create example of data
git ckan -c /etc/ckan/production.ini seed basic
-
Examples of petitions
- https://{ckan-instance-host}/oai?verb=Identify
- https://{ckan-instance-host}/oai?verb=ListMetadataFormats
- https://{ckan-instance-host}/oai?verb=ListSets
- https://{ckan-instance-host}/oai?verb=ListRecords&metadataPrefix=dcat
- https://{ckan-instance-host}/oai?verb=ListIdentifiers&metadataPrefix=dcat&set=example_org
- https://{ckan-instance-host}/oai?verb=GetRecord&identifier=ce3f7074-15b7-44ab-a2b9-85e26dc17f67&metadataPrefix=dcat
-
Original profile (
euro_dcat_ap
): -
DCAT-AP v x.x.x (
euro_dcat_ap
dcat_ap_x.x.x
): ckan_dataset_edp_x_x_x.json
-
Original profile (
euro_dcat_ap
): ckan_dataset_edp_original.rdf -
DCAT-AP vx.x.x (
euro_dcat_ap
dcat_ap_x.x.x
): ckan_dataset_edp_2_0_1.rdf
ckandext-dcatapedp is open and licensed under the GNU Affero General Public License (AGPL) v3.0 whose full text may be found at: