InterceptingRepositoryConnection connection = new InterceptingRepositoryConnectionWrapper(sesameService.getRepository(), sesameService.getConnection());
connection.begin();
final Resource subject = connection.getValueFactory().createURI(uri);
try {
connection.addRepositoryConnectionInterceptor(new ResourceSubjectMetadata(subject));
// delete all triples for given subject
connection.remove(subject, null, null);
return Response.ok().build();