super(changes);
}
+ public AddDeleteUpdateOp(boolean add, GraphChanges changes) {
+ super(changes);
+ this.add = add;
+ }
+
@Override
public boolean isAdd() {
return add;
}
}
+ public static void copyTags(WriteGraph g, Resource source, Resource destination) throws DatabaseException {
+ Layer0 L0 = Layer0.getInstance(g);
+ for (Statement s : g.getStatements(source, L0.IsWeaklyRelatedTo)) {
+ if (s.getObject().equals(source)) {
+ g.claim(destination, s.getPredicate(), destination);
+ }
+ }
+ }
+
+ public static void copyTypes(WriteGraph g, Resource source, Resource destination) throws DatabaseException {
+ Layer0 L0 = Layer0.getInstance(g);
+ for (Resource r : g.getObjects(source, L0.InstanceOf))
+ g.claim(destination, L0.InstanceOf, r);
+ for (Resource r : g.getObjects(source, L0.Inherits))
+ g.claim(destination, L0.Inherits, r);
+ for (Resource r : g.getObjects(source, L0.SubrelationOf))
+ g.claim(destination, L0.SubrelationOf, r);
+ }
+
protected void copyIssues(WriteGraph g, Resource source, Resource destination) throws DatabaseException {
Layer0 l0 = Layer0.getInstance(g);
IssueResource ir = IssueResource.getInstance(g);