Examples of nextBinding()


Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

        }
        QueryIterator iter = table.iterator(execCxt) ;
        List<Binding> output = new ArrayList<>() ;
        for ( ; iter.hasNext() ; )
        {
            Binding b = iter.nextBinding() ;
            if ( expressions.isSatisfied(b, execCxt) )
                output.add(b) ;
        }
        return new TableN(new QueryIterPlainWrapper(output.iterator(), execCxt)) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

    {
        QueryIterator left = tableLeft.iterator(execCxt) ;
        TableN r = new TableN() ;
        for ( ; left.hasNext() ; )
        {
            Binding b = left.nextBinding() ;
            if ( tableRight.contains(b) )
                r.addBinding(b) ;
        }
        tableLeft.close() ;
        tableRight.close() ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

       
        TableN results = new TableN() ;
        QueryIterator iterLeft = tableLeft.iterator(execCxt) ;
        for ( ; iterLeft.hasNext() ; )
        {
            Binding bindingLeft = iterLeft.nextBinding() ;
            boolean includeThisRow = true ;
            // Find a reason not to include the row.
            // That's is not disjoint and not compatible.
           
            QueryIterator iterRight = tableRight.iterator(execCxt) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

            // That's is not disjoint and not compatible.
           
            QueryIterator iterRight = tableRight.iterator(execCxt) ;
            for ( ; iterRight.hasNext() ; )
            {
                Binding bindingRight = iterRight.nextBinding() ;
                if ( Algebra.disjoint(bindingLeft, bindingRight) )
                    // Disjoint - not a reason to exclude
                    continue ;
               
                if ( ! Algebra.compatible(bindingLeft, bindingRight) )
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

        QueryIterator qIter = Algebra.exec(op, Ex1.createModel()) ;
       
        // Results
        for ( ; qIter.hasNext() ; )
        {
            Binding b = qIter.nextBinding() ;
            System.out.println(b) ;
        }
        qIter.close() ;
    }
}
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

        // -------- Either read the query iterator directly ...
        if ( false )
        {
            for ( ; qIter.hasNext() ; )
            {
                Binding b = qIter.nextBinding() ;
                Node n = b.get(var_x) ;
                System.out.println(FmtUtils.stringForNode(n)) ;
                System.out.println(b) ;
            }
            qIter.close() ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

       
        // Debugging or problems with unreleasing JDBC ResultSets - read all in now.
        QueryIterator qIter = new QueryIterSQL(rs, binding, execCxt) ;
        List<Binding> results = new ArrayList<Binding>() ;
        for ( ; qIter.hasNext() ; )
            results.add(qIter.nextBinding()) ;
        qIter.close() ;
        return new QueryIterPlainWrapper(results.iterator(), execCxt) ;
    }

    private void setProjectVars(Collection<Var> projectVars)
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

        else
        {
            // ---- Safe version:
            List<Binding> bindings = new ArrayList<Binding>() ;
            while ( qIter.hasNext() )
                bindings.add(qIter.nextBinding()) ;
            qIter.close();
           
            // QueryIterPlainWrapper is just to make it ia QuyerIterator again.
            return new GraphIterator(triple, new QueryIterPlainWrapper(bindings.iterator())) ;
        }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

    public static void outputPlain(IndentedWriter out, Table table, SerializationContext sCxt)
    {
        QueryIterator qIter = table.iterator(null) ;
        for ( ; qIter.hasNext(); )
        {
            Binding b = qIter.nextBinding() ;
            output(out, b, sCxt) ;
            out.println() ;
        }
        qIter.close() ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.QueryIterator.nextBinding()

    {
        QueryIterator qIter = iterator(null) ;
        try {
            for ( ; qIter.hasNext() ; )
            {
                Binding b2 = qIter.nextBinding() ;
                if ( BindingUtils.equals(b,b2) )
                    return true ;
            }
            return false ;
        } finally { qIter.close() ; }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.