Installation and setup
This is the Linked Data Demonstrator ran by WUR. It is currently running at https://www.plantbreeding.wur.nl/ld-demonstrator/.
Instructions for its setup can be found below.
This project is based on an earlier version of DTL's linked data demonstrator.
Set up Blazegraph
-
Get the executable jar.
-
Run the server:
java -server -Xmx4g -jar path/to/blazegraph.jar
-
The Blazegraph GUI should now be live at
http://localhost:9999
-
Create a namespace for your project at
http://localhost:9999/blazegraph/#namespaces
.
For this example, the namespace will be ldd-demo
. After creating it, make sure to also Use
the namespace.
-
Adapt your data into the semantic model used by the demonstrator (see section below).
-
Go to the Update tab to load your data (triples). You can click on
Browse
to manually select your files in the filesystem, or provide the commands in the interface with the absolute paths for the files (e.g.load <file:///tmp/blazegraph/data.n3>
), as seen on the screenshot. Make sure that the correct namespace is used.
- Verify that this particular namespace can be queried. You can do this through the
Query tab
.
Alternatively, you can submit a request directly. E.g. to query withselect distinct ?p where {?s ?p ?o} limit 10
, navigate tohttp://localhost:9999/blazegraph/namespace/ldd-demo/sparql?format=json&query=select distinct ?p where {?s ?p ?o} limit 10
In this case, the base URL for querying your namespace ishttp://localhost:9999/blazegraph/namespace/ldd-demo/sparql
.
Set up the redirection layer
Clone the linked-data-demo_redirect project and follow the instructions there.
Additionally, you will likely have to modify the js/config.js
file in this project, and make it point to the location where the redirection script is running. This is stated in the SPARQL_ENDPOINT variable.
Bringing your data to the demonstrator format
The demonstrator expects RDF. Feel free to produce your own file, as long as it adheres to the semantic model as described here (schema) and here (publication).
Note that placeholder terms have been used where necessary (prefix WUR_ont
).
For ease of use, you can fill in the excel template provided in this project with some of your data, and then run the accompanying script to convert it into a turtle file.
The conversion script has been tested on Python 2.7 and 3.5, and uses the rdflib and xlrd modules. They can be installed through pip:
pip install xlrd
pip install rdflib
Fill in the template, and run the script on the excel file:
python data_template.xlsx
This will produce a data.ttl
file with your data formatted according to the demonstrator's semantic model.