}
// If the property is a Map, recurse into it and group together its child properties.
else if (propertyDefinition instanceof PropertyDefinitionMap) {
List<AbstractPropertyMap> nestedSourceParentPropertyMaps = new ArrayList<AbstractPropertyMap>();
for (AbstractPropertyMap sourceParentPropertyMap : sourceParentPropertyMaps) {
PropertyMap nestedSourceParentPropertyMap = sourceParentPropertyMap
.getMap(propertyDefinition.getName());
nestedSourceParentPropertyMaps
.add((nestedSourceParentPropertyMap != null) ? nestedSourceParentPropertyMap : new PropertyMap(
propertyDefinition.getName()));
}
PropertyMap targetPropertyMap = new PropertyMap(propertyDefinition.getName());
targetParentPropertyMap.put(targetPropertyMap);
calculateGroupPropertyMap((PropertyDefinitionMap) propertyDefinition, nestedSourceParentPropertyMaps,
targetPropertyMap);
} else if (propertyDefinition instanceof PropertyDefinitionList) {
PropertyDefinitionList propertyDefinitionList = (PropertyDefinitionList) propertyDefinition;