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

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


        this.varMapping = varMapping;
    }

    @Override
    protected Binding moveToNextBinding() {
        Binding b = super.moveToNextBinding();
        if (this.varMapping == null)
            return b;

        // Apply remapping
        BindingMap binding = BindingFactory.create();
        Iterator<Var> vs = b.vars();
        while (vs.hasNext()) {
            Var v = vs.next();
            Node value = b.get(v);

            // Only remap non-null variables for which there is a mapping
            if (value == null)
                continue;
            if (this.varMapping.containsKey(v)) {
View Full Code Here


   
    public TableUnit() {}
   
    @Override
    public Iterator<Binding> rows() {
        Binding binding = BindingFactory.binding() ;
        return Iter.singleton(binding) ;
    }
View Full Code Here

   
    @Override
    public QueryIterator iterator(ExecutionContext execCxt)
    {
        // BindingRoot?
        Binding binding = BindingFactory.binding() ;
        return QueryIterSingleton.create(binding, execCxt) ;
    }
View Full Code Here

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

        this.rows = rows ;
    }

    private void materialize(QueryIterator qIter) {
        while (qIter.hasNext()) {
            Binding binding = qIter.nextBinding() ;
            addBinding(binding) ;
        }
        qIter.close() ;
    }
View Full Code Here

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

    {
        List<Var> vars = new ArrayList<Var>(4) ;
        // Only if not in parent.
        // A (var/value) binding may have been copied down to record it's NodeId. 
       
        Binding b = idBinding.getParentBinding() ;
       
        Iterator<Var> iter = idBinding.iterator() ;
        for ( Var v : idBinding )
        {
            if ( b == null || ! b.contains(v) )
                vars.add(v) ;
        }
        return vars ;
    }
View Full Code Here

       
        // Object is a value / bound variable.
        if ( ! nodeLocalname.sameValueAs(localname) )
            return ;
        // Bind subject to this node.
        Binding b = BindingFactory.binding(input, subjVar, node) ;
        bindings.add(b) ;
    }
View Full Code Here

        // -------- 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

        Iterator<Node> iter = dsg.listGraphNodes() ;
        List<Binding> list = new ArrayList<Binding>((int)dsg.size()) ;
        for ( ; iter.hasNext(); )
        {
            Node gn = iter.next();
            Binding b = BindingFactory.binding(Var.alloc(graphNode), gn) ;
            list.add(b) ;
        }

        QueryIterator qIter = new QueryIterPlainWrapper(list.iterator(), evaluator.getExecContext()) ;
        return TableFactory.create(qIter) ;
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.