if (PredicateNode.class.isAssignableFrom(node.getClass()) &&
PredicateNode.class.isAssignableFrom(newNode.getClass())) {
final PredicateNode oldONode = (PredicateNode) createNewNode(node);
ClosableIterable<Triple> triples = graph.find(ANY_SUBJECT_NODE, oldONode, ANY_OBJECT_NODE);
for (Triple triple : triples) {
Triple newTriple =
tripleFactory.createTriple(triple.getSubject(), (PredicateNode) newNode, triple.getObject());
triplesToAdd.add(newTriple);
triplesToRemove.add(new TripleImpl(triple.getSubject(), oldONode, triple.getObject()));
}
triples.iterator().close();