public static Plan createPlan(String queryStr, Graph graph) { return createPlan(QueryFactory.create(queryStr), graph) ; }
public static Plan createPlan(String queryStr, DatasetGraph dataset) { return createPlan(QueryFactory.create(queryStr), dataset) ; }
public static Plan createPlan(Element pattern, DatasetGraph dataset) { return createPlan(toQuery(pattern), dataset, null) ; }
public static Plan createPlan(Element pattern, Graph graph) { return createPlan(toQuery(pattern), graph) ; }
public static Plan createPlan(Element pattern, DatasetGraph dataset, Binding input) { return createPlan(toQuery(pattern), dataset, input) ; }
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 ; }