public void add(ObjectConnection conn, Resource subj, Value obj) throws RepositoryException { conn.add(subj, pred, obj); }
private void assign(int index, Object o) throws RepositoryException { if (o == null) throw new NullPointerException(); URI pred = getMemberPredicate(index); Value newValue = getObjectConnection().addObject(o); ObjectConnection conn = getObjectConnection(); conn.add(getResource(), pred, newValue); clearBlock(index / BSIZE); }
private void assign(int index, Object o) throws RepositoryException { if (o == null) throw new NullPointerException(); URI pred = getMemberPredicate(index); Value newValue = getObjectConnection().addObject(o); ObjectConnection conn = getObjectConnection(); conn.add(getResource(), pred, newValue); clearBlock(index / BSIZE); }
public void add(ObjectConnection conn, Resource subj, Value obj) throws RepositoryException { conn.add(subj, pred, obj); }
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; }
public void addTypeStatement(Resource resource, URI type) throws RepositoryException { if (!RDFS.RESOURCE.equals(type)) { conn.add(resource, RDF.TYPE, type); } }
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; }
public void addTypeStatement(Resource resource, URI type) throws RepositoryException { if (!RDFS.RESOURCE.equals(type)) { conn.add(resource, RDF.TYPE, type); } }
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; } }
void addStatement(Resource subj, URI pred, Value obj) { if (obj == null) return; try { ObjectConnection conn = getObjectConnection(); conn.add(subj, pred, obj); } catch (RepositoryException e) { throw new ObjectPersistException(e); } }
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; } }
void addStatement(Resource subj, URI pred, Value obj) { if (obj == null) return; try { ObjectConnection conn = getObjectConnection(); conn.add(subj, pred, obj); } catch (RepositoryException e) { throw new ObjectPersistException(e); } }
anno4j.getObjectRepository() .getConnection() .add(JenaSesameUtils.asSesameStatement(jenaStatement)); statementTransferCount++;