@Override public boolean hasNext() { return statements.hasNext(); } }
@Override public boolean hasNext() throws SailException { boolean hasNext = parentIterator.hasNext(); //System.out.println(leadingSpace()+parent.getClass().getSimpleName()+".hasNext() : "+hasNext); return hasNext; }
private void calculateNext() { if (parentIterator != null) { while (next.isEmpty() && parentIterator.hasNext()) { parentIterator.next(); } } }
private void calculateNext() { while (next == null && parentIterator.hasNext()) { parentIterator.next(); } }
private void calculateNext() { if (parentIterator != null) { while (next.isEmpty() && parentIterator.hasNext()) { parentIterator.next(); } } }
public boolean hasNext() throws SailException { try { return innerIter.hasNext(); } catch (RepositoryException e) { throw new SailException(e); } }
public boolean hasNext() throws SailException { try { return innerIter.hasNext(); } catch (RepositoryException e) { throw new SailException(e); } }
@Override public boolean hasNext() throws QueryEvaluationException { if (statementIt == null) { performQuery(); } return statementIt.hasNext(); }
@Override public boolean hasNext() throws QueryEvaluationException { try { return query.hasNext(); } catch (RyaDAOException e) { throw new QueryEvaluationException(e); } }
@Override public Tuple next() throws SailException { assert parentIterator.hasNext() : parentIterator.getClass().getSimpleName() + " does not have any more items but next was still called!!!"; Tuple next = parentIterator.next(); assert next != null; System.out.println(leadingSpace() + parent.getClass().getSimpleName() + ".next(): " + " " + next.toString()); return next; }
@Override public Tuple next() throws SailException { assert parentIterator.hasNext() : parentIterator.getClass().getSimpleName() + " does not have any more items but next was still called!!!"; Tuple next = parentIterator.next(); assert next != null; System.out.println(leadingSpace() + parent.getClass().getSimpleName() + ".next(): " + " " + next.toString()); return next; }
private boolean batchNext() throws RyaDAOException { if (!iteration.hasNext()) { return false; } Collection<Map.Entry<RyaStatement, BindingSet>> batchedResults = new ArrayList<Map.Entry<RyaStatement, BindingSet>>(); for (int i = 0; i < batch && iteration.hasNext(); i++) { batchedResults.add(new RdfCloudTripleStoreUtils.CustomEntry<RyaStatement, BindingSet>( new RyaStatement(iteration.next(), predObj.getKey(), predObj.getValue()), null)); } query = ryaQueryEngine.queryWithBindingSet(batchedResults, null); return query.hasNext(); }
private void initialize() { if (tuplesBuffer == null) { tuplesBuffer = new ArrayList<>(); try (CloseableIteration<Tuple, SailException> iterator = parent.iterator()) { while (iterator.hasNext()) { Tuple next = iterator.next(); tuplesBuffer.add(next); } } } }
public boolean hasNext() { try { if (stmts.hasNext()) return true; stmts.close(); return false; } catch (SailException e) { throw new ModelException(e); } }
public boolean hasNext() { try { if (stmts.hasNext()) return true; stmts.close(); return false; } catch (SailException e) { throw new ModelException(e); } }
void calculateNext() { while (next == null && parentIterator.hasNext()) { Tuple temp = parentIterator.next(); Resource subject = (Resource) temp.line.get(0); if (shaclSailConnection.hasStatement(subject, RDF.TYPE, filterOnType, true)) { next = temp; next.addHistory(new Tuple(Arrays.asList(subject, RDF.TYPE, filterOnType))); } } }
public Value evaluate(Exists node, BindingSet bindings) throws ValueExprEvaluationException, QueryEvaluationException { CloseableIteration<BindingSet, QueryEvaluationException> iter = evaluate(node.getSubQuery(), bindings); try { return BooleanLiteral.valueOf(iter.hasNext()); } finally { iter.close(); } }
private void writeNamespaces(SailDataset store, DataOutputStream dataOut) throws IOException, SailException { try (CloseableIteration<? extends Namespace, SailException> iter = store.getNamespaces();) { while (iter.hasNext()) { Namespace ns = iter.next(); dataOut.writeByte(NAMESPACE_MARKER); writeString(ns.getPrefix(), dataOut); writeString(ns.getName(), dataOut); } } }
private void cacheStatements(final Resource subj, final IRI pred, final Value obj) throws SailException { cacheConnection.begin(); CloseableIteration<? extends Statement, SailException> iter = baseSailConnection.getStatements(subj, pred, obj, false); while (iter.hasNext()) { Statement st = iter.next(); cacheConnection.addStatement(st.getSubject(), st.getPredicate(), st.getObject(), st.getContext()); } iter.close(); cacheConnection.commit(); }