ckanext-dcatapchharvest
CKAN extension for DCAT-AP-CH harvesting for opendata.swiss.
Requirements
- CKAN 2.8+
- ckanext-dcat
- ckanext-fluent
- ckanext-scheming
Installation
To install ckanext-dcatapchharvest:
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-dcatapchharvest Python package into your virtual environment:
pip install ckanext-dcatapchharvest
Add dcat_ch_rdf_harvester ogdch_dcat to the ckan.plugins setting in your CKAN
config file (by default the config file is located at
/etc/ckan/default/production.ini).
Restart CKAN. For example if you’ve deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
Development Installation
To install ckanext-dcatapchharvest for development, activate your CKAN virtualenv and
do:
git clone https://github.com/ogdch/ckanext-dcatapchharvest.git
cd ckanext-dcatapchharvest
python setup.py develop
pip install -r dev-requirements.txt
pip install -r requirements.txt
Mapping datetime fields from RDF
DCAT-AP CH allows the following date/datetime datatypes for datetime fields:
- xsd:dateTime
- xsd:date
- xsd:gYearMonth
- xsd:gYear
- schema:Date } only for temporals specified as schema:startDate and schema:endDate (deprecated)
- schema:DateTime }
Values in any of the xsd datatypes above are automatically parsed as ISO-compatible datetimes or dates by rdflib
when the graph is created (i.e. before the ckanext-dcat RDFParser has access to it.) This limits the validation
we can perform on the data as published by data publishers.
We only consider the parts of the date that are expected from the given data_type, e.g. the year of an xsd:gYear,
even if the month and day have been included in the datetime_value. If a datetime_value with data_type of
xsd:dateTime or schema:DateTime does not contain time information, we discard it.
I