Issue 13639

BasisOfRecordConverter uses wrong id for HumanObservation

13639
Reporter: omeyn
Assignee: trobertson
Type: Bug
Summary: BasisOfRecordConverter uses wrong id for HumanObservation
Description: The BasisOfRecordConverter is not consistent in its from and to methods, and HUMAN_OBSERVATION especially is not mapped correctly.
Priority: Major
Resolution: WontFix
Status: Closed
Created: 2013-08-23 12:35:16.951
Updated: 2015-03-04 16:58:49.277
Resolved: 2015-03-04 16:58:49.248
Attachment BasisOfRecordInterpretation_20131022.txt


Author: mdoering@gbif.org
Created: 2013-08-23 12:44:00.476
Updated: 2013-08-23 12:44:00.476
        
suggest to use a BiMap for the converter and add a test as follows:

{noformat}
  @Test
  public void testCompleteness() throws Exception {
    for (BasisOfRecord bor : BasisOfRecord.values()) {
      Integer i = converter.fromEnum(bor);
      assertNotNull(i);
      assertEquals(bor, converter.toEnum(i));
    }
  }
{noformat}
    


Author: omeyn@gbif.org
Comment: After the Sept 18/2013 UAT release I'll refactor the bor parser to return an enum, and then refactor this class to have 1:1 mapping for all entries in BOR. This will then be the only place an int conversion takes place. Requires fixing the hive UDF as well as the occurrence interpreter (cube backfill is ok).
Created: 2013-09-16 16:11:08.83
Updated: 2013-09-16 16:11:08.83


Author: omeyn@gbif.org
Comment: Delayed until release 1.1 - data freeze until launch.
Created: 2013-09-18 16:42:39.517
Updated: 2013-09-18 16:42:39.517


Author: ahahn@gbif.org
Created: 2013-10-22 12:23:43.641
Updated: 2013-10-22 12:23:43.641
        
From a query result to
SELECT basis_of_record, verbatim_basis_of_record,count(*) FROM occurrence_hdfs GROUP BY basis_of_record, verbatim_basis_of_record;
(run 18.10.2013), I would like to propose the changes in interpretation listed in the attachment
    


Author: trobertson@gbif.org
Comment: This class no longer exists, and the integers presented are no longer stored in the HBase tables so the mapping does not make too much sense to hang on to them.  It is now easy to query and get readable names.
Created: 2015-03-04 16:58:49.275
Updated: 2015-03-04 16:58:49.275