@Override protected void removeStatementsInternal(Resource subj, URI pred, Value obj, Resource... contexts) throws SailException { RdbmsResource s = vf.asRdbmsResource(subj); RdbmsURI p = vf.asRdbmsURI(pred); RdbmsValue o = vf.asRdbmsValue(obj); RdbmsResource[] c = vf.asRdbmsResource(contexts); triples.remove(s, p, o, c); }
@Override protected CloseableIteration<? extends Statement, SailException> getStatementsInternal( Resource subj, URI pred, Value obj, boolean includeInferred, Resource... contexts) throws SailException { RdbmsResource s = vf.asRdbmsResource(subj); RdbmsURI p = vf.asRdbmsURI(pred); RdbmsValue o = vf.asRdbmsValue(obj); RdbmsResource[] c = vf.asRdbmsResource(contexts); return triples.find(s, p, o, c); }
@Override protected void addStatementInternal(Resource subj, URI pred, Value obj, Resource... contexts) throws SailException { try { if (contexts.length == 0) { triples.add(vf.createStatement(subj, pred, obj)); } else { for (Resource ctx : contexts) { triples.add(vf.createStatement(subj, pred, obj, ctx)); } } } catch (SQLException e) { throw new RdbmsException(e); } catch (InterruptedException e) { throw new RdbmsException(e); } }
@Override protected long sizeInternal(Resource... contexts) throws SailException { try { return triples.size(vf.asRdbmsResource(contexts)); } catch (SQLException e) { throw new RdbmsException(e); } }