@Override public boolean hasNext() { try { return stmts.hasNext(); } catch (OpenRDFException e) { throw new RuntimeException(e); } }
@Override public boolean hasNext() { try { return stmts.hasNext(); } catch (OpenRDFException e) { throw new RuntimeException(e); } }
@Override public boolean hasNext() { try { return it.hasNext(); } catch (Exception ex) { throw new RuntimeException(ex); } }
public boolean hasNext() { try { if (open && src.hasNext()) return true; close(); return false; } catch(Exception e) { throw new RuntimeException(e); } }
private boolean _hasNext() throws QueryEvaluationException { try { return src.hasNext(); } catch (SailException ex) { throw new QueryEvaluationException(ex); } }
@Override public boolean hasNext() throws QueryEvaluationException { if (!src.hasNext()) { close(); return false; } return true; }
private boolean _hasNext() throws QueryEvaluationException { try { return src.hasNext(); } catch (SailException ex) { throw new QueryEvaluationException(ex); } }
@Override public boolean hasNext() throws SailException { try { return evaluate.hasNext(); } catch (final QueryEvaluationException e) { throw new SailException(e); } }
public boolean hasNext() throws SailException { try { return innerIter.hasNext(); } catch (RepositoryException e) { throw new SailException(e); } }
public boolean hasNext() { try { return this.iterator.hasNext(); } catch (QueryEvaluationException e) { throw new ModelRuntimeException(e); } }
@Override public boolean hasNext() throws RepositoryException { try { return wrappedIter.hasNext(); } catch (QueryEvaluationException e) { throw new RepositoryException(e); } }
public boolean hasNext() throws QueryEvaluationException { try { return baseIteration.hasNext(); } catch (SailException e) { throw new QueryEvaluationException(e); } }
public boolean hasNext() throws SailException { if (addedIter != null && addedIter.hasNext()) return true; while (next == null && contextIDs.hasNext()) { next = contextIDs.next(); if (removedSet != null && removedSet.contains(next)) { next = null; } } return next != null; }
public boolean hasNext() { try { return iterator.hasNext(); } catch (QueryEvaluationException e) { throw new ModelRuntimeException(e); } }
public ObjectCursor(ObjectConnection manager, CloseableIteration<BindingSet, QueryEvaluationException> result, String binding) throws QueryEvaluationException { this.binding = binding; this.result = result; this.next = result.hasNext() ? result.next() : null; this.manager = manager; this.of = manager.getObjectFactory(); }
/** * Finds whether any URI has already been dereferenced which redirects to the given document URI * @param documentUri the URI of a possible Linked Data document * @return whether any URI has already been dereferenced which redirects to the given document URI */ public boolean existsRedirectTo(final String documentUri) throws SailException { IRI hashedDocumentUri = valueFactory.createIRI(RDFUtils.hashedUri(documentUri)); try (CloseableIteration<? extends Statement, SailException> iter = connection.getStatements(null, LinkedDataCache.CACHE_REDIRECTSTO, hashedDocumentUri, false)) { return iter.hasNext(); } }
private Statement getSingleStatement(final CloseableIteration<? extends Statement, SailException> iter) throws SailException { Statement st = (iter.hasNext()) ? iter.next() : null; iter.close(); return st; } }
@Override public String getVersion() throws RyaDAOException { String version = null; final CloseableIteration<RyaStatement, RyaDAOException> versIter = queryEngine.query(new RyaStatement(RTS_SUBJECT_RYA, RTS_VERSION_PREDICATE_RYA, null), conf); if (versIter.hasNext()) { version = versIter.next().getObject().getData(); } versIter.close(); return version; }
@Test public void testClearNamespaces() throws Exception { con.begin(); con.setNamespace("rdf", RDF.NAMESPACE); con.setNamespace("rdfs", RDFS.NAMESPACE); con.clearNamespaces(); con.commit(); assertTrue(!con.getNamespaces().hasNext()); }