use of org.apache.jena.sparql.exec.http.QuerySendMode in project jena by apache.
the class rsparql method exec.
@Override
protected void exec() {
Query query = modQuery.getQuery();
try {
String serviceURL = modRemote.getServiceURL();
QuerySendMode sendMode = modRemote.usePost() ? QuerySendMode.asPost : QuerySendMode.systemDefault;
QueryExecutionHTTP qe = QueryExecutionHTTPBuilder.create().endpoint(serviceURL).query(query).sendMode(sendMode).build();
QueryExecUtils.executeQuery(query, qe, modResults.getResultsFormat());
} catch (QueryExceptionHTTP ex) {
throw new CmdException("HTTP Exception", ex);
} catch (Exception ex) {
System.out.flush();
ex.printStackTrace(System.err);
}
}
Aggregations