Issue 11960

Add ability to perform runtime checking of Dimension type to the public occurrence cube api

11960
Reporter: trobertson
Assignee: trobertson
Type: Improvement
Summary: Add ability to perform runtime checking of Dimension type to the public occurrence cube api
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2012-10-01 12:35:10.396
Updated: 2013-12-06 13:15:59.565
Resolved: 2013-09-27 19:35:52.789
        
Description: The generics that ensure compiletime type-safety in the public API for the occurrence cube dimensions are not visible at runtime (of course as they weren't designed to be).

To simplify translation between the public API and the internal DataCube definition, storing this generic type will be helpful.  This proposal is to keep the dimension type in the Dimension along the lines of standard the recommended workaround pattern. http://stackoverflow.com/questions/3403909/get-generic-type-of-class-at-runtime ]]>
    
Attachment GBIFCOM-61.patch


Author: trobertson@gbif.org
Comment: Attached GBIFCOM-61.patch addresses the proposal
Created: 2012-10-01 12:37:41.327
Updated: 2012-10-01 12:38:00.387


Author: mdoering@gbif.org
Created: 2012-10-01 13:00:45.515
Updated: 2012-10-01 13:00:45.515
        
Ive uploaded the patch into crucible: http://dev.gbif.org/code/cru/CR-POR-53
I don't fully understand the immediate need for having the type accessible at runtime, but Im sure there are or will be cases - for example during parsing a webservice request.
Good to go!