Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

SAIL Ouplementation, SPARQL Query handling

maxmax Posts: 1
edited October 2014 in Miscellaneous

Hi! I have been following the guidlines provided here: https://github.com/tinkerpop/blueprints/wiki/Sail-Ouplementation to run SPARQL queries on the RDF data that I loaded into OrientDB for a while now.

Here is my code:

OrientGraph g = new OrientGraph("remote:xxx/Test", "admin", "admin");
System.out.println("Before sail");
Sail osail = new GraphSail(g);
System.out.println("After sail");
osail.initialize();
SailConnection sc = osail.getConnection();
SPARQLParser parser = new SPARQLParser();
CloseableIteration<? extends BindingSet, QueryEvaluationException> sparqlResults;
String queryString = "xxx";

ParsedQuery query = parser.parseQuery(queryString, "xxx");

System.out.println("\nSPARQL: " + queryString);
sparqlResults = sc.evaluate(query.getTupleExpr(), query.getDataset(), new EmptyBindingSet(), false);
while (sparqlResults.hasNext()) {
System.out.println(sparqlResults.next());

I keep getting the following error message: Exception in thread "main" org.openrdf.rio.UnsupportedRDFormatException: No parser factory available for RDF format N-Triples (mimeTypes=text/plain; ext=nt)
at org.openrdf.rio.Rio.createParser(Rio.java:198)
at com.tinkerpop.blueprints.oupls.sail.GraphSail.(GraphSail.java:111)
at com.master.thesis.squery.runsquery(squery.java:28)
at com.master.thesis.first.main(first.java:23)

Line 28 in my code is : Sail osail = new GraphSail(g); This is where the Exception error

Do you have any idea.. what I might be doing wrong here?

Comments

  • EdwinEdwin Posts: 648
    edited October 2014

    Good question, but I don't think you'll find much help here. This forum is concerned with OpenSesame and other Python packages (you might want to try Stack Overflow).

    Sorry and good luck!

Sign In or Register to comment.