public BigdataRemoteGraphQuery(RemoteRepository remote, String query, String baseURI) throws Exception { super(baseURI); this.q = remote.prepareGraphQuery(query); }
/** * Prepare a graph query. * * @param query * the query string * * @return The {@link IPreparedGraphQuery} */ public IPreparedGraphQuery prepareGraphQuery(final String query) throws Exception { return prepareGraphQuery(query, UUID.randomUUID()); }
@Override protected void doApplyToNamespace(final RemoteRepository repo, final UUID uuid) throws Exception { repo.prepareGraphQuery(queryStr, uuid).evaluate(); }
@Override public Void call() throws Exception { try { final Graph actual = asGraph(m_repo .prepareGraphQuery(queryStr)); assertTrue(!actual.isEmpty()); return null; } catch (Exception e) { log.warn("Call failure", e); errorCount.incrementAndGet(); throw e; } }
@Override public ICloseableIterator<Statement> evaluateGraph(final String query) { try { // Setup the query. final IPreparedGraphQuery q = m_repo.prepareGraphQuery(query); // Note: evaluate() runs asynchronously and must be closed(). final GraphQueryResult res = q.evaluate(); // Will close the GraphQueryResult. return new Sesame2BigdataIterator<Statement, QueryEvaluationException>( res); } catch (Exception ex) { throw new RuntimeException("query=" + query, ex); } }
@Override public ICloseableIterator<Statement> evaluateGraph(final String query) { try { // Setup the query. final IPreparedGraphQuery q = m_repo.prepareGraphQuery(query); // Note: evaluate() runs asynchronously and must be closed(). final GraphQueryResult res = q.evaluate(); // Will close the GraphQueryResult. return new Sesame2BigdataIterator<Statement, QueryEvaluationException>( res); } catch (Exception ex) { throw new RuntimeException("query=" + query, ex); } }
@Override protected void doApplyToNamespace(final RemoteRepository repo, final UUID uuid) throws Exception { repo.prepareGraphQuery(queryStr, uuid).evaluate(); }
@Override public Void call() throws Exception { try { final Graph actual = asGraph(m_repo .prepareGraphQuery(queryStr)); assertTrue(!actual.isEmpty()); return null; } catch (Exception e) { log.warn("Call failure", e); errorCount.incrementAndGet(); throw e; } }
final IPreparedGraphQuery query = m_repo.prepareGraphQuery(queryStr);
final IPreparedGraphQuery query = m_repo.prepareGraphQuery(queryStr);
"}"; assertSameGraph(expected, m_repo.prepareGraphQuery(queryStr));
"}"; assertSameGraph(expected, m_repo.prepareGraphQuery(queryStr));