import java.util.Collection;
import org.simantics.db.Resource;
+import org.simantics.db.Statement;
import org.simantics.db.WriteGraph;
import org.simantics.db.exception.DatabaseException;
import org.simantics.interop.test.GraphChanges;
private boolean selected = false;
private boolean manualSelection = false;
protected boolean applied = false;
+ protected boolean visible = true;
private Collection<UpdateOp> parentOps = new ArrayList<UpdateOp>();
private Collection<UpdateOp> subOps = new ArrayList<UpdateOp>();
public abstract boolean isAdd();
public abstract boolean isDelete();
+ public boolean isChange() {
+ return isAdd() || isDelete();
+ }
+
/**
* Is parent operation applied before this.
* @return
private boolean _select(boolean select) {
if (select == selected)
return true;
+ if (applied)
+ return false;
if (select) {
if (selectParentOps()) {
for (UpdateOp op : parentOps)
public boolean applied() {
return applied;
}
+
+ public boolean isVisible() {
+ return visible;
+ }
+
+
public void apply(WriteGraph g) throws DatabaseException {
if (applied)
return;
*/
public abstract Resource getResource();
+ /**
+ * Returns resource that this operation is changing.
+ * @return
+ */
+ public abstract Statement getStatement();
+
/**
* Returns resource that this operation created during apply operation. If operation did not add anything, this returns null.
* @return