import org.simantics.db.Statement;
import org.simantics.db.exception.DatabaseException;
import org.simantics.interop.test.GraphChanges;
+import org.simantics.interop.test.GraphChanges.Modification;
import org.simantics.utils.datastructures.Pair;
public class UpdateList {
this.changes = new HashSet<>(changes);
}
- public UpdateList(GraphChanges graphChanges, Collection<Pair<Statement, Statement>> coll) {
+ public UpdateList(GraphChanges graphChanges, Collection<Modification> coll) {
this.changes = new HashSet<>();
- for (Pair<Statement, Statement> p : coll) {
- changes.add(create(graphChanges, p));
+ for (Modification p : coll) {
+ changes.add(create(graphChanges, p.getLeftSub(),p.getRightSub(),new Pair<Statement, Statement>(p.getLeftStm(), p.getRightStm())));
}
}
- protected PropertyChange create(GraphChanges changes, Pair<Statement, Statement> change) {
- return new PropertyChange(changes, change);
+ protected PropertyChange create(GraphChanges changes, Resource left, Resource right, Pair<Statement, Statement> change) {
+ return new PropertyChange(changes, left,right, change);
}
public Collection<PropertyChange> getChanges() {