Project

General

Profile

Download (1.33 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.molecular.SingleRead;
12

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

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

    
24
    @Override
25
    protected void initFormatKeys(Object object) {
26
        super.initFormatKeys(object);
27
        SingleRead singleRead = (SingleRead)object;
28
        if(singleRead.getPrimer()!=null){
29
            formatKeyMap.put(FormatKey.SINGLE_READ_PRIMER, singleRead.getPrimer().getLabel());
30
        }
31
        if(singleRead.getPherogram()!=null){
32
            formatKeyMap.put(FormatKey.SINGLE_READ_PHEROGRAM_TITLE_CACHE, singleRead.getPherogram().getTitleCache());
33
        }
34
        if(singleRead.getAmplificationResult()!=null &&
35
                singleRead.getAmplificationResult().getAmplification()!=null){
36
            formatKeyMap.put(FormatKey.AMPLIFICATION_LABEL, singleRead.getAmplificationResult().getAmplification().getLabelCache());
37
        }
38
    }
39

    
40
}
(8-8/9)