/** Using BindingFcatory.create is better */ public BindingMap() { super(BindingRoot.create()) ; } // null?
public static Binding root() { return BindingRoot.create() ; }
/** Using BindingFactory.create is better */ public BindingHashMap() { super(BindingRoot.create()) ; } // null?
private QueryEngineBase(DatasetGraph dataset, Binding input, Context context) { this.context = context ; this.dataset = dataset ; // Maybe null e.g. in query if ( input == null ) { Log.warn(this, "Null initial input") ; input = BindingRoot.create() ; } this.startBinding = input ; }
public static NodeValue eval(Expr expr) { return eval(expr, BindingRoot.create()) ; }
public static NodeValue eval(Expr expr) { return eval(expr, BindingRoot.create()) ; }
public static QueryIterRoot create(ExecutionContext execCxt) { return new QueryIterRoot(BindingRoot.create(), execCxt) ; }
public static QueryIterRoot create(ExecutionContext execCxt) { return new QueryIterRoot(BindingRoot.create(), execCxt) ; }
private QueryEngineBase(DatasetGraph dataset, Binding input, Context context) { this.dataset = dataset ; // Maybe null e.g. in query this.context = setupContext(context, dataset) ; if ( input == null ) { Log.warn(this, "Null initial input") ; input = BindingRoot.create() ; } this.startBinding = input ; }
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() ; }
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() ; }
public UpdateEngineBase(GraphStore graphStore, UpdateRequest request, Binding input, Context context) { this.graphStore = graphStore ; this.request = request ; this.context = setupContext(context, graphStore) ; if ( input == null ) { Log.warn(this, "Null initial input") ; input = BindingRoot.create() ; } this.startBinding = input ; this.context.put(ARQConstants.sysCurrentUpdateRequest, request) ; }
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 ; }
private static Plan makePlan(Query query, DatasetGraph dataset, Binding input, Context context) { if ( context == null ) context = new Context(ARQ.getContext()) ; if ( input == null ) input = BindingRoot.create() ; QueryEngineFactory f = findFactory(query, dataset, context) ; if ( f == null ) return null ; return f.create(query, dataset, input, context) ; } // ---------------- Internal routines
private static Plan makePlan(Query query, DatasetGraph dataset, Binding input, Context context) { if ( context == null ) context = new Context(ARQ.getContext()) ; if ( input == null ) input = BindingRoot.create() ; QueryEngineFactory f = findFactory(query, dataset, context) ; if ( f == null ) return null ; return f.create(query, dataset, input, context) ; } // ---------------- Internal routines
public Plan getPlan() { if ( plan == null ) { DatasetGraph dsg = prepareDataset(dataset, query, fileManager) ; Binding inputBinding = null ; if ( initialBinding != null ) inputBinding = BindingUtils.asBinding(initialBinding) ; if ( inputBinding == null ) inputBinding = BindingRoot.create() ; plan = qeFactory.create(query, dsg, inputBinding, getContext()) ; } return plan ; }
public Plan getPlan() { if ( plan == null ) { DatasetGraph dsg = prepareDataset(dataset, query, fileManager) ; Binding inputBinding = null ; if ( initialBinding != null ) { inputBinding = new BindingMap() ; BindingUtils.addToBinding(inputBinding, initialBinding) ; } if ( inputBinding == null ) inputBinding = BindingRoot.create() ; plan = qeFactory.create(query, dsg, inputBinding, getContext()) ; } return plan ; }
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(); }
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 ; }