BigdataSailRemoteRepositoryConnection implements RepositoryConnection { @Override public RepositoryResult<Statement> getStatements(final Resource s, final URI p, final Value o, final boolean includeInferred, final Resource... c) throws RepositoryException { try { final RemoteRepository remote = repo.getRemoteRepository(); final GraphQueryResult src = remote.getStatements(s, p, o, includeInferred, c); return new RepositoryResult<Statement>(new CloseableIteration<Statement, RepositoryException>() { @Override public boolean hasNext() throws RepositoryException { try { return src.hasNext(); } catch (Exception ex) { throw new RepositoryException(ex); } } @Override public Statement next() throws RepositoryException { try { return src.next(); } catch (Exception ex) { throw new RepositoryException(ex); } } @Override public void remove() throws RepositoryException { try { src.remove(); } catch (Exception ex) { throw new RepositoryException(ex); } } @Override public void close() throws RepositoryException { try { src.close(); } catch (Exception ex) { throw new RepositoryException(ex); } } }); } catch (Exception ex) { throw new RepositoryException(ex); } } BigdataSailRemoteRepositoryConnection(
            final BigdataSailRemoteRepository repo); long count(final Resource s, final URI p, final Value o, 
			final Resource... c); @Override RepositoryResult<Statement> getStatements(final Resource s,
            final URI p, final Value o, final boolean includeInferred,
            final Resource... c); @Override boolean hasStatement(final Resource s, final URI p, final Value o,
            final boolean includeInferred, final Resource... c); @Override BooleanQuery prepareBooleanQuery(final QueryLanguage ql,
            final String query, final String baseURI); @Override BooleanQuery prepareBooleanQuery(final QueryLanguage ql,
            final String query); @Override GraphQuery prepareGraphQuery(final QueryLanguage ql,
            final String query, final String baseURI); @Override GraphQuery prepareGraphQuery(final QueryLanguage ql,
            final String query); @Override Query prepareQuery(final QueryLanguage ql, final String query); @Override Query prepareQuery(final QueryLanguage ql, final String query,
            final String baseURI); @Override TupleQuery prepareTupleQuery(final QueryLanguage ql,
            final String query, final String baseURI); @Override TupleQuery prepareTupleQuery(final QueryLanguage ql,
            final String query); @Override boolean hasStatement(final Statement s,
            final boolean includeInferred, final Resource... c); @Override void add(
            final Iteration<? extends Statement, E> stmts, final Resource... c); @Override void add(final Resource s, final URI p, final Value o,
            final Resource... c); @Override void add(final Statement stmt, final Resource... c); @Override void add(final Iterable<? extends Statement> stmts,
            final Resource... c); @Override void add(final Reader input, final String baseURI,
            final RDFFormat format, final Resource... c); @Override void add(final URL input, final String baseURI,
            final RDFFormat format, final Resource... c); @Override void add(final File input, final String baseURI,
            final RDFFormat format, final Resource... c); @Override void add(final InputStream input, final String baseURI,
            final RDFFormat format, final Resource... c); @Override void remove(
            final Iteration<? extends Statement, E> stmts, final Resource... c); @Override void remove(final Statement stmt, final Resource... c); @Override void remove(final Iterable<? extends Statement> stmts,
            final Resource... c); @Override void remove(final Resource s, URI p, Value o, final Resource... c); @Override Repository getRepository(); @Override RepositoryResult<Resource> getContextIDs(); @Override boolean isEmpty(); @Override long size(final Resource... c); @Override void clear(final Resource... c); @Override void export(final RDFHandler handler, final Resource... c); @Override void exportStatements(final Resource s, final URI p, final Value o,
            final boolean includeInferred, final RDFHandler handler,
            final Resource... c); @Override Update prepareUpdate(final QueryLanguage ql, final String query); @Override Update prepareUpdate(final QueryLanguage ql, final String query,
            final String baseURI); @Override void setNamespace(String arg0, String arg1); @Override String getNamespace(String arg0); @Override RepositoryResult<Namespace> getNamespaces(); @Override void removeNamespace(String arg0); @Override void clearNamespaces(); @Override void setParserConfig(ParserConfig arg0); @Override ParserConfig getParserConfig(); @Override ValueFactory getValueFactory(); @Override boolean isOpen(); @Deprecated @Override boolean isAutoCommit(); @Deprecated @Override void setAutoCommit(final boolean autoCommit); @Override void close(); @Override boolean isActive(); @Override void setIsolationLevel(IsolationLevel isolationLevel); @Override IsolationLevel getIsolationLevel(); @Override void begin(); @Override void begin(IsolationLevel isolationLevel); void beginReadOnly(); void beginReadOnly(final long timestamp); @Override void commit(); @Override void rollback();  }
@Test public void testGetStatements() throws RepositoryException { final RepositoryResult<Statement> stmts = con.getStatements(s, p, o, includeInferred, c); try { assertEquals(EncodeDecodeValue.encodeValue(s), remote.data.opts.getRequestParam("s")); assertEquals(EncodeDecodeValue.encodeValue(p), remote.data.opts.getRequestParam("p")); assertEquals(EncodeDecodeValue.encodeValue(o), remote.data.opts.getRequestParam("o")); assertEquals(EncodeDecodeValue.encodeValue(c), remote.data.opts.getRequestParam("c")); assertEquals(Boolean.toString(includeInferred), remote.data.opts.getRequestParam(RemoteRepositoryDecls.INCLUDE_INFERRED)); } finally { stmts.close(); } }