private static void addOrRemoveStatementData(final BigdataSailConnection conn,final BigdataStatement stmt,final boolean insert) throws SailException {
  final Resource s=stmt.getSubject();
  final URI p=stmt.getPredicate();
  final Value o=stmt.getObject();
  final Resource c=(Resource)(stmt.getContext() == null ? null : stmt.getContext());
  final Resource[] contexts=(Resource[])(c == null ? NO_CONTEXTS : new Resource[]{c});
  if (log.isTraceEnabled())   log.trace((insert ? "INSERT" : "DELETE") + ": <" + s+ ","+ p+ ","+ o+ ","+ Arrays.toString(contexts));
  if (insert) {
    conn.addStatement(s,p,o,contexts);
  }
 else {
    conn.removeStatements(s,p,o,contexts);
  }
}

private static void addOrRemoveStatementData ( final BigdataSailConnection conn , final BigdataStatement stmt , final boolean insert ) throws SailException { final Resource s = stmt . getSubject ( ) ; final URI p = stmt . getPredicate ( ) ; final Value o = stmt . getObject ( ) ; final Resource c = ( Resource ) ( stmt . getContext ( ) == null ? null : stmt . getContext ( ) ) ; final Resource [ ] contexts = ( Resource [ ] ) ( c == null ? NO_CONTEXTS : new Resource [ ] { c } ) ; if ( log . isTraceEnabled ( ) ) log . trace ( ( insert ? "INSERT" : "DELETE" ) + ": <" + s + "," + p + "," + o + "," + Arrays . toString ( contexts ) ) ; if ( insert ) { conn . addStatement ( s , p , o , contexts ) ; } else { conn . removeStatements ( s , p , o , contexts ) ; } }
insert or remove a statement ( insert data or delete data ) .
