Refactor formatter framework
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / format / occurrences / SequenceFormatter.java
1 // $Id$
2 /**
3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
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.
9 */
10 package eu.etaxonomy.cdm.format.occurrences;
11
12 import eu.etaxonomy.cdm.model.molecular.Sequence;
13
14 /**
15 * @author pplitzner
16 * @date Nov 30, 2015
17 *
18 */
19 public class SequenceFormatter extends AbstractCdmFormatter {
20
21 public SequenceFormatter(Object object, FormatKey[] formatKeys) {
22 super(object, formatKeys);
23 }
24
25 @Override
26 protected void initFormatKeys(Object object) {
27 super.initFormatKeys(object);
28 Sequence sequence = (Sequence)object;
29 if(sequence.getDnaMarker()!=null){
30 formatKeyMap.put(FormatKey.SEQUENCE_DNA_MARKER, sequence.getDnaMarker().getLabel());
31 }
32 }
33
34 }