@Test @Ignore public void Export() throws UnsupportedEncodingException { DummyOutputStream out = new DummyOutputStream(); repository.export(Format.NTRIPLES, null, out); assertTrue(out.getLength() > 0); }
@Override public void export(Format format, Map<String, String> ns2prefix, UID context, OutputStream out) { RDFWriter writer = WriterUtils.createWriter(format, out, ns2prefix); RDFConnection conn = openConnection(); try { CloseableIterator<STMT> stmts = conn.findStatements(null, null, null, context, false); try { writer.begin(); while (stmts.hasNext()) { writer.handle(stmts.next()); } writer.end(); } finally { stmts.close(); } } finally { conn.close(); } }
VirtuosoRepository implements Repository { @Override public void export(Format format, Map<String, String> ns2prefix, UID context, OutputStream out) { RDFWriter writer = WriterUtils.createWriter(format, out, ns2prefix); RDFConnection conn = openConnection(); try { CloseableIterator<STMT> stmts = conn.findStatements(null, null, null, context, false); try { writer.begin(); while (stmts.hasNext()) { writer.handle(stmts.next()); } writer.end(); } finally { stmts.close(); } } finally { conn.close(); } } }
VirtuosoRepository implements Repository { @Override public void export(Format format, Map<String, String> ns2prefix, UID context, OutputStream out) { RDFWriter writer = WriterUtils.createWriter(format, out, ns2prefix); RDFConnection conn = openConnection(); try { CloseableIterator<STMT> stmts = conn.findStatements(null, null, null, context, false); try { writer.begin(); while (stmts.hasNext()) { writer.handle(stmts.next()); } writer.end(); } finally { stmts.close(); } } finally { conn.close(); } } VirtuosoRepository(String hostlist, String user, String password);  VirtuosoRepository(String host, int port, String user, String password);  VirtuosoRepository(String hostlist, String user, String password, String defGraph);  VirtuosoRepository(String host, int port, String user, String password, String defGraph); }
VirtuosoRepository implements Repository { @Override public void export(Format format, Map<String, String> ns2prefix, UID context, OutputStream out) { RDFWriter writer = WriterUtils.createWriter(format, out, ns2prefix); RDFConnection conn = openConnection(); try { CloseableIterator<STMT> stmts = conn.findStatements(null, null, null, context, false); try { writer.begin(); while (stmts.hasNext()) { writer.handle(stmts.next()); } writer.end(); } finally { stmts.close(); } } finally { conn.close(); } } VirtuosoRepository(String hostlist, String user, String password);  VirtuosoRepository(String host, int port, String user, String password);  VirtuosoRepository(String hostlist, String user, String password, String defGraph);  VirtuosoRepository(String host, int port, String user, String password, String defGraph); @Override void close(); @Override RT execute(RDFConnectionCallback<RT> operation); @Override void export(Format format, Map<String, String> ns2prefix, UID context, OutputStream out); @Override void export(Format format, UID context, OutputStream out); VirtuosoRepositoryConnection openConnection(); File getDataDir(); int getFetchSize(); void initialize(); @Override void load(Format format, InputStream is, UID context, boolean replace); boolean isInitialized(); void setDataDir(File dataDir); void setFetchSize(int sz); void setSources(RDFSource... sources); void setAllowedGraphs(Collection<UID> allowedGraphs); void setInitialPoolSize(int initialPoolSize); void setMinPoolSize(int minPoolSize); void setMaxPoolSize(int maxPoolSize); }
VirtuosoRepository implements Repository { @Override public void export(Format format, Map<String, String> ns2prefix, UID context, OutputStream out) { RDFWriter writer = WriterUtils.createWriter(format, out, ns2prefix); RDFConnection conn = openConnection(); try { CloseableIterator<STMT> stmts = conn.findStatements(null, null, null, context, false); try { writer.begin(); while (stmts.hasNext()) { writer.handle(stmts.next()); } writer.end(); } finally { stmts.close(); } } finally { conn.close(); } } VirtuosoRepository(String hostlist, String user, String password);  VirtuosoRepository(String host, int port, String user, String password);  VirtuosoRepository(String hostlist, String user, String password, String defGraph);  VirtuosoRepository(String host, int port, String user, String password, String defGraph); @Override void close(); @Override RT execute(RDFConnectionCallback<RT> operation); @Override void export(Format format, Map<String, String> ns2prefix, UID context, OutputStream out); @Override void export(Format format, UID context, OutputStream out); VirtuosoRepositoryConnection openConnection(); File getDataDir(); int getFetchSize(); void initialize(); @Override void load(Format format, InputStream is, UID context, boolean replace); boolean isInitialized(); void setDataDir(File dataDir); void setFetchSize(int sz); void setSources(RDFSource... sources); void setAllowedGraphs(Collection<UID> allowedGraphs); void setInitialPoolSize(int initialPoolSize); void setMinPoolSize(int minPoolSize); void setMaxPoolSize(int maxPoolSize);  }