use of org.apache.jena.sparql.exec.QueryExecDatasetBuilder in project jena by apache.
the class QueryExecutionFactory method make.
private static QueryExecution make(Query query, Dataset dataset, DatasetGraph datasetGraph, Binding initialBinding) {
QueryExecDatasetBuilder builder = QueryExecDataset.newBuilder().query(query);
if (initialBinding != null)
builder.initialBinding(initialBinding);
if (dataset == null && datasetGraph == null)
return QueryExecutionCompat.compatibility(builder, null, query, builder.getQueryString());
if (dataset == null) {
builder.dataset(datasetGraph);
dataset = DatasetFactory.wrap(datasetGraph);
} else {
builder.dataset(dataset.asDatasetGraph());
}
return QueryExecutionCompat.compatibility(builder, dataset, query, builder.getQueryString());
}
use of org.apache.jena.sparql.exec.QueryExecDatasetBuilder in project jena by apache.
the class SPARQLQueryProcessor method createQueryExecution.
/**
* Create the {@link QueryExecution} for this operation.
* @param action
* @param query
* @param dataset
* @return QueryExecution
*/
protected QueryExecution createQueryExecution(HttpAction action, Query query, DatasetGraph dataset) {
QueryExecDatasetBuilder builder = QueryExec.newBuilder().dataset(dataset).query(query).context(action.getContext());
setTimeouts(builder, action);
QueryExec qExec = builder.build();
return QueryExecutionAdapter.adapt(qExec);
}
Aggregations