@Test public void testReset() throws IOException { this.store.reset(); assertEquals(NUM_OF_DEFAULT_STATEMENTS, countStatementsInStore(null)); }
@Override public void reset() throws IOException { VirtuosoRepositoryConnection connection = null; try { connection = (VirtuosoRepositoryConnection) this.virtuoso.getConnection(); connection.getQuadStoreConnection().prepareCall("RDF_GLOBAL_RESET ()").execute(); } catch (final RepositoryException ex) { throw new IOException("Could not connect to Virtuoso server", ex); } catch (final SQLException e) { throw new IOException("Something went wrong while invoking stored procedure.", e); } finally { if (connection != null) { try { connection.close(); } catch (final RepositoryException re) { throw new IOException("Error while closing connection.", re); } } } final boolean removedTransactionMarker = removeTransactionMarker(); LOGGER.info("Database reset. Transaction marker removed: " + removedTransactionMarker); }
VirtuosoTripleStore implements TripleStore { @Override public void reset() throws IOException { VirtuosoRepositoryConnection connection = null; try { connection = (VirtuosoRepositoryConnection) this.virtuoso.getConnection(); connection.getQuadStoreConnection().prepareCall("RDF_GLOBAL_RESET ()").execute(); } catch (final RepositoryException ex) { throw new IOException("Could not connect to Virtuoso server", ex); } catch (final SQLException e) { throw new IOException("Something went wrong while invoking stored procedure.", e); } finally { if (connection != null) { try { connection.close(); } catch (final RepositoryException re) { throw new IOException("Error while closing connection.", re); } } } final boolean removedTransactionMarker = removeTransactionMarker(); LOGGER.info("Database reset. Transaction marker removed: " + removedTransactionMarker); } }
VirtuosoTripleStore implements TripleStore { @Override public void reset() throws IOException { VirtuosoRepositoryConnection connection = null; try { connection = (VirtuosoRepositoryConnection) this.virtuoso.getConnection(); connection.getQuadStoreConnection().prepareCall("RDF_GLOBAL_RESET ()").execute(); } catch (final RepositoryException ex) { throw new IOException("Could not connect to Virtuoso server", ex); } catch (final SQLException e) { throw new IOException("Something went wrong while invoking stored procedure.", e); } finally { if (connection != null) { try { connection.close(); } catch (final RepositoryException re) { throw new IOException("Error while closing connection.", re); } } } final boolean removedTransactionMarker = removeTransactionMarker(); LOGGER.info("Database reset. Transaction marker removed: " + removedTransactionMarker); } VirtuosoTripleStore(final FileSystem fileSystem, @Nullable final String host,
            @Nullable final Integer port, @Nullable final String username,
            @Nullable final String password);  VirtuosoTripleStore(final FileSystem fileSystem, @Nullable final String host,
            @Nullable final Integer port, @Nullable final String username,
            @Nullable final String password, @Nullable final Boolean pooling,
            @Nullable final Integer batchSize, @Nullable final Integer fetchSize,
            @Nullable final String markerFilename); }
VirtuosoTripleStore implements TripleStore { @Override public void reset() throws IOException { VirtuosoRepositoryConnection connection = null; try { connection = (VirtuosoRepositoryConnection) this.virtuoso.getConnection(); connection.getQuadStoreConnection().prepareCall("RDF_GLOBAL_RESET ()").execute(); } catch (final RepositoryException ex) { throw new IOException("Could not connect to Virtuoso server", ex); } catch (final SQLException e) { throw new IOException("Something went wrong while invoking stored procedure.", e); } finally { if (connection != null) { try { connection.close(); } catch (final RepositoryException re) { throw new IOException("Error while closing connection.", re); } } } final boolean removedTransactionMarker = removeTransactionMarker(); LOGGER.info("Database reset. Transaction marker removed: " + removedTransactionMarker); } VirtuosoTripleStore(final FileSystem fileSystem, @Nullable final String host,
            @Nullable final Integer port, @Nullable final String username,
            @Nullable final String password);  VirtuosoTripleStore(final FileSystem fileSystem, @Nullable final String host,
            @Nullable final Integer port, @Nullable final String username,
            @Nullable final String password, @Nullable final Boolean pooling,
            @Nullable final Integer batchSize, @Nullable final Integer fetchSize,
            @Nullable final String markerFilename); @Override void init(); @Override TripleTransaction begin(final boolean readOnly); @Override void reset(); @Override void close(); @Override String toString(); }
VirtuosoTripleStore implements TripleStore { @Override public void reset() throws IOException { VirtuosoRepositoryConnection connection = null; try { connection = (VirtuosoRepositoryConnection) this.virtuoso.getConnection(); connection.getQuadStoreConnection().prepareCall("RDF_GLOBAL_RESET ()").execute(); } catch (final RepositoryException ex) { throw new IOException("Could not connect to Virtuoso server", ex); } catch (final SQLException e) { throw new IOException("Something went wrong while invoking stored procedure.", e); } finally { if (connection != null) { try { connection.close(); } catch (final RepositoryException re) { throw new IOException("Error while closing connection.", re); } } } final boolean removedTransactionMarker = removeTransactionMarker(); LOGGER.info("Database reset. Transaction marker removed: " + removedTransactionMarker); } VirtuosoTripleStore(final FileSystem fileSystem, @Nullable final String host,
            @Nullable final Integer port, @Nullable final String username,
            @Nullable final String password);  VirtuosoTripleStore(final FileSystem fileSystem, @Nullable final String host,
            @Nullable final Integer port, @Nullable final String username,
            @Nullable final String password, @Nullable final Boolean pooling,
            @Nullable final Integer batchSize, @Nullable final Integer fetchSize,
            @Nullable final String markerFilename); @Override void init(); @Override TripleTransaction begin(final boolean readOnly); @Override void reset(); @Override void close(); @Override String toString();  }