Package com.hp.hpl.jena.sparql.engine

Examples of com.hp.hpl.jena.sparql.engine.ExecutionContext


        iterator.setCallback(new Callback() { @Override
        public void call() { /* do nothing */ } });
        assertEquals(0, iterator.getReturnedElementCount());
        Context context = new Context() ;
        context.set(ARQ.spillToDiskThreshold, 10L) ;
        ExecutionContext executionContext = new ExecutionContext(context, (Graph)null, (DatasetGraph)null, (OpExecutorFactory)null) ;
        QueryIterSort qIter = new QueryIterSort(iterator, comparator, executionContext) ;
        try
        {
            assertTrue(qIter.hasNext()) ;
            assertEquals(49, DataBagExaminer.countTemporaryFiles(qIter.db));
View Full Code Here


    }
   
    private static List<Binding> eval(Graph graph, Node start, String pathStr, Node finish)
    {
        Path path = SSE.parsePath(pathStr, pmap) ;
        QueryIterator qIter = PathLib.execTriplePath(BindingFactory.root(), start, path, finish, new ExecutionContext(ARQ.getContext(), graph, null, null)) ;
        return Iter.toList(qIter) ;
    }
View Full Code Here

       
        if ( true ) return null ;
       
        if ( gn == Quad.defaultGraphIRI || gn == Quad.defaultGraphNodeGenerated )
        {
            ExecutionContext cxt2 = new ExecutionContext(execCxt, execCxt.getDataset().getDefaultGraph()) ;
            return execute(subOp, cxt2) ;
        }
       
        if ( gn == Quad.unionGraph )
        {}
View Full Code Here

            // And the contains was true??!!!!!!
            if ( g == null )
                return null ;
                //throw new ARQInternalErrorException(".containsGraph was true but .getGraph is null") ;
           
            ExecutionContext cxt2 = new ExecutionContext(outerCxt, g) ;
            QueryIterator subInput = QueryIterSingleton.create(binding, cxt2) ;
            return QC.execute(op, subInput, cxt2) ;
        }
View Full Code Here

   
    public static NodeValue eval(Expr expr, Binding binding)
    {
        Context context = ARQ.getContext().copy() ;
        context.set(ARQConstants.sysCurrentTime, NodeFactory.nowAsDateTime()) ;
        FunctionEnv env = new ExecutionContext(context, null, null, null) ;
        NodeValue r = expr.eval(binding, env) ;
        return r ;
    }
View Full Code Here

        // -- Execute
        // Switch to a non-reordring executor
        // The Op may be a sequence due to TransformFilterPlacement
        // so we need to do a full execution step, not go straight to the SolverLib.
       
        ExecutionContext ec2 = new ExecutionContext(execCxt) ;
        ec2.setExecutor(plainFactory) ;

        // Solve without going through this executor again.
        // There would be issues of nested patterns but this is only a
        // (filter (bgp...)) or (filter (quadpattern ...)) or sequences of these.
        // so there are no nested patterns to reorder.
View Full Code Here

   
    @Test public void table_24() { test(data1, data3, true, null, data1J3) ; }
    @Test public void table_25() { test(data3, data1, true, null, data1J3) ; }

    private void test(Table left, Table right, boolean normalJoin, ExprList exprs, Table expected) {
        ExecutionContext execCxt = new ExecutionContext(ARQ.getContext(), null, null, null) ;
        QueryIterator leftIter = left.iterator(execCxt) ;
        QueryIterator qIter = normalJoin
            ? TableJoin.join(leftIter, right, exprs, execCxt)
            : TableJoin.leftJoin(leftIter, right, exprs, execCxt) ;
       
View Full Code Here

    }
   
    private static List<Binding> eval(Graph graph, Node start, String pathStr, Node finish)
    {
        Path path = SSE.parsePath(pathStr, pmap) ;
        QueryIterator qIter = PathLib.execTriplePath(BindingFactory.root(), start, path, finish, new ExecutionContext(ARQ.getContext(), graph, null, null)) ;
        return Iter.toList(qIter) ;
    }
View Full Code Here

        // -- Execute
        // Switch to a non-reordering executor
        // The Op may be a sequence due to TransformFilterPlacement
        // so we need to do a full execution step, not go straight to the SolverLib.
       
        ExecutionContext ec2 = new ExecutionContext(execCxt) ;
        ec2.setExecutor(plainFactory) ;

        // Solve without going through this executor again.
        // There would be issues of nested patterns but this is only a
        // (filter (bgp...)) or (filter (quadpattern ...)) or sequences of these.
        // so there are no nested patterns to reorder.
View Full Code Here

    private Iterator<Triple> graphFindWorker(Graph graph, Node s, PropertyFunctionFactory f, Node p, Node o, Context context) {
        // Expensive?
        PropertyFunction pf = f.create(p.getURI()) ;
        PropFuncArg sv = arg(s, "S") ;
        PropFuncArg ov = arg(o, "O") ;
        QueryIterator r = QueryIterRoot.create(new ExecutionContext(context, graph, null, null)) ;
        QueryIterator qIter = pf.exec(r, sv, p, ov, new ExecutionContext(ARQ.getContext(), graph, null, null)) ;
        if ( ! qIter.hasNext() )
            return Iter.nullIterator() ;
        List<Triple> array = new ArrayList<>() ;
        for ( ; qIter.hasNext() ; ) {
            Binding b = qIter.next() ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.engine.ExecutionContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.