Tuesday 6 March 2012

Set up your own SPARQL endpoint with Sesame/OWLIM

Occasionally, you need to query an RDF repository and if you know SPARQL, an easy way to do this is to set up a SPARQL endpoint. With Sesame this is easy as you get the workbench included in each release of Sesame, so all you need to do is drop it in the tomcat's webapp folder:

1. Install tomcat
2. Download Sesame and copy 2 wars (wars are usually in a folder such as openrdf-sesame-2.6.3/war/) into webapps dir
3. Start tomcat

However, this won't give you any reasoning, so what you might find more useful is to use OWLIM instead:

1. Shut down tomcat
2. Place create-owlim.xsl in $TOMCAT_ROOT/webapps/openrdf-workbench/transformations
3. Copy owlim jar and lucene jar to
- openrdf-workbench/WEB-INF/lib
- openrdf-sesame/WEB-INF/lib
4. Copy ttl file (e.g. owlim-lite.ttl or owlim-se.ttl) from templates folder into:
$TOMCAT/webapps/openrdf-workbench/WEB-INF/classes/org/openrdf/console/owlim.ttl (for versions of tomcat older than 6 this will probably be
$TOMCAT_ROOT/webapps/openrdf-sesame/WEB-INF/lib/org/openrdf/console/owlim.ttl)

4. Start tomcat
5. Go to:
http://localhost:8081/openrdf-workbench/repositories/NONE/create?type=owlim-se
OR
http://localhost:8081/openrdf-workbench/repositories/NONE/create?type=owlim-lite

No comments:

Post a Comment