All,

To get the Jena RDF/XML-ABBREV syntax, I run some queries through Jena. 
I need to set define sql:describe-mode "SPO" and also the default graph URI, 
and for the SPARQL endpoint, this is trivially done by setting 
DB.DBA.SYS_SPARQL_HOST, and that works great.

But how do I set it when using JDBC? 

I have tried to pass defines from the code, e.g.:
        sparql = QueryFactory.create(
                            "define sql:describe-mode \"SPO\"\n" +
                            "define input:default-graph-uri " + defaultGraph 
+ " \n" +
                            req.getParameterValues("query")[0]);

but that seems to cause Jena to croak and say the query is invalid. 

Then, the question is of course whether using JDBC gives me much? I could just 
use the endpoint and then parse and reserialise the result, but that seems 
wasteful. 


Kind regards 

Kjetil Kjernsmo
-- 
Senior Knowledge Engineer
Mobile: +47 986 48 234
Email: kjetil.kjern...@computas.com   
Web: http://www.computas.com/

|  SHARE YOUR KNOWLEDGE  |

Computas AS  PO Box 482, N-1327 Lysaker | Phone:+47 6783 1000 | Fax:+47 6783 
1001


Reply via email to