Extension Dcatapchharvest


Extension Basics

Title
Dcatapchharvest
Name
ckanext-dcatapchharvest
Type
Public extension
Description
The **ckanext-dcatapchharvest** extension enhances CKAN's harvesting capabilities specifically for
CKAN versions
Download-Url (zip)
Last commit
7 months ago (2025-05-30 14:10:15)
Url to repo
Category
Standards Compliance


Background Infos

Description (long)
Show details

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:

  1. Activate your CKAN virtual environment, for example:

    . /usr/lib/ckan/default/bin/activate

  2. Install the ckanext-dcatapchharvest Python package into your virtual environment:

    pip install ckanext-dcatapchharvest

  3. 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).

  4. 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

Version
Version release date
(not set)
Contact name
(not set)
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

To install ckanext-dcatapchharvest:

  1. Activate your CKAN virtual environment, for example:

    . /usr/lib/ckan/default/bin/activate

  2. Install the ckanext-dcatapchharvest Python package into your virtual environment:

    pip install ckanext-dcatapchharvest

  3. 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).

  4. Restart CKAN. For example if you’ve deployed CKAN

Plugins to configure (ckan.ini)
dcatapchharvest
CKAN Settings (ckan.ini)
# ckanext.dcat_ch_rdf_harvester.test_env_urls = https://test.example.com,https://staging.example.com 
DB migration to be executed
(not set)
<< back to Extensions