To fulfill your request, I think you are using:
QueryExecutionFactory.sparqlService(String service, Query query)
One thing you could try:
QueryEngineHTTP objectToExec=QueryExecutionFactory.sparqlService("http://dbpedia.org/sparql",YOUR_QUERY); objectToExec.addParam("timeout","5000");
It seems that QueryEngineHTTP implements QueryExecution , which has an addParam method. There is no description of this method, but I would suggest that it adds a parameter to the HTTP request.
Let me know if this works!
Edited to fix the error, in fact it was the other way around ... QueryEngineHTTP implements QueryExecution
source share