This content has been marked as final. Show 3 replies
Please see the following code snippet.
qexec = QueryExecutionFactory.create(QueryFactory.create(szQuery, Syntax.syntaxARQ), oracleModel);
Model m1 = qexec.execConstruct();
FileWriter fw = new FileWriter(fileName);
I am not using java code here. In my system, there is joseki sparql service is running. I am using rdf.rb ruby sparql client for sparql queries. How do I get the results in Ntriples format? Now it returns in rdf/xml format.
I don't think N-TRIPLE is allowed as output format (http://www.w3.org/TR/rdf-sparql-protocol) from a SPARQL endpoint. You will have to convert it at your application.