@Test public void testRemoveStatement() throws MergerException { final AccumuloRyaStatementStore accumuloRyaStatementStore = createAccumuloRyaStatementStore(); for (final RyaStatement ryaStatement : RYA_STATEMENTS) { accumuloRyaStatementStore.addStatement(ryaStatement); accumuloRyaStatementStore.removeStatement(ryaStatement); assertTrue(isStatementStoreEmpty(accumuloRyaStatementStore)); } for (final RyaStatement ryaStatement : RYA_STATEMENTS) { accumuloRyaStatementStore.addStatement(ryaStatement); } for (final RyaStatement ryaStatement : RYA_STATEMENTS) { accumuloRyaStatementStore.removeStatement(ryaStatement); } assertTrue(isStatementStoreEmpty(accumuloRyaStatementStore)); for (final RyaStatement ryaStatement : RYA_STATEMENTS) { accumuloRyaStatementStore.addStatement(ryaStatement); } final ImmutableList<RyaStatement> reverseList = RYA_STATEMENTS.reverse(); for (final RyaStatement ryaStatement : reverseList) { accumuloRyaStatementStore.removeStatement(ryaStatement); } assertTrue(isStatementStoreEmpty(accumuloRyaStatementStore)); for (final RyaStatement ryaStatement : RYA_STATEMENTS) { accumuloRyaStatementStore.addStatement(ryaStatement); } final RyaStatement firstToRemove = RYA_STATEMENTS.get(2); final RyaStatement before = RYA_STATEMENTS.get(1); final RyaStatement after = RYA_STATEMENTS.get(3); accumuloRyaStatementStore.removeStatement(firstToRemove); accumuloRyaStatementStore.removeStatement(before); accumuloRyaStatementStore.removeStatement(after); }
@Override public void removeStatement(final RyaStatement statement) throws RemoveStatementException { try { accumuloRyaDao.delete(statement, accumuloRyaDao.getConf()); } catch (final RyaDAOException e) { throw new RemoveStatementException("Unable to delete the Rya Statement", e); } }
AccumuloRyaStatementStore implements RyaStatementStore { @Override public void removeStatement(final RyaStatement statement) throws RemoveStatementException { try { accumuloRyaDao.delete(statement, accumuloRyaDao.getConf()); } catch (final RyaDAOException e) { throw new RemoveStatementException("Unable to delete the Rya Statement", e); } } }
AccumuloRyaStatementStore implements RyaStatementStore { @Override public void removeStatement(final RyaStatement statement) throws RemoveStatementException { try { accumuloRyaDao.delete(statement, accumuloRyaDao.getConf()); } catch (final RyaDAOException e) { throw new RemoveStatementException("Unable to delete the Rya Statement", e); } } AccumuloRyaStatementStore(final AccumuloRyaDAO dao, final String tablePrefix, final String ryaInstance); }
AccumuloRyaStatementStore implements RyaStatementStore { @Override public void removeStatement(final RyaStatement statement) throws RemoveStatementException { try { accumuloRyaDao.delete(statement, accumuloRyaDao.getConf()); } catch (final RyaDAOException e) { throw new RemoveStatementException("Unable to delete the Rya Statement", e); } } AccumuloRyaStatementStore(final AccumuloRyaDAO dao, final String tablePrefix, final String ryaInstance); @Override Iterator<RyaStatement> fetchStatements(); @Override void addStatement(final RyaStatement statement); @Override void removeStatement(final RyaStatement statement); @Override void updateStatement(final RyaStatement original, final RyaStatement update); @Override boolean containsStatement(final RyaStatement ryaStatement); @Override Optional<MergeParentMetadata> getParentMetadata(); @Override void setParentMetadata(final MergeParentMetadata metadata); RyaStatement findStatement(final RyaStatement ryaStatement); void addIterator(final IteratorSetting iteratorSetting); }
AccumuloRyaStatementStore implements RyaStatementStore { @Override public void removeStatement(final RyaStatement statement) throws RemoveStatementException { try { accumuloRyaDao.delete(statement, accumuloRyaDao.getConf()); } catch (final RyaDAOException e) { throw new RemoveStatementException("Unable to delete the Rya Statement", e); } } AccumuloRyaStatementStore(final AccumuloRyaDAO dao, final String tablePrefix, final String ryaInstance); @Override Iterator<RyaStatement> fetchStatements(); @Override void addStatement(final RyaStatement statement); @Override void removeStatement(final RyaStatement statement); @Override void updateStatement(final RyaStatement original, final RyaStatement update); @Override boolean containsStatement(final RyaStatement ryaStatement); @Override Optional<MergeParentMetadata> getParentMetadata(); @Override void setParentMetadata(final MergeParentMetadata metadata); RyaStatement findStatement(final RyaStatement ryaStatement); void addIterator(final IteratorSetting iteratorSetting);  }