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

Examples of com.hp.hpl.jena.sparql.engine.binding.Binding


           
            Var v = Var.alloc(gn) ;
            Op union = null ;
            for ( Node n : namedGraphs )
            {
                Binding b = BindingFactory.binding(v, n) ;
                Op x2 = QC.substitute(opQuadPattern, b) ;
                Op op = OpAssign.assign(x2, v, NodeValue.makeNode(n)) ;
                union = OpUnion.create(union, op) ;
            }
            return union ;
View Full Code Here


            // Answer is a table.
            Table t = TableFactory.create() ;
            Var v = Var.alloc(gn) ;
            for ( Node n : namedGraphs )
            {
                Binding b = BindingFactory.binding(v, n) ;
                t.addBinding(b) ;
            }
            return OpTable.create(t) ;
        }
        // Not a variable.
View Full Code Here

        if ( ! hasNextBinding() )
            throw new NoSuchElementException(Utils.className(this)) ;
        if ( currentQIter == null )
            throw new NoSuchElementException(Utils.className(this)) ;
       
        Binding binding = currentQIter.nextBinding() ;
        return binding ;
    }
View Full Code Here

        // writes one binding by line
        for ( ; resultSet.hasNext() ; )
        {
            sep = null ;
            Binding b = resultSet.nextBinding() ;

            for( Var v : vars )
            {
                if ( sep != null )
                    w.write(sep) ;
                sep = SEP ;

                Node n = b.get(v) ;
                if ( n != null )
                {
                    // This will not include a raw tab.
                    formatter.format(w, n);
                }
View Full Code Here

            Statement s = sIter.nextStatement() ;
            if ( sIter.hasNext() )
                Log.warn(this, "More than one solution: index = "+index) ;
            Resource soln = s.getSubject() ;

            Binding rb = buildBinding(soln) ;
            rows.add(rb) ;
            sIter.close() ;
        }
        if ( rows.size() != count )
            Log.warn(this, "Found "+rows.size()+": expected "+count) ;
View Full Code Here

        for ( ; solnIter.hasNext() ; )
        {
            Resource soln = solnIter.nextStatement().getResource() ;
            count++ ;

            Binding rb = buildBinding(soln) ;
            rows.add(rb) ;
        }
        solnIter.close() ;
       
        if ( root.hasProperty(ResultSetGraphVocab.size))
View Full Code Here

        if ( rows1.size() != rows2.size() )
            return false ;
        for ( Binding row1 : rows1 )
        {
            // find in rows2.
            Binding matched = null ;
            for ( Binding row2 : rows2 )
            {
                // NEED BACKTRACKING
               
                if ( equal(row1, row2, match))
View Full Code Here

       
        while ( iter1.hasNext() )
        {
            // Does not need backtracking because rows must
            // align and so must variables in a row. 
            Binding row1 = iter1.next() ;
            Binding row2 = iter2.next() ;
            if ( !equal(row1, row2, match) )
                return false ;
        }
        return true ;
    }
View Full Code Here

    {
        if ( finished )
            throw new NoSuchElementException("End of XML Results") ;
        if ( ! hasNext() )
            throw new NoSuchElementException("End of XML Results") ;
        Binding r = binding ;
        row++ ;
        binding = null ;
        return r ;
    }
View Full Code Here

    }
   
    @Override
    public QuerySolution nextSolution()
    {
        Binding r = nextBinding() ;
        ResultBinding currentEnv = new ResultBinding(model, r) ;
        return currentEnv ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.engine.binding.Binding

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.