GraphDB-SE Installation

compared with
Version 5 by Reneta Popova
on Aug 25, 2014 18:32.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (22)

View Page History
h4. Can not create a GraphDB-SE repository using the Sesame console

Make sure that the repository template file \[GraphDBSE\]/templates/owlim-se.ttl GraphDBSE/templates/owlim-se.ttl has been copied to the 'templates' subdirectory of the Sesame console's data directory.

h4. Can not create an GraphDB-SE repository, the Sesame console says unknown Sail type -- owlim:Sail

The Sesame console can not find the GraphDB-SE jar file. Make sure it was copied from \[GraphDBSE\]/lib GraphDBSE/lib to the Sesame installation folder here: \[SESAME\]/lib SESAME/lib

h4. A long error message/Java exception is given when trying to query a new repository instance.
h2. Required software

This guide covers installing and configuring the Jena adapter for [GraphDB-SE|http://www.ontotext.com/owlim/]. [GraphDB-SE|http://www.ontotext.com/products/ontotext-graphdb/graphdb-standard/]. Required software for this comprises:
* [Jena|https://repository.apache.org/content/repositories/releases/org/apache/jena/jena-core/] version 2.7 (tested with version 2.7.3)
* [ARQ|https://repository.apache.org/content/repositories/releases/org/apache/jena/jena-arq/] (tested with version 2.9.3)
h2. Description of the GraphDB-SE Jena adapter

The GraphDB-SE Jena adapter is essentially an implementation of the [Jena|http://jena.sourceforge.net/index.html] *DatasetGraph* _DatasetGraph_ interface that provides access to individual triples managed by an GraphDB-SE repository through the Sesame API interfaces.
It is not a general purpose Sesame adapter and cannot be used to access any Sesame compatible repository, because it utilises an internal GraphDB-SE API to provide more efficient methods for processing RDF data and evaluating queries.
The adapter comes with its own implementation of a [Jena|http://jena.sourceforge.net/index.html] 'assembler' factory to make it easier to instantiate and use with those related parts of the Jena framework, although one can instantiate an adapter directly by providing an instance of a Sesame *SailRepository* (an GraphDB-SE *GraphDBRepository* implementation). Query evaluation is controlled by the ARQ engine, but specific parts of a Query (mostly batches of statement patterns) are evaluated natively through a modified *StageGenerator* plugged into the Jena runtime framework for efficiency. This also avoids unnecessary cross-api data transformations during query evaluation.
// finally, create the DatasetGraph instance
SesameDataset dataset = new SesameDataset(connection);
{code}From now on the {{SesameDataset}} object can be used through the Jena API as regular Dataset, e.g. to add some data into it one could do something like the following:
{code}Model model = ModelFactory.createModelForGraph(dataset.getDefaultGraph());
Resource r1 = model.createResource("http://example.org/book#1") ;
h2. Instantiate GraphDB-SE adapter using the provided Assembler

Another approach is to use the Jena assemblers infrastructure to instantiate an GraphDB-SE Jena adapter. For this purpose the required configuration must be stored in some valid RDF serializsation 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.

{noformat}
otjena:datasetParam "./location" .
{noformat}
The {{ja:loadClass\*}} statements ensure that the GraphDB-SE Jena adapter factory class file(s) are initializsed and plugged into the Jena framework prior to be 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:

{code:xml}
h2. Using GraphDB-SE with the Joseki server

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:

{noformat}<#service1>
h1. Using GraphDB-SE with TopBraid Composer

All versions of GraphDB can be used with [TopBraid Composer/Live|http://www.topquadrant.com/products/TB_Suite.html], 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:

# Download the GraphDB bundle from Ontotext and copy it to the TopBraid Composer 'plugins' directory;
# Restart TopBraid Composer;
# Use the update manager to install the "GraphDB connector for TopBraid" from [http://www9.ontotext.com].

From now on GraphDB can be used with TBC in several ways as described below.

# Create an GraphDB database:
## Select File->New->Other... then type GraphDB (to reduce the options) and then choose "RDF/OWL Local Owlim Database";
## Make any changes to the default configuration and press 'Create';
## Select in navigator view and open;
## It is now possible to use the SPARQL query view.

# Export to an GraphDB database:
## Open an ontology file;
## Select File->export->TopBraid Composer->Export/Merge/Convert RDF graphs;
## Choose "RDF/OWL Local Owlim Database";
## Complete the configuration.

h2. Memory requirements