@Override public boolean accept(Op op, DatasetGraph dsg, Context context) { if ( !( dsg instanceof DatasetGraphWrapper ) || dsg instanceof DatasetGraphWrapperView ) return false ; DatasetGraph dsg2 = ((DatasetGraphWrapper)dsg).getWrapped() ; return QueryEngineRegistry.findFactory(op, dsg2, context).accept(op, dsg2, context) ; }
@Override public boolean accept(Query query, DatasetGraph dsg, Context context) { // DatasetGraphFilteredView changes the seen contents so we can't unwrap it for query. if ( !( dsg instanceof DatasetGraphWrapper ) || dsg instanceof DatasetGraphWrapperView ) return false ; DatasetGraph dsg2 = ((DatasetGraphWrapper)dsg).getWrapped() ; return QueryEngineRegistry.findFactory(query, dsg2, context).accept(query, dsg2, context) ; }
@Override public Plan create(Query query, DatasetGraph dsg, Binding inputBinding, Context context) { if ( !( dsg instanceof DatasetGraphWrapper ) || dsg instanceof DatasetGraphWrapperView ) return null ; DatasetGraph dsg2 = ((DatasetGraphWrapper)dsg).getWrapped() ; return QueryEngineRegistry.findFactory(query, dsg2, context).create(query, dsg2, inputBinding, context) ; }
@Override public Plan create(Op op, DatasetGraph dsg, Binding inputBinding, Context context) { if ( !( dsg instanceof DatasetGraphWrapper ) || dsg instanceof DatasetGraphWrapperView ) return null ; DatasetGraph dsg2 = ((DatasetGraphWrapper)dsg).getWrapped() ; return QueryEngineRegistry.findFactory(op, dsg2, context).create(op, dsg2, inputBinding, context) ; } }
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 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: "+Lib.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(); }