public PropertyChange(GraphChanges changes, Statement first, Statement second) {
+ if (first == null && second == null)
+ throw new IllegalArgumentException("At least one of the stamenents must be non null.");
this.pair = new Pair<Statement, Statement>(first, second);
this.changes = changes;
}
public PropertyChange(GraphChanges changes, Pair<Statement, Statement> change) {
+ if (change == null || (change.first == null && change.second == null))
+ throw new IllegalArgumentException("At least one of the stamenents must be non null.");
this.pair = change;
this.changes = changes;
}
this.visible = visible;
}
+ @Override
+ public String toString() {
+ String s = "PropertyChange";
+ if (pair.first != null)
+ s += " (" + (pair.first.getSubject()) + " , " + pair.first.getPredicate() + " , " + pair.first.getObject() + ")";
+ if (pair.second != null)
+ s += " (" + (pair.second.getSubject()) + " , " + pair.second.getPredicate() + " , " + pair.second.getObject() + ")";
+ return s;
+ }
+
}