}
if (classDescriptor.getBeanDescriptors() != null) {
Iterator beanIterator = classDescriptor.getBeanDescriptors().iterator();
while (beanIterator.hasNext()) {
BeanDescriptor field = (BeanDescriptor) beanIterator.next();
if (this.isPropertyType(field.getJcrType())) {
final PropertyDefinitionTemplate pdt = getPropertyDefinition(ntm, session.getValueFactory(), field);
// add the just created pdt to the nodetypetemplate
propertyDefinitionTemplates.add(pdt);
} else {
final NodeDefinitionTemplate ndt = getNodeDefinition(ntm, session.getValueFactory(), field);
// add the just created pdt to the nodetypetemplate
nodeDefinitionTemplates.add(ndt);
}
}
}
if (classDescriptor.getCollectionDescriptors() != null) {
Iterator collectionIterator = classDescriptor.getCollectionDescriptors().iterator();
while (collectionIterator.hasNext()) {
CollectionDescriptor field = (CollectionDescriptor) collectionIterator.next();
if (this.isPropertyType(field.getJcrType())) {
final PropertyDefinitionTemplate pdt = getPropertyDefinition(ntm, session.getValueFactory(), field);
// add the just created pdt to the nodetypetemplate
propertyDefinitionTemplates.add(pdt);
} else {
final NodeDefinitionTemplate ndt = getNodeDefinition(ntm, session.getValueFactory(), field);