g.claim(destination, s.getPredicate(), valueResource);
copyProperties(g, s.getObject(), valueResource);
} else {
- throw new DatabaseException("Expected to copy property resource " + s.getObject());
+ Resource type = g.getPossibleType(s.getObject(), l0.Value);
+ if (type != null && g.hasStatement(type, l0.Enumeration, type)) {
+ g.deny(destination, s.getPredicate());
+ g.claim(destination, s.getPredicate(), s.getObject());
+ } else {
+ throw new DatabaseException("Expected to copy property resource " + s.getObject());
+ }
}
}
}