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.molecular;
|
10
|
|
11
|
import eu.etaxonomy.cdm.format.AbstractCdmFormatter;
|
12
|
import eu.etaxonomy.cdm.model.molecular.SingleRead;
|
13
|
|
14
|
/**
|
15
|
* @author pplitzner
|
16
|
* @since Nov 30, 2015
|
17
|
*
|
18
|
*/
|
19
|
public class SingleReadFormatter extends AbstractCdmFormatter {
|
20
|
|
21
|
public SingleReadFormatter(Object object, FormatKey[] formatKeys) {
|
22
|
super(object, formatKeys);
|
23
|
}
|
24
|
|
25
|
@Override
|
26
|
protected void initFormatKeys(Object object) {
|
27
|
super.initFormatKeys(object);
|
28
|
SingleRead singleRead = (SingleRead)object;
|
29
|
if(singleRead.getPrimer()!=null){
|
30
|
formatKeyMap.put(FormatKey.SINGLE_READ_PRIMER, singleRead.getPrimer().getLabel());
|
31
|
}
|
32
|
if(singleRead.getPherogram()!=null){
|
33
|
formatKeyMap.put(FormatKey.SINGLE_READ_PHEROGRAM_TITLE_CACHE, singleRead.getPherogram().getTitleCache());
|
34
|
}
|
35
|
if(singleRead.getAmplificationResult()!=null &&
|
36
|
singleRead.getAmplificationResult().getAmplification()!=null){
|
37
|
formatKeyMap.put(FormatKey.AMPLIFICATION_LABEL, singleRead.getAmplificationResult().getAmplification().getLabelCache());
|
38
|
}
|
39
|
}
|
40
|
|
41
|
}
|