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

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


        int hash = 0 ;
        QueryIterator qIter = iterator(null) ;
        try {
            for ( ; qIter.hasNext() ; )
            {
                Binding binding = qIter.nextBinding() ;
                hash ^= binding.hashCode();
            }
            return hash ;
        } finally { qIter.close() ; }
    }
View Full Code Here


        QueryIterator qIter2 = table.iterator(null) ;
        try {
            for ( ; qIter1.hasNext() ; )
            {
                Binding bind1 = qIter1.nextBinding() ;
                Binding bind2 = qIter2.nextBinding() ;
                if ( ! BindingBase.equals(bind1, bind2) )
                    return false ;
            }
            return true ;
        } finally { qIter1.close() ; qIter2.close() ;}
View Full Code Here

        out.incIndent() ;
        QueryIterator qIter = table.iterator(null) ;
        for ( ; qIter.hasNext() ; )
        {
            out.println() ;
            Binding binding = qIter.nextBinding() ;
            output(binding, out, sCxt) ;
        }
        out.decIndent() ;
       
        out.print(")") ;
View Full Code Here

    {
        QueryIterator qIter = nodesReifTriple(null, triple) ;
        try {
            if ( ! qIter.hasNext() )
                return false ;
            Binding b = qIter.nextBinding() ;
            Node x = b.get(reifNodeVar) ;
            if ( qIter.hasNext() )
                // Over specified
                return false ;
            // This checks there are no fragments
View Full Code Here

        //List<Triple> triples = new ArrayList<Triple>() ;
        List<Triple> triples = new ArrayList<Triple>() ;
       
        for (; qIter.hasNext() ; )
        {
            Binding b = qIter.nextBinding() ;
            Node sResult = s ;
            Node pResult = p ;
            Node oResult = o ;
            if ( sVar != null )
                sResult = b.get(sVar) ;
View Full Code Here

       
        QueryIterator qIter = nodesReifTriple(node, null) ;
        try {
            if ( ! qIter.hasNext() )
                return null ;
            Binding b = qIter.nextBinding() ;
            if ( qIter.hasNext() )
                // Over specificied
                return null ;
            // Just right
            Node S = b.get(varS) ;
View Full Code Here

        }
        QueryIterator iter = table.iterator(execCxt) ;
        List<Binding> output = new ArrayList<Binding>() ;
        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

        // Have an iterator that yields one-by-one.
        QueryIterator left = tableLeft.iterator(execCxt) ;
        QueryIterConcat output = new QueryIterConcat(execCxt) ;
        for ( ; left.hasNext() ; )
        {
            Binding b = left.nextBinding() ;
            QueryIterator x = tableRight.matchRightLeft(b, leftJoin, conditions, execCxt) ;
            if ( x == null )
                continue ;
            output.add(x) ;
        }
View Full Code Here

    {
        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

       
        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

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.