Collection triplesToDelete = new HashSet();
StmtIterator allStatements = model.listStatements();
while (allStatements.hasNext()) {
Statement current = allStatements.nextStatement();
if (!triplesToKeep.contains(current)) {
RSIterator rsIter = current.listReifiedStatements();
boolean temporary = false;
while (rsIter.hasNext()) {
Resource currentRS = rsIter.nextRS();
if (currentRS.hasProperty(RDF.type, RWCF.Temporary)) {
temporary = true;