// handle old value (if it exists)
Iterator<Triple> iterator = inputGraph.filter(changeNode,
Ontology.oldValue, null);
Resource oldValue = null;
if (iterator.hasNext()) {
oldValue = iterator.next().getObject();
// Triple oldTriple = systemGraph.filter(null, predicateUriRef,
// oldValue).next();
Iterator<Triple> oldTriples = systemGraph.filter(userNode,
predicateUriRef, oldValue);
if (oldTriples.hasNext()) {
oldTriple = oldTriples.next();
}
}
Resource newValue = inputGraph
.filter(changeNode, Ontology.newValue, null).next()
.getObject();
newTriple = new TripleImpl(userNode, predicateUriRef,
newValue);