private static void rdfTransactionStuff() throws Exception {
Sail baseSail = new MemoryStore();
baseSail.initialize();
RDFTransactionSail sail = new RDFTransactionSail(baseSail) {
public void handleTransaction(final List<TransactionOperation> operations) throws SailException {
System.out.println(new String(createTransactionEntity(operations)));
}
};
SailConnection sc = sail.getConnection();
try {
sc.removeStatements(RDF.TYPE, null, null, (URI) null);
sc.commit();
} finally {
sc.rollback();
sc.close();
}
sail.shutDown();
baseSail.shutDown();
}