Connect to existing Sesame native datastore

146 Views Asked by At

I've created a Sesame native datastore, and I want to build a SPARQL endpoint with servlet and jsp to query my native RDF data, but I don't know how to connect to my existing native datastore programmtically in Java. How can I do this?

1

There are 1 best solutions below

1
On

To set up a SPARQL endpoint which you can query remotely, you should set up a Sesame server. This is a ready-made web application which you can deploy/run in Tomcat or Jetty, and which you can then connect to remotely, e.g. from your JSP/servlet tool. You can either create a new store manually on your Sesame server (e.g. using the Sesame Workbench tool), or programmatically, by using a RemoteRepositoryManager to connect to the server. See this weblog for details on how to work with RepositoryManagers.

Once you have the repository set up on your server, you can connect to it from Java/JSP using a HTTPRepository object. See the user documentation for details.