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

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


            {
                Node gn = graphNodes.next() ;
                //Op tableVarURI = TableFactory.create(gn.getName(), Node.createURI(uri)) ;
               
                Graph g = cxt.getDataset().getGraph(gn) ;
                Binding b = BindingFactory.binding(BindingRoot.create(), gVar, gn) ;
                ExecutionContext cxt2 = new ExecutionContext(cxt, g) ;

                // Eval the pattern, eval the variable, join.
                // Pattern may be non-linear in the variable - do a pure execution. 
                Table t1 = TableFactory.create(gVar, gn) ;
View Full Code Here


    }

    @Override
    protected Binding moveToNextBinding()
    {
        Binding b = super.moveToNextBinding() ;
        cache.add(b) ;
        return b ;
    }
View Full Code Here

                throw new NoSuchElementException(Utils.className(this)) ;
           
            if ( ! hasNextBinding() )
                throw new NoSuchElementException(Utils.className(this)) ;
   
            Binding obj = moveToNextBinding() ;
            if ( obj == null )
                throw new NoSuchElementException(Utils.className(this)) ;
           
            if ( shouldCancel && ! finished )
            {
View Full Code Here

                // Phase 1 : assign bindings to buckets by key and pump through the aggregrators.
                MultiMap<Binding, Pair<Var, Accumulator>> accumulators = MultiMap.createMapList() ;

                for ( ; iter.hasNext() ; )
                {
                    Binding b = iter.nextBinding() ;
                    Binding key = genKey(groupVarExpr, b, execCxt) ;

                    if ( noAggregators )
                    {
                        // Put in a dummy to remember the input.
                        accumulators.put(key, placeholder ) ;
View Full Code Here

            @Override
            protected Iterator<Binding> initializeIterator()
            {
                for ( ; qIter.hasNext() ; )
                {
                    Binding binding = qIter.next() ;
                    if ( heap.size() < limit )
                      add(binding) ;
                    else {
                        Binding currentMaxLeastN = heap.peek() ;
                       
                      if ( comparator.compare(binding, currentMaxLeastN) < 0 )
                      {
                          // If binding is less than current Nth least ...
                        heap.poll() ;     // Drop Nth least.
View Full Code Here

        {
            getInput().close() ;
            return null ;
        }
       
        Binding binding = getInput().next() ;
        QueryIterator iter = nextStage(binding) ;
        return iter ;
    }
View Full Code Here

public class QueryIterSingleton extends QueryIterYieldN
{
    // A common usage?
    public static QueryIterSingleton create(Binding parent, Var var, Node value, ExecutionContext execCxt)
    {
        Binding b = BindingFactory.binding(parent, var, value) ;
        return QueryIterSingleton.create(b, execCxt) ;
    }
View Full Code Here

      table = new HashSet<Key>() ;
      missingValue = false ;

      while ( data.hasNext() )
        {
            Binding binding = data.nextBinding() ;
            addBindingToTable(binding) ;
        }
      data.close() ;
    }
View Full Code Here

    @Override
    public boolean contains(Binding b) {
        QueryIterator qIter = iterator(null) ;
        try {
            for (; qIter.hasNext();) {
                Binding b2 = qIter.nextBinding() ;
                if ( BindingUtils.equals(b, b2) )
                    return true ;
            }
            return false ;
        } finally {
View Full Code Here

    public int hashCode() {
        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

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.