@Override protected void addStatementInternal( final Resource subj, final URI pred, final Value obj, final Resource... contexts) throws SailException { try { if (_quad) { if (contexts == null || contexts.length == 0) { throw new IllegalArgumentException("A quadstore always needs a context."); } for (int i = 0; i < contexts.length; i++) { _crdf.addData(_factory.createStatement(subj, pred, obj, contexts[i])); } } else { _crdf.addData(_factory.createStatement(subj, pred, obj)); } } catch (CumulusStoreException e) { e.printStackTrace(); throw new SailException(e); } }
@Override protected void addStatementInternal( final Resource subj, final URI pred, final Value obj, final Resource... contexts) throws SailException { try { if (_quad) { if (contexts == null || contexts.length == 0) { throw new IllegalArgumentException("A quadstore always needs a context."); } for (int i = 0; i < contexts.length; i++) { _crdf.addData(_factory.createStatement(subj, pred, obj, contexts[i])); } } else { _crdf.addData(_factory.createStatement(subj, pred, obj)); } } catch (CumulusStoreException e) { e.printStackTrace(); throw new SailException(e); } }
@Override protected void removeStatementsInternal( final Resource subj, final URI pred, final Value obj, final Resource... contexts) throws SailException { try { if (_quad) { if (contexts == null || contexts.length == 0) { throw new IllegalArgumentException("A quadstore always needs a context."); } for (int i = 0; i < contexts.length; i++) { _crdf.removeData(_factory.createNodes(subj, pred, obj, contexts[0])); } } else { _crdf.removeData(_factory.createNodes(subj, pred, obj)); } } catch (CumulusStoreException e) { e.printStackTrace(); throw new SailException(e); } }
@Override protected void removeStatementsInternal( final Resource subj, final URI pred, final Value obj, final Resource... contexts) throws SailException { try { if (_quad) { if (contexts == null || contexts.length == 0) { throw new IllegalArgumentException("A quadstore always needs a context."); } for (int i = 0; i < contexts.length; i++) { _crdf.removeData(_factory.createNodes(subj, pred, obj, contexts[0])); } } else { _crdf.removeData(_factory.createNodes(subj, pred, obj)); } } catch (CumulusStoreException e) { e.printStackTrace(); throw new SailException(e); } }