Iterator<String> propkeys = propDefs.keySet().iterator();
while (propkeys.hasNext()) {
final String key = propkeys.next();
PropertyDefinition pdef = propDefs.get(key);
if (pdef instanceof PropertyDefinitionSimple) {
String fieldName = ((PropertyDefinitionSimple) pdef).getName();
if (values.containsKey(fieldName)) {
properties.add(new PropertySimple(key, values.get(fieldName)));
}
} else if (pdef instanceof PropertyDefinitionList) {
PropertyDefinition propertyDefinitionMap = ((PropertyDefinitionList) pdef)
.getMemberDefinition();
Map simpleProperties = ((PropertyDefinitionMap) propertyDefinitionMap)
.getPropertyDefinitions();
Iterator simplePropertiesIter = simpleProperties.values()
.iterator();
while (simplePropertiesIter.hasNext()) {
PropertyDefinition simpleProp = (PropertyDefinition) simplePropertiesIter
.next();
String fieldName = ((PropertyDefinitionSimple) simpleProp)
.getName();
if (values.contains(fieldName)) {