Issue 10701

Use IntepretedEnum for applicable fields

10701
Reporter: kbraak
Assignee: kbraak
Type: Improvement
Summary: Use IntepretedEnum for applicable fields
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2012-01-27 11:35:52.373
Updated: 2013-12-16 17:51:00.662
Resolved: 2012-03-09 17:40:57.516
        
Description: The InterpretedEnum preserves the verbatim and the interpreted values, where the interpreted value is an enum.

Please create a sub task for each field to be converted to use it, for example NetworkEntity.language (currently a Locale)]]>
    


Author: kbraak@gbif.org
Created: 2012-01-30 12:55:59.782
Updated: 2012-01-30 12:55:59.782
        
In the EML parser, we use custom data type converter that can be registered and used within the BeanUtils package to manage the conversion of objects from one type to another.

The converter is registered by class, and I haven't found a way of registering different converters for different implementations of InterpretedEnum>

For example, for InterpretedEnum and InterpretedEnum they both share class InterpretedEnum.class so there is no way for the BeanUtils package to differentiate between them.

Therefore, my solution involves one parse per InterpretedEnum converter which means each EML file is getting parsed twice (once for InterpretedEnum with Rank, and once for Language), which isn't ideal. 
    


Author: kbraak@gbif.org
Created: 2012-03-09 17:40:57.557
Updated: 2012-03-09 17:40:57.557
        
All subtasks have been resolved.

At this point, I'm not aware of any other fields in the Registry Models that have fields that need to be converted into an InterpretedEnum. If there are, please reopen the issue.

Closing issue.