@Test public void testAdd() throws Exception { RyaIRI cpu = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "cpu")); RyaIRI loadPerc = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "loadPerc")); RyaIRI uri1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "uri1")); dao.add(new RyaStatement(cpu, loadPerc, uri1)); CloseableIteration<RyaStatement, RyaDAOException> iter = dao.getQueryEngine().query(new RyaStatement(cpu, loadPerc, null), conf); int count = 0; while (iter.hasNext()) { assertTrue(uri1.equals(iter.next().getObject())); count++; } iter.close(); assertEquals(1, count); dao.delete(new RyaStatement(cpu, loadPerc, null), conf); iter = dao.getQueryEngine().query(new RyaStatement(cpu, loadPerc, null), conf); count = 0; while (iter.hasNext()) { count++; iter.next(); } iter.close(); assertEquals(0, count); }
@Override public void add(final RyaStatement statement) throws RyaDAOException { commit(Iterators.singletonIterator(statement)); }
AccumuloRyaDAO implements RyaDAO<AccumuloRdfConfiguration>, RyaNamespaceManager<AccumuloRdfConfiguration> { @Override public void add(final RyaStatement statement) throws RyaDAOException { commit(Iterators.singletonIterator(statement)); } }
AccumuloRyaDAO implements RyaDAO<AccumuloRdfConfiguration>, RyaNamespaceManager<AccumuloRdfConfiguration> { @Override public void add(final RyaStatement statement) throws RyaDAOException { commit(Iterators.singletonIterator(statement)); }  }
AccumuloRyaDAO implements RyaDAO<AccumuloRdfConfiguration>, RyaNamespaceManager<AccumuloRdfConfiguration> { @Override public void add(final RyaStatement statement) throws RyaDAOException { commit(Iterators.singletonIterator(statement)); }  @Override boolean isInitialized(); @Override void init(); @Override String getVersion(); @Override void add(final RyaStatement statement); @Override void add(final Iterator<RyaStatement> iter); @Override void delete(final RyaStatement stmt, final AccumuloRdfConfiguration aconf); @Override void delete(final Iterator<RyaStatement> statements, final AccumuloRdfConfiguration conf); @Override void dropGraph(final AccumuloRdfConfiguration conf, final RyaIRI... graphs); @Override void destroy(); @Override void addNamespace(final String pfx, final String namespace); @Override String getNamespace(final String pfx); @Override void removeNamespace(final String pfx); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override CloseableIteration<Namespace, RyaDAOException> iterateNamespace(); @Override RyaNamespaceManager<AccumuloRdfConfiguration> getNamespaceManager(); @Override void purge(final RdfCloudTripleStoreConfiguration configuration); @Override void dropAndDestroy(); synchronized Connector getConnector(); synchronized void setConnector(final Connector connector); BatchWriterConfig getBatchWriterConfig(); void setBatchWriterConfig(final BatchWriterConfig batchWriterConfig); @Override synchronized AccumuloRdfConfiguration getConf(); @Override synchronized void setConf(final AccumuloRdfConfiguration conf); RyaTableMutationsFactory getRyaTableMutationsFactory(); void setRyaTableMutationsFactory(final RyaTableMutationsFactory ryaTableMutationsFactory); @Override AccumuloRyaQueryEngine getQueryEngine(); void setQueryEngine(final AccumuloRyaQueryEngine queryEngine); @Override void flush(); }
AccumuloRyaDAO implements RyaDAO<AccumuloRdfConfiguration>, RyaNamespaceManager<AccumuloRdfConfiguration> { @Override public void add(final RyaStatement statement) throws RyaDAOException { commit(Iterators.singletonIterator(statement)); }  @Override boolean isInitialized(); @Override void init(); @Override String getVersion(); @Override void add(final RyaStatement statement); @Override void add(final Iterator<RyaStatement> iter); @Override void delete(final RyaStatement stmt, final AccumuloRdfConfiguration aconf); @Override void delete(final Iterator<RyaStatement> statements, final AccumuloRdfConfiguration conf); @Override void dropGraph(final AccumuloRdfConfiguration conf, final RyaIRI... graphs); @Override void destroy(); @Override void addNamespace(final String pfx, final String namespace); @Override String getNamespace(final String pfx); @Override void removeNamespace(final String pfx); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override CloseableIteration<Namespace, RyaDAOException> iterateNamespace(); @Override RyaNamespaceManager<AccumuloRdfConfiguration> getNamespaceManager(); @Override void purge(final RdfCloudTripleStoreConfiguration configuration); @Override void dropAndDestroy(); synchronized Connector getConnector(); synchronized void setConnector(final Connector connector); BatchWriterConfig getBatchWriterConfig(); void setBatchWriterConfig(final BatchWriterConfig batchWriterConfig); @Override synchronized AccumuloRdfConfiguration getConf(); @Override synchronized void setConf(final AccumuloRdfConfiguration conf); RyaTableMutationsFactory getRyaTableMutationsFactory(); void setRyaTableMutationsFactory(final RyaTableMutationsFactory ryaTableMutationsFactory); @Override AccumuloRyaQueryEngine getQueryEngine(); void setQueryEngine(final AccumuloRyaQueryEngine queryEngine); @Override void flush();  }