Property ret = null;
if (value instanceof ComplexValueSimpleDescriptor) {
ret = new PropertySimple(value.getPropertyName(), ((ComplexValueSimpleDescriptor) value).getValue());
} else if (value instanceof ComplexValueListDescriptor) {
ComplexValueListDescriptor listValue = (ComplexValueListDescriptor) value;
PropertyDefinitionList listDefinition = (PropertyDefinitionList) definition;
PropertyList list = new PropertyList(value.getPropertyName());
for (JAXBElement<?> val : listValue.getComplexValue()) {
Property child = convert(listDefinition.getMemberDefinition(),
(ComplexValueDescriptor) val.getValue());
list.add(child);
}