Skip to content

Semantic data management extension with Apache Jena Fuseki for CKAN

License

Notifications You must be signed in to change notification settings

Mat-O-Lab/ckanext-fuseki

 
 

Repository files navigation

Tests

ckanext-fuseki

Extension creates a new tab in the dataset view that enables you to upload selected resources to a connected jena fuseki triple store.

image

Requirements

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.

Purpose

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.

Notes:

Compatibility with core CKAN versions:

CKAN version     Compatible?  
2.8 and earlier   not tested    
2.9             yes    
2.10             yes    

Installation

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:

  1. Activate your CKAN virtual environment, for example:
     . /usr/lib/ckan/default/bin/activate
  1. 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
  1. Add fuseki to the ckan.plugins setting in your CKAN    config file (by default the config file is located at    /etc/ckan/default/ckan.ini).

  2. Restart CKAN. For example, if you've deployed CKAN with Apache on Ubuntu:

     sudo service apache2 reload

Config settings

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.

Acknowledgements

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)

About

Semantic data management extension with Apache Jena Fuseki for CKAN

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.4%
  • HTML 9.3%
  • JavaScript 4.3%