merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / occurrence / SequenceGeneralDetailElement.java
1 // $Id$
2 /**
3 * Copyright (C) 2013 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.taxeditor.ui.section.occurrence;
11
12 import eu.etaxonomy.cdm.model.common.DefinedTerm;
13 import eu.etaxonomy.cdm.model.molecular.Sequence;
14 import eu.etaxonomy.cdm.model.reference.Reference;
15 import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
16 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
17 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
18 import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
19 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
20 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
21
22 /**
23 * @author pplitzner
24 * @date 19.12.2013
25 *
26 */
27 public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Sequence> {
28
29 private TermComboElement<DefinedTerm> comboMarker;
30 private TextWithLabelElement textContigFile;
31 private TextWithLabelElement textConsensusSequence;
32 private TextWithLabelElement textConsensusSequenceLength;
33 private TextWithLabelElement textBarcodeSequence;
34 private TextWithLabelElement textReferenceCitation;
35 private EntitySelectionElement<Reference> selectionReference;
36 private TextWithLabelElement textGeneticAccessNo;
37 private TextWithLabelElement textBOLDProcessID;
38 private TextWithLabelElement textBOLDLink;
39
40 /**
41 * @param formFactory
42 * @param formElement
43 */
44 public SequenceGeneralDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
45 super(formFactory, formElement);
46 }
47
48 /*
49 * (non-Javadoc)
50 *
51 * @see
52 * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
53 * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int)
54 */
55 @Override
56 protected void createControls(ICdmFormElement formElement, Sequence entity, int style) {
57 comboMarker = formFactory.createTermComboElement(DefinedTerm.class, formElement, "DNA Marker",
58 entity.getDnaMarker(),
59 style);
60 textContigFile = formFactory.createTextWithLabelElement(formElement, "Contig File", "XXX", style);
61 textConsensusSequence = formFactory.createTextWithLabelElement(formElement, "Consensus Sequence 5'->3'", entity.getConsensusSequence().getString(), style);
62 textConsensusSequenceLength = formFactory.createTextWithLabelElement(formElement, "Consensus Seq. Length", entity.getConsensusSequence().getLength().toString(), style);
63 // textBarcodeSequence = formFactory.createTextWithLabelElement(formElement, "Barcode Sequence 5'->3'", entity.getBarcodeSequencePart().getString(), style);
64
65 selectionReference = formFactory
66 .createSelectionElement(Reference.class,
67 getConversationHolder(), formElement, "Reference",
68 null,
69 EntitySelectionElement.ALL, style);
70 textGeneticAccessNo = formFactory.createTextWithLabelElement(formElement, "Genetic Acc. No.", entity.getGeneticAccessionNumber(), style);
71 textBOLDProcessID = formFactory.createTextWithLabelElement(formElement, "BOLD Process ID", entity.getBoldProcessId(), style);
72 // textBOLDLink = formFactory.createTextWithLabelElement(formElement, "BOLD URI", entity.getBoldUri().toString(), style);
73 }
74
75 /*
76 * (non-Javadoc)
77 *
78 * @see
79 * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
80 * .lang.Object)
81 */
82 @Override
83 public void handleEvent(Object eventSource) {
84 }
85
86 }