try {
connection.begin();
connection.remove().statements(subjectResource, predicateResource, null, context);
connection.add().statement(subjectResource, predicateResource, objectValue, context);
connection.commit();
} catch (StardogException e) {
log.error("Error with remove statement", e);
throw new RuntimeException(e);
} finally {
dataSource.releaseConnection(connection);