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?