This section is for users and system administrators that are unfamiliar with the GraphDB-SE semantic repository software. The information contained in the following pages should be enough to get started with GraphDB-SE, i.e. to install and configure the software so that repository instances can be created and used.
GraphDB-SE is packaged as a Storage and Inference Layer (SAIL) for the Sesame RDF framework. GraphDB-SE can be used in two different ways:
The rest of this section gives detailed step by step instructions for installing and configuring Sesame and GraphDB-SE, leading up to the creation of a GraphDB-SE repository using the Sesame console (a command line script). For more information please check the "doc" folder of the GraphDB-SE distribution zip file.
In most cases, upgrading GraphDB-SE can be achieved simply by replacing the GraphDB and bundled 3rd party jar files. The required version of the Sesame framework for the recent OWLIM versions is given in the following table:
Sometimes, the binary format of the storage files for different versions of BigOWLIM/OWLIM-SE/GraphDB-SE are not compatible. However, storage files created with version 3.1 and upwards will be automatically upgraded when using a later version of Owlim/GraphDB. However, this is a one-way process and no downgrade facility is provided.
GraphDB is normally built against the latest stable version of the Aduna OpenRDF Sesame framework. If using GraphDB with this version then the easiest way to deploy a GraphDB server instance is to copy the re-packaged Sesame Web applications (.war files) in to the Tomcat webapps directory. These can be found in the sesame_graphdb directory in the GraphDB distribution ZIP file. These Web applications have been modified as follows:
After deployment, a GraphDB-SE instance can be created using the workbench application as follows:
This longer install process should be used when a different or modified version of Sesame is being used. In this case, all the GraphDB-SE files need to be installed alongside Sesame in a step-by-step process as follows.
A suitable application server must be installed. The examples in this guide assume Apache Tomcat version 6.x is used. Importantly, the user must have sufficient privileges to write to the Tomcat webapps directory and to stop and start the Tomcat daemon.
No part of this guide is intended to supersede the documentation published with these 3rd party software components and the reader is strongly advised to familiarise himself/herself with these.
Assuming that an instance of Tomcat is available, the installation proceeds as follows:
The status of the new repository can be checked using the Sesame workbench. Type the following URL in to a browser:
When running on Fedora linux, Tomcat uses the following directories:
On a machine running Windows, Tomcat uses the following directories:
The Sesame framework is published as a zip file,which is installed simply by unzipping it in to the target directory. This directory is called [SESAME_INSTALL] in this guide.
This directory is called [ADUNA_DATA] elsewhere in this guide. It can be overridden by setting a Java system property. When using Tomcat, this can be achieved by setting the JAVA_OPTS environment variable, for example (linux and Windows respectively):
Note that setting this environment variable must be done by the same user that runs the Tomcat server. This may not be the case when using 'sudo' to set up/start Tomcat, for instance when using port numbers below 1024, when it is necessary to run Tomcat with root privileges.
The Sesame server and workbench use SLF4J for logging, although they each map to different underlying logging implementations. The Sesame server has bindings to logback, whereas the Sesame workbench has bindings to the Java Runtime logging framework. By default, the Sesame server logs to:
The default log level is INFO, but this can be adjusted after the first run by editing:
GraphDB also uses SLF4J for logging and the distribution includes the SLF4J-to-Java-logging mapping jar file. The repackaged openrdf-sesame war file that comes with GraphDB does not have this mapping, so in this case GraphDB logs as Sesame does to the logback framework.
Tomcat uses log4j and the logging details can set up by editing this file (on Linux):
or this file on Windows:
By default, the Tomcat logs (on Linux) are written to:
and the logs (on Windows) are written to:
This directory will not exist until the Sesame war files have been deployed to the [WEBAPPS] directory AND Tomcat is running. If the war files have been deployed, but the directory does not exist, try restarting Tomcat.
Can not connect the Sesame console to the local Sesame server at http://localhost:8080/openrdf-sesame
Make sure that the Sesame war files have been deployed and that Tomcat is running. Restart Tomcat if necessary.
Make sure that the repository template file GraphDBSE/templates/owlim-se.ttl has been copied to the 'templates' subdirectory of the Sesame console's data directory.
The Sesame console can not find the GraphDB-SE jar file. Make sure it was copied from GraphDBSE/lib to the Sesame installation folder here: SESAME/lib
The Lucene jar file must be copied from the GraphDB-SE distribution to the Sesame server's WEB-INF/lib directory. Restart Tomcat if necessary.
The tools.jar file from the Java Development Kit (JDK) must be on the classpath or alternatively copied to Sesame server's WEB-INF/lib directory.
The maximum heap space must be increased, i.e. Tomcat's Java virtual machine must be allowed to allocate more memory. This can be done by setting the environment variable 'CATALINA_OPTS' to include the desired value, e.g. -Xmx1024m
This section is for users and system administrators that are unfamiliar with the GraphDB-SE Jena adapter. The information contained in the following pages should be enough to get started with this software, i.e. to install and configure a GraphDB-SE repository and access it via the Jena API or Jena compatible tools.
This guide covers installing and configuring the Jena adapter for GraphDB-SE. Required software for this comprises:
No part of this guide is intended to supersede the documentation published with these software components and the reader is strongly advised to familiarise himself/herself with these.
The GraphDB-SE Jena adapter is essentially an implementation of the Jena DatasetGraph interface that provides access to individual triples managed by a GraphDB-SE repository through the Sesame API interfaces.
In this approach, a GraphDB-SE repository is first created and wrapped in a Sesame SailRespository. Then a connection to it is used to instantiate the adapter class SesameDataset. The following example helps to clarify:
and can also be used to evaluate queries through the ARQ engine:
Another approach is to use the Jena assemblers infrastructure to instantiate a GraphDB-SE Jena adapter. For this purpose the required configuration must be stored in some valid RDF serialisation format and its contents read into a Jena model. Then, the assembler can be invoked to get an instance of the Jena adapter. The following example specifies an adapter instance in N3 format.
The ja:loadClass* statements ensure that the GraphDB-SE Jena adapter factory class file(s) are initialised and plugged into the Jena framework prior to being invoked. Then the #dataset description tells the Jena framework to expect instances of otjena:SesameDataset to be created by this factory. The following example uses such a description stored in the file owlimbridge.n3 to get an instance of the Jena adapter:
After this, the adapter is ready to be used, for example to evaluate some query through the ARQ engine using the same approach described a few paragraphs above.
In order to use a GraphDB-SE repository with the Joseki server one needs only to configure it as a dataset, so that the Jena assembler framework is able to instantiate it. An example Joseki configuration file that makes use of such a dataset description could looks like the following. First we describe a service that hosts the dataset:
Then we describe that dataset:
All versions of GraphDB can be used with TopBraid Composer/Live, when set up using the Sesame HTTP server. When running TopBraid Composer, simply select File->New...->RDF/OWL Sesame2 RDF Repository Connection and enter the details (most importantly the server URL and repository ID).
However, TopBraid Composer can also use GraphDB-SE embedded, i.e. without needing to set up a server. To use TopBraid Composer and GraphDB-SE in this way, two components need to be installed:
The outline of the steps needed are as follows:
From now on GraphDB can be used with TBC in several ways as described below.
The default settings for TBC give it a rather small heap space, which is only suitable for small databases. Edit the file "TopBraid Composer.ini" in TBC's install directory and change the following two settings as shown:
Increase -Xmx for larger databases.
Skip to end of metadata Go to start of metadata