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

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


        QueryIterator qIter = Algebra.exec(op, ExQuerySelect1.createModel()) ;
       
        // Results
        for ( ; qIter.hasNext() ; )
        {
            Binding b = qIter.nextBinding() ;
            System.out.println(b) ;
        }
        qIter.close() ;
    }
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

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

        QueryIterator qIter = pf.exec(r, sv, p, ov, new ExecutionContext(ARQ.getContext(), graph, null, null)) ;
        if ( ! qIter.hasNext() )
            return Iter.nullIterator() ;
        List<Triple> array = new ArrayList<Triple>() ;
        for ( ; qIter.hasNext() ; ) {
            Binding b = qIter.next() ;
            Node st = value(sv, b) ;
            Node ot = value(ov, b) ;
            array.add(Triple.create(st, p, ot)) ;
        }
        // Materialise so the inner QueryIterators are used up.
View Full Code Here

        QueryIterConcat qIterCat = new QueryIterConcat(execCxt) ;
       
        for ( ; iter.hasNext() ; )
        {
            Node n = iter.next() ;
            Binding b2 = BindingFactory.binding(binding, sVar, n) ;
            Iterator<Node> pathIter = PathEval.eval(graph, n, path, execCxt.getContext()) ;
            QueryIterator qIter = _execTriplePath(b2, pathIter, oVar, execCxt) ;
            qIterCat.add(qIter) ;
        }
        return qIterCat ;
View Full Code Here

        QueryIterConcat qIterCat = new QueryIterConcat(execCxt) ;
       
        for ( ; iter.hasNext() ; )
        {
            Node n = iter.next() ;
            Binding b2 = BindingFactory.binding(binding, var, n) ;
            int x = existsPath(graph, n, path, n, execCxt) ;
            if ( x > 0 )
            {
                QueryIterator qIter = new QueryIterYieldN(x, b2, execCxt) ;
                qIterCat.add(qIter) ;
View Full Code Here

    public Plan getPlan()
    {
        if ( plan == null )
        {
            DatasetGraph dsg = prepareDataset(dataset, query, fileManager) ;
            Binding inputBinding = null ;
            if ( initialBinding != null )
                inputBinding = BindingUtils.asBinding(initialBinding) ;
            if ( inputBinding == null )
                inputBinding = BindingRoot.create() ;
View Full Code Here

        long yieldCount = 0 ;
        boolean resetDone = false ;
        @Override
        protected Binding moveToNextBinding()
        {
            Binding b = super.moveToNextBinding() ;
            yieldCount++ ;
           
            if ( ! resetDone )
            {
                // Sync on calls of .abort.
View Full Code Here

    private static QueryIterator joinWorkerN(QueryIterator left, Table right, JoinType joinType, ExprList conditions, ExecutionContext execCxt) {      
        // We could hash the right except we don't know much about columns.
       
        List<Binding> out = new ArrayList<Binding>() ;
        for ( ; left.hasNext() ; ) {
            Binding bindingLeft = left.next() ;
            int count = 0 ;
            for (Iterator<Binding> iter = right.rows() ; iter.hasNext();) {
                Binding bindingRight = iter.next() ;
                Binding r = Algebra.merge(bindingLeft, bindingRight) ;
               
                if ( r == null )
                    continue ;
                // This does the conditional part. Theta-join.
                if ( conditions == null || conditions.isSatisfied(r, execCxt) ) {
View Full Code Here

        public Binding nextBinding() {
            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

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.