2

I have created a SAIL object using tinkerpop blueprints to load RDF data into a Graph database. Ive successfully managed to load the data. The Graph database in question does not have a sparql endpoint to run my query mix test driver. Does anyone know if it possible and if so then how to make a sparql endpoint accessible to my test driver java code over an HTTP server? I am aware 4store, BigData and some other stores have their own built in sparql servers for querying. I am wondering if it is possible to make a sparql server like that available for my Sail object store if the underlying graph database does not provide its own implementation of the server.

Thanks in advance.

This is how far I have progressed:

I have deployed open-rdf sesame war via tomcat to get access to the server and this is how far I got with preparing the repository (the data is already loaded)

OrientGraph g = new OrientGraph("remote:host/Test", "admin", "admin");  
Sail sail = new GraphSail<KeyIndexableGraph>(g);  
Repository rep = new SailRepository(sail);  
rep.initialize();  
RepositoryConnection conn = rep.getConnection();  

I am not sure how to handle the querying, in a separate file I did some basic querying using: https://github.com/tinkerpop/blueprints/wiki/Sail-Ouplementation.

However, I noticed that the querying done using this is very limited in the sense that only basic patttern matching with edges was possible.

For example, a basic query with predicate like: select distinct ?var1 ?var2 where { ?var2 predicate ?var1 .}

Whereas if I also provide the subject, select distinct ?var1 where { subject predicate ?var1 .}

returns no results even when I can see a corresponding result in the file.

My question here is how can I run full sparql queries? Will the endpoint help?

user284350
  • 21
  • 3
  • 1
    A SAIL is an intermediate layer in the Sesame architecture. All you need to do is wrap your SAIL in a Sesame Repository and then expose that Repositiroy via the Sesame Server application for it to have a SPARQL endpoint. – Jeen Broekstra Sep 16 '14 at 23:43
  • Hi! I know this is really old but I would like to try this option, the trouble is I am not very sure where to start, I have been able to catch hold of some topics to learn how to wrap the sail into a sesame repository but I still cannot find information on how to make it accessible via an endpoint. Would you know of any good examples/links on how to carry out this process? – user284350 Jan 06 '15 at 11:27
  • You (at least I assume it was you) also posted this same question on the sesame-users list (see https://groups.google.com/d/msg/sesame-users/QAx3BaOfKwo/6dZYeZrSDCAJ ) and I provided quite an extensive answer there. – Jeen Broekstra Jan 06 '15 at 22:55

1 Answers1

1

If your graph is in Blueprints-enabled then you can expose the Graph instance via Rexster and use the SPARQL extension:

https://github.com/tinkerpop/rexster/tree/master/rexster-kibbles/sparql-kibble

stephen mallette
  • 45,298
  • 5
  • 67
  • 135
  • Hi! thanks for you response! I have started looking into this option. I understand the sparql kibble works only for sail graph implementations. My graph at the physical storage level is an OrientGraph. I only loaded data into it using tinkerpop stack. Do you have any suggestions as to how I can expose it as a Sail graph for the rexster.xml? Because it requires physical location of the sail graph in the parameter. Thanks in advance! – user284350 Oct 01 '14 at 13:45
  • hmmm - yeah I was a bit hasty in my response perhaps. I guess the only thing you could do is configure your OrientDB Graph in Rexster. Then your only option is to use issue requests via RexPro or via the Gremlin Extension in REST. In these reuqests you would wrap the OrientDB Graph instance in `GraphSail` and then issue SPARQL to that: https://github.com/tinkerpop/blueprints/wiki/Sail-Ouplementation – stephen mallette Oct 01 '14 at 15:41