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

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


        return qIter ;
    }

    protected QueryIterator execute(OpReduced opReduced, QueryIterator input)
    {
        QueryIterator qIter = executeOp(opReduced.getSubOp(), input) ;
        qIter = new QueryIterReduced(qIter, execCxt) ;
        return qIter ;
    }
View Full Code Here


    }

    protected QueryIterator execute(OpAssign opAssign, QueryIterator input)
    {
        // Need prepare?
        QueryIterator qIter = executeOp(opAssign.getSubOp(), input) ;
        qIter = new QueryIterAssign(qIter, opAssign.getVarExprList(), execCxt, false) ;
        return qIter ;
    }
View Full Code Here

    protected QueryIterator execute(OpExtend opExtend, QueryIterator input)
    {
        // We know (parse time checking) the variable is unused so far in
        // the query so we can use QueryIterAssign knowing that it behaves
        // the same as extend. The boolean should only be a check.
        QueryIterator qIter = executeOp(opExtend.getSubOp(), input) ;
        qIter = new QueryIterAssign(qIter, opExtend.getVarExprList(), execCxt, true) ;
        return qIter ;
    }
View Full Code Here

            if ( seen.contains(b) )
                continue ;
            seen.add(b) ;
            x.add(b) ;
        }
        QueryIterator qIter = new QueryIterPlainWrapper(x.iterator()) ;
        ResultSet rs = new ResultSetStream(results.getResultVars(), ModelFactory.createDefaultModel(), qIter) ;
        return ResultSetFactory.makeRewindable(rs) ;
    }
View Full Code Here

//    }
   
    private List<Binding> exec(String pattern)
    {
        Op op = op(pattern) ;
        QueryIterator qIter = Algebra.exec(op, TestUnionGraph.dsg) ;
        return  Iter.toList(qIter) ;
    }
View Full Code Here

    {
        Op op = SSE.parseOp(pattern) ;
        if ( applyQuad )
            op = Algebra.toQuadForm(op) ;
        Op op2 = Algebra.unionDefaultGraph(op) ;
        QueryIterator qIter = Algebra.exec(op, TestUnionGraph.dsg1) ;
        return Iter.toList(qIter) ;
    }
View Full Code Here

//    }
   
    private List<Binding> exec(String pattern)
    {
        Op op = op(pattern) ;
        QueryIterator qIter = Algebra.exec(op, TestUnionGraph.dsg1) ;
        return  Iter.toList(qIter) ;
    }
View Full Code Here

    protected container(Node typeURI) { this.typeNode = typeURI ; }

    @Override
    public QueryIterator execEvaluated(Binding binding, Node containerNode, Node predicate, Node member, ExecutionContext execCxt)
    {
        QueryIterator qIter1 = execEvaluatedConcrete(binding, containerNode, predicate, member, execCxt) ;
        QueryIterator qIter2 = execEvaluatedCalc(binding, containerNode, predicate, member, execCxt) ;
        QueryIterConcat concat = new QueryIterConcat(execCxt) ;
        concat.add(qIter1) ;
        concat.add(qIter2) ;
        return concat ;
    }
View Full Code Here

   
    // Ask directly.
    private QueryIterator execEvaluatedConcrete(Binding binding, Node containerNode, Node predicate, Node member,
                                                ExecutionContext execCxt)
    {
        QueryIterator input = QueryIterSingleton.create(binding, execCxt) ;
        Graph graph = execCxt.getActiveGraph() ;
        QueryIterator qIter = new QueryIterTriplePattern(input, new Triple(containerNode, predicate, member), execCxt) ;
        return qIter ;
    }
View Full Code Here

        System.out.println("--------------") ;
        System.out.print(op) ;
        System.out.println("--------------") ;

        // ---- Execute expression
        QueryIterator qIter = Algebra.exec(op, m.getGraph()) ;
       
        // -------- Either read the query iterator directly ...
        if ( false )
        {
            for ( ; qIter.hasNext() ; )
            {
                Binding b = qIter.nextBinding() ;
                Node n = b.get(var_x) ;
                System.out.println(NodeFmtLib.displayStr(n)) ;
                System.out.println(b) ;
            }
            qIter.close() ;
        }
        else
        {
            // -------- Or make ResultSet from it (but not both - reading an
            //          iterator consumes the current solution)
            List<String> varNames = new ArrayList<String>() ;
            varNames.add("x") ;
            varNames.add("z") ;
            ResultSet rs = new ResultSetStream(varNames, m, qIter);
            ResultSetFormatter.out(rs) ;
            qIter.close() ;
        }
        System.exit(0) ;
    }
View Full Code Here

TOP

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

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.