Joseki Installation

The Joseki download can be used to run Joseki in serveral forms - as a standalone server, as a web application inside Tomcat or Jetty or embedded in a larger application.

There is a full, "download-and-go" form that contains everything you need running a standalone server; this includes copies of all the JARs files needed from other systems.  Other packaging may be available. This page assumes you have downloaded the full version.

Download structure

The Joseki server is packaged under a single directory named "Joseki-<version>", where "<version>" is the release version number. The main directories and files are:

Installation process

Having unpacked the download file, go to the root directory of the download.

The default Joseki configuration file is etc/joseki.n3.  You wil need to write your own to identify the models you wish to publish.  The installation can be tested with the configuration file in the download: the models are "testdata" and "books".

Set up

Set the classpath: put all the JAR files in the lib/ directory on your classpath.

# Linux/Unix/Cygwin:
cd <the root directory>
export JOSEKIROOT="$PWD"
export CLASSPATH="$(bin/joseki_path)"
 
@REM Windows
cd <the root directory>
set JOSEKIROOT=<the root directory>
bin\joseki_path
set CLASSPATH=%CP%

Test

Still in that directory, run some of the test suite.

 java junit.textui.TestRunner org.joseki.test.JosekiTests

This loads configuration from etc/.  There should be the server log file output on the standard output stream.  Some of the log messages say "error"; this is expected as the tests are of incorrect requests.

Publish your model

You should be able to write a configuration file and run the server:

java joseki.rdfserver <YourConfigurationFile>

The server prints its log file to standard out and this process does not terminate until the server exits.

The server can also be conveniently run with the script rdfserver.

Querying a model

From another shell or window, you can query the running server.  A plain GET can be done using wget:

wget -q -O - http://localhost:2020/<YourModel>

and RDQL queries can be executed on the server with (making sure you have the classpath set):

# Linux/Unix/Cygwin: NB Single quotes on the query
java joseki.rdfqueryremote --model http://localhost:2020/books \
     'SELECT * WHERE (?x, ?y, ?z)'

REM Windows
java joseki.rdfqueryremote --model http://localhost:2020/books \
     "SELECT * WHERE (?x, ?y, ?z)"

Helper Scripts

There are scripts in the bin/ directory to run each of the applications.  They need JOSEKIROOT environment variable set but will set the classpath themselves. They have not been widely tested.

Support

Please email jena-dev@groups.yahoo.com with any questions you might have.