public void removeTypeStatement(Resource resource, URI type) throws RepositoryException { conn.remove(resource, RDF.TYPE, type); } }
@Override public void delete() { try { ObjectConnection connection = getObjectConnection(); connection.removeDesignation(this, (URI) getResource()); // explicitly removing the rdf type triple from the repository connection.remove(getResource(), null, null); connection.remove(null, null, getResource(), null); } catch (RepositoryException e) { e.printStackTrace(); } }
public void removeTypeStatement(Resource resource, URI type) throws RepositoryException { conn.remove(resource, RDF.TYPE, type); } }
@Override public void delete() { try { ObjectConnection connection = getObjectConnection(); // deleting an existing selector if(getSelector() != null) { getSelector().delete(); setSelector(null); } connection.removeDesignation(this, (URI) getResource()); // explicitly removing the rdf type triple from the repository connection.remove(getResource(), null, null); connection.remove(null, null, getResource(), null); } catch (RepositoryException e) { e.printStackTrace(); } } }
public void remove(ObjectConnection conn, Resource subj, Value obj) throws RepositoryException { conn.remove(subj, pred, obj); }
connection.remove(getResource(), null, null); } catch (RepositoryException e) { e.printStackTrace();
public void remove(ObjectConnection conn, Resource subj, Value obj) throws RepositoryException { conn.remove(subj, pred, obj); }
void removeStatements(Resource subj, URI pred, Value obj) { try { ObjectConnection conn = getObjectConnection(); conn.remove(subj, pred, obj); } catch (RepositoryException e) { throw new ObjectPersistException(e); } }
void removeStatements(Resource subj, URI pred, Value obj) { try { ObjectConnection conn = getObjectConnection(); conn.remove(subj, pred, obj); } catch (RepositoryException e) { throw new ObjectPersistException(e); } }
@Override public void clear() { try { ObjectConnection conn = getObjectConnection(); Resource resource = getResource(); int size = _size; if (size < 0) { size = (int) findSize(); } for (int i = 0; i < size; i++) { URI pred = getMemberPredicate(i); conn.remove(resource, pred, null); } } catch (RepositoryException e) { throw new ObjectPersistException(e); } }
private Object getAndSet(int index, Object o) throws RepositoryException { if (o == null) throw new NullPointerException(); URI pred = getMemberPredicate(index); Object old = get(index); ObjectConnection conn = getObjectConnection(); if (old != null) { conn.remove(getResource(), pred, null); } conn.add(getResource(), pred, conn.addObject(o)); Object[] block = getBlock(index / BSIZE); if (block != null) { block[index % BSIZE] = o; } return old; }
@Override public void clear() { try { ObjectConnection conn = getObjectConnection(); Resource resource = getResource(); int size = _size; if (size < 0) { size = (int) findSize(); } for (int i = 0; i < size; i++) { URI pred = getMemberPredicate(i); conn.remove(resource, pred, null); } } catch (RepositoryException e) { throw new ObjectPersistException(e); } }
private Object getAndSet(int index, Object o) throws RepositoryException { if (o == null) throw new NullPointerException(); URI pred = getMemberPredicate(index); Object old = get(index); ObjectConnection conn = getObjectConnection(); if (old != null) { conn.remove(getResource(), pred, null); } conn.add(getResource(), pred, conn.addObject(o)); Object[] block = getBlock(index / BSIZE); if (block != null) { block[index % BSIZE] = o; } return old; }
private void replace(int index, Object o) throws RepositoryException { if (o == null) throw new NullPointerException(); URI pred = getMemberPredicate(index); ObjectConnection conn = getObjectConnection(); Value newValue = getObjectConnection().addObject(o); boolean autoCommit = conn.isAutoCommit(); if (autoCommit) conn.setAutoCommit(false); try { conn.remove(getResource(), pred, null); conn.add(getResource(), pred, newValue); if (autoCommit) conn.setAutoCommit(true); } finally { if (autoCommit && !conn.isAutoCommit()) { conn.rollback(); conn.setAutoCommit(true); } } Object[] block = getBlock(index / BSIZE); if (block != null) { block[index % BSIZE] = o; } }
private void replace(int index, Object o) throws RepositoryException { if (o == null) throw new NullPointerException(); URI pred = getMemberPredicate(index); ObjectConnection conn = getObjectConnection(); Value newValue = getObjectConnection().addObject(o); boolean autoCommit = conn.isAutoCommit(); if (autoCommit) conn.setAutoCommit(false); try { conn.remove(getResource(), pred, null); conn.add(getResource(), pred, newValue); if (autoCommit) conn.setAutoCommit(true); } finally { if (autoCommit && !conn.isAutoCommit()) { conn.rollback(); conn.setAutoCommit(true); } } Object[] block = getBlock(index / BSIZE); if (block != null) { block[index % BSIZE] = o; } }
@Override public Object remove(int index) { ObjectConnection conn = getObjectConnection(); try { boolean autoCommit = conn.isAutoCommit(); if (autoCommit) { conn.setAutoCommit(false); } Object obj = get(index); int size = size(); for (int i = index; i < size - 1; i++) { replace(i, get(i + 1)); } URI pred = getMemberPredicate(size - 1); conn.remove(getResource(), pred, null); Object[] block = getBlock((size - 1) / BSIZE); if (block != null) { block[(size - 1) % BSIZE] = null; } if (_size > UNKNOWN) _size--; if (autoCommit) { conn.setAutoCommit(true); } return obj; } catch (RepositoryException e) { throw new ObjectPersistException(e); } }
@Override public Object remove(int index) { ObjectConnection conn = getObjectConnection(); try { boolean autoCommit = conn.isAutoCommit(); if (autoCommit) { conn.setAutoCommit(false); } Object obj = get(index); int size = size(); for (int i = index; i < size - 1; i++) { replace(i, get(i + 1)); } URI pred = getMemberPredicate(size - 1); conn.remove(getResource(), pred, null); Object[] block = getBlock((size - 1) / BSIZE); if (block != null) { block[(size - 1) % BSIZE] = null; } if (_size > UNKNOWN) _size--; if (autoCommit) { conn.setAutoCommit(true); } return obj; } catch (RepositoryException e) { throw new ObjectPersistException(e); } }