Project

General

Profile

Download (1.2 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2015 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.format.occurrences;
10

    
11
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
12

    
13
/**
14
 * @author pplitzner
15
 \* @since Nov 30, 2015
16
 *
17
 */
18
public class SpecimenOrObservationBaseFormatter extends IdentifiableEntityFormatter {
19

    
20
    public SpecimenOrObservationBaseFormatter(Object object, FormatKey[] formatKeys) {
21
        super(object, formatKeys);
22
    }
23

    
24
    @Override
25
    protected void initFormatKeys(Object object) {
26
        super.initFormatKeys(object);
27
        SpecimenOrObservationBase<?> specimenOrObservationBase = (SpecimenOrObservationBase<?>)object;
28
        if(specimenOrObservationBase.getRecordBasis()!=null){
29
            formatKeyMap.put(FormatKey.RECORD_BASIS, specimenOrObservationBase.getRecordBasis().toString());
30
        }
31
        if(specimenOrObservationBase.getKindOfUnit()!=null){
32
            formatKeyMap.put(FormatKey.KIND_OF_UNIT, specimenOrObservationBase.getKindOfUnit().toString());
33
        }
34
    }
35

    
36
}
(9-9/9)