181182183184185186187188189
} @Override protected Binding moveToNextBinding() { if (!hasNext()) throw new NoSuchElementException() ; Binding b = this.binding; this.binding = null ; return b; }
82838485868788899091929394959697
} @Override public Binding nextBinding() { if (this.hasPeeked()) { Binding b = this.peeked; this.peeked = null; this.rowNumber++; return b; } else if (this.canPeek()) { Binding b = this.peekBinding(); this.peeked = null; this.rowNumber++; return b; } else { throw new NoSuchElementException();
949596979899100101102103104
else { varNames = qr.getResultVars(); while (qr.hasNext()) { Binding rb = qr.nextBinding(); rows.add(rb); } } reset(); }
80818283848586878889909192939495969798
// Data output for ( ; resultSet.hasNext() ; ) { sep = null ; Binding b = resultSet.nextBinding() ; for( Var v : vars ) { if ( sep != null ) w.write(sep) ; sep = "," ; Node n = b.get(v) ; if ( n != null ) output(w, n, bnodes) ; } w.write(NL) ; }
581582583584585586587588589
135136137138139140141142143
74757677787980818283
QueryExecution qExec = QueryExecutionFactory.sparqlService(serviceQuery, query); ResultSet rs = qExec.execSelect(); Var x = Var.alloc("x"); while (rs.hasNext()) { Binding b = rs.nextBinding(); Assert.assertNotNull(b.get(x)); } qExec.close(); }
130131132133134135136137138
} @Override protected Binding moveToNextBinding() { Binding b = super.moveToNextBinding() ; b = BindingFactory.materialize(b) ; return b ; }
148149150151152153154155
// 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) ; }
81828384858687888990919293949596