Extension creates a new tab in the dataset view that enables you to upload selected resources to a connected jena fuseki triple store.
Needs a running instance of jena fuseki, see for example docker-compose file in optional folder. Point at it through env variables. Also needed is an api-token for an account with the admin privileges to make the background job work on private datasets and resources.
- Apache Jena and Fuseki server need to be running.
- A sparklis web app for querying the dataset, see optional folder for a container deployment of jena fuseki and sparklis.
ckanext-fuseki is an extension for enabling the semantic aspect of CKAN with Apache Jena.
This extension provides an ability to let users store a set of semantic resource (e.g. rdf, ttl, owl) in Apache Jena and perform SPARQL semantic queries.
Compatibility with core CKAN versions:
CKAN version | Compatible? |
---|---|
2.8 and earlier | not tested |
2.9 | yes |
2.10 | yes |
TODO: Add any additional installation steps to the list below. For example, installing any non-Python dependencies or adding any required config settings.
To install ckanext-fuseki:
- Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
- Clone the source and install it on the virtualenv
git clone https://github.com/Mat-O-Lab/ckanext-fuseki.git
cd ckanext-fuseki
pip install -e .
pip install -r requirements.txt
-
Add
fuseki
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini
). -
Restart CKAN. For example, if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
FUSEKI_CKAN_TOKEN=${CKAN_API_TOKEN}
CKANINI__CKANEXT__FUSEKI__URL = http://<fuseki_host>:<fuseki_port>/
CKANINI__CKANEXT__FUSEKI__USERNAME = <admin_user>
CKANINI__CKANEXT__FUSEKI__PASSWORD = *****
or ckan.ini parameters.
ckan.jena.fuseki.url = http://<fuseki_host>:<fuseki_port>/
ckan.jena.fuseki.username = <admin_user>
ckan.jena.fuseki.password = *****
If no Api Token is given, only public resources can be uploaded to the triple store!
You can set the default formats to preselected for upload by setting the formats,
CKANINI__CKANEXT__FUSEKI__FORMATS = 'json turtle text/turtle n3 nt hext trig longturtle xml json-ld ld+json'
else it will react to the listed formats by default
if a sparklis web app is available, you can set
CKANINI__CKANEXT__FUSEKI__SPARKLIS__URL = http://<sparklis_host>:<sparklis_port>/
the query button will redirect to sparklis instead.
This project's work is based on a fork of the repo etri-odp/ckanext-jena, and we like to thank the authors of that project for sharing their work. It was supported by Institute for Information & communications Technology Promotion (IITP) grant funded by the Korea government (MSIT) (No.2017-00253, Development of an Advanced Open Data Distribution Platform based on International Standards)