if (ntd.hasOrderableChildNodes()) {
ent.orderableChildNodes = true;
} else {
Name[] nta = ent.getInheritedNodeTypes();
for (Name aNta : nta) {
QNodeTypeDefinition def = ntdCache.get(aNta);
if (def.hasOrderableChildNodes()) {
ent.orderableChildNodes = true;
break;
}
}
}
// resolve 'primary item' attribute value (JCR-1947)
if (ntd.getPrimaryItemName() != null) {
ent.primaryItemName = ntd.getPrimaryItemName();
} else {
Name[] nta = ent.getInheritedNodeTypes();
for (Name aNta : nta) {
QNodeTypeDefinition def = ntdCache.get(aNta);
if (def.getPrimaryItemName() != null) {
ent.primaryItemName = def.getPrimaryItemName();
break;
}
}
}