3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.format
.occurrences
;
12 import eu
.etaxonomy
.cdm
.model
.molecular
.SingleRead
;
19 public class SingleReadFormatter
extends AbstractCdmFormatter
{
21 public SingleReadFormatter(Object object
, FormatKey
[] formatKeys
) {
22 super(object
, formatKeys
);
26 protected void initFormatKeys(Object object
, FormatKey
... formatKeys
) {
27 super.initFormatKeys(object
);
28 SingleRead singleRead
= (SingleRead
)object
;
29 if(singleRead
.getPrimer()!=null){
30 formatKeyMap
.put(FormatKey
.SINGLE_READ_PRIMER
, singleRead
.getPrimer().getLabel());
32 if(singleRead
.getAmplificationResult()!=null &&
33 singleRead
.getAmplificationResult().getAmplification()!=null){
34 formatKeyMap
.put(FormatKey
.AMPLIFICATION_LABEL
, singleRead
.getAmplificationResult().getAmplification().getLabelCache());