public void close() { if ( queryIterator != null ) queryIterator.close() ; if ( plan != null ) plan.close() ; cancelPingback() ; }
static public QueryIterator execRef(Op op, DatasetGraph ds) { QueryEngineRef qe = new QueryEngineRef(op, ds, null) ; return qe.getPlan().iterator() ; }
public static void printPlan(Query query, QueryExecution qe) { QueryEngineFactory f = QueryEngineRegistry.findFactory(query, qe.getDataset().asDatasetGraph(), ARQ.getContext()) ; if ( f == null ) System.err.println("printPlan: Unknown engine type: "+Utils.className(qe)) ; Plan plan = f.create(query, qe.getDataset().asDatasetGraph(), BindingRoot.create(), ARQ.getContext()) ; SerializationContext sCxt = new SerializationContext(query) ; IndentedWriter out = IndentedWriter.stdout ; plan.output(out, sCxt) ; out.flush(); }
public static void printPlan(Query query, QueryExecution qe) { QueryEngineFactory f = QueryEngineRegistry.findFactory(query, qe.getDataset().asDatasetGraph(), ARQ.getContext()) ; if ( f == null ) System.err.println("printPlan: Unknown engine type: "+Utils.className(qe)) ; Plan plan = f.create(query, qe.getDataset().asDatasetGraph(), BindingRoot.create(), ARQ.getContext()) ; SerializationContext sCxt = new SerializationContext(query) ; IndentedWriter out = IndentedWriter.stdout ; plan.output(out, sCxt) ; out.flush(); }
static public QueryIterator exec(Op op, DatasetGraph ds) { QueryEngineFactory f = QueryEngineRegistry.findFactory(op, ds, null) ; Plan plan = f.create(op, ds, BindingRoot.create(), null) ; return plan.iterator() ; }
divider() ; IndentedWriter out = new IndentedWriter(System.out, false) ; plan.output(out) ; out.flush();
@Override public void close() { if ( queryIterator != null ) queryIterator.close() ; if ( plan != null ) plan.close() ; if ( timeout1Callback != null ) alarmClock.cancel(timeout1Callback) ; if ( timeout2Callback != null ) alarmClock.cancel(timeout2Callback) ; }
static public QueryIterator exec(Op op, DatasetGraph ds) { QueryEngineFactory f = QueryEngineRegistry.findFactory(op, ds, null) ; Plan plan = f.create(op, ds, BindingRoot.create(), null) ; return plan.iterator() ; }
divider() ; IndentedWriter out = new IndentedWriter(System.out, false) ; plan.output(out) ; out.flush();
protected static List<Binding> evalBindings(Query query, DatasetGraph dsg, Binding initialBinding) { List<Binding> bindings = new ArrayList<Binding>() ; if ( query != null ) { Plan plan = QueryExecutionFactory.createPlan(query, dsg, initialBinding) ; QueryIterator qIter = plan.iterator() ; for( ; qIter.hasNext() ; ) { Binding b = qIter.nextBinding() ; bindings.add(b) ; } qIter.close() ; } else { if ( initialBinding != null ) bindings.add(initialBinding) ; else bindings.add(BindingRoot.create()) ; } return bindings ; }
protected static Iterator<Binding> evalBindings(Query query, DatasetGraph dsg, Binding inputBinding, Context context) { // SET UP CONTEXT // The UpdateProcessorBase already copied the context and made it safe ... but that's going to happen again :-( Iterator<Binding> toReturn ; if ( query != null ) { Plan plan = QueryExecutionFactory.createPlan(query, dsg, inputBinding, context) ; toReturn = plan.iterator(); } else { toReturn = Iter.singleton((null != inputBinding) ? inputBinding : BindingRoot.create()) ; } return toReturn ; }
static public QueryIterator execRef(Op op, DatasetGraph dsg) { QueryEngineRef qe = new QueryEngineRef(op, dsg, ARQ.getContext().copy()) ; return qe.getPlan().iterator() ; }
private void startQueryIterator() { execInit() ; if ( queryIterator != null ) Log.warn(this, "Query iterator has already been started") ; initTimeout1() ; // We don't know if getPlan().iterator() does a lot of work or not // (ideally it shouldn't start executing the query but in some sub-systems // it might be necessary) queryIterator = getPlan().iterator() ; // Add the second timeout wrapper. queryIterator = initTimeout2(queryIterator) ; if ( cancel ) queryIterator.cancel() ; }
Plan plan = factory.create(op, getDataset(), BindingRoot.create(), null) ; QueryIterator qIter = plan.iterator() ;
Plan plan = factory.create(op, getDataset(), BindingRoot.create(), null) ; QueryIterator qIter = plan.iterator() ;
private QueryIterator nodesReifTriple(Node node, TripleMatch triple) { Binding b = BindingRoot.create() ; if ( node == Node.ANY ) node = null ; if ( node != null || triple != null ) { b = new BindingMap(b) ; if ( node != null ) bind(b, reifNodeVar, node) ; if ( triple != null ) { bind(b, varS, triple.getMatchSubject()) ; bind(b, varP, triple.getMatchPredicate()) ; bind(b, varO, triple.getMatchObject()) ; } } Plan plan = factory.create(op, ds, b, null) ; QueryIterator qIter = plan.iterator() ; return qIter ; }