Set newDefs = new HashSet(Arrays.asList(entNew.getAllItemDefs()));
Set allDefs = new HashSet(Arrays.asList(entAll.getAllItemDefs()));
// added child item definitions
Set addedDefs = new HashSet(newDefs);
addedDefs.removeAll(oldDefs);
// referential integrity check
boolean referenceableOld = entOld.includesNodeType(NameConstants.MIX_REFERENCEABLE);
boolean referenceableNew = entNew.includesNodeType(NameConstants.MIX_REFERENCEABLE);
if (referenceableOld && !referenceableNew) {