@Override public boolean clear(Resource... resources) { rc.clear(resources); // note: we don't know whether any statements are removed return false; }
protected Repository createRepository() throws Exception { Repository repo = newRepository(); repo.initialize(); Repositories.consume(repo, con -> { con.clear(); con.clearNamespaces(); }); return repo; }
protected Repository createRepository() throws Exception { Repository repository = newRepository(); repository.initialize(); RepositoryConnection con = repository.getConnection(); con.clear(); con.clearNamespaces(); con.close(); return repository; }
@Override public void clear() { try { rc.clear(); } catch (RepositoryException e) { throw new RepositoryGraphRuntimeException(e); } }
public void execute(RepositoryConnection con) throws RepositoryException { con.clear(getContexts()); }
protected void clearInternal(Resource... contexts) throws SailException { try { repoConnection.clear(contexts); } catch (RepositoryException e) { throw new SailException(e); } }
@Override public void clear() throws AtomSetException { try { this.connection.clear(); } catch (RepositoryException e) { throw new AtomSetException("Error during cleaning this atomSet", e); } }
@Override public void removeAll() throws ModelRuntimeException { this.assertModel(); try { this.connection.clear(); } catch(RepositoryException e) { throw new ModelRuntimeException(e); } }
@Override public void removeAll() throws ModelRuntimeException { this.assertModel(); try { this.connection.clear(); } catch (RepositoryException e) { throw new ModelRuntimeException(e); } }
public void clearLoadedContexts() throws RepositoryException { RepositoryConnection conn = super.getConnection(); try { conn.setAutoCommit(false); for (Map.Entry<URL, Map<URL, URI>> e : index.entrySet()) { for (Map.Entry<URL, URI> f : e.getValue().entrySet()) { conn.clear(f.getValue()); } } conn.commit(); } finally { conn.close(); } }
public interface Factory { SPARQLSyntaxTest createSPARQLSyntaxTest(String testURI, String testName, String testAction, boolean positiveTest); }
@Test public void testClear() throws Exception { testCon.add(bob, name, nameBob); assertThat(testCon.hasStatement(null, name, nameBob, false), is(equalTo(true))); testCon.clear(); assertThat(testCon.hasStatement(null, name, nameBob, false), is(equalTo(false))); }
public synchronized boolean clear(Value... contexts) { try { if (contains(null, null, null, contexts)) { con.clear(cast(contexts)); size = -1; return true; } } catch (RepositoryException e) { throw new ModelException(e); } return false; }
public boolean removeModel(URI contextURI) { this.assertModel(); org.openrdf.model.Resource context = ConversionUtil.toOpenRDF( contextURI, this.valueFactory); try { this.connection.clear(context); } catch (RepositoryException e) { throw new ModelRuntimeException(e); } return true; }
@Override public boolean removeModel(URI contextURI) { this.assertModel(); org.openrdf.model.Resource context = ConversionUtil .toOpenRDF(contextURI, this.valueFactory); try { this.connection.clear(context); } catch(RepositoryException e) { throw new ModelRuntimeException(e); } return true; }
@Override protected void setUp() throws Exception { repository = createRepository(); con = repository.getConnection(); con.clear(); con.add(t1, RDF.VALUE, term1); con.add(t2, RDF.VALUE, term2); }
public void testClear() throws Exception { testCon.add(bob, name, nameBob); assertTrue(testCon.hasStatement(null, name, nameBob, false)); testCon.clear(); assertFalse(testCon.hasStatement(null, name, nameBob, false)); }
@Test public void testClear() throws Exception { testCon.add(bob, name, nameBob); assertThat(testCon.hasStatement(null, name, nameBob, false), is(equalTo(true))); testCon.clear(); assertThat(testCon.hasStatement(null, name, nameBob, false), is(equalTo(false))); }