merged/implemented cdm3.3 model adaptations
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / occurrence / GeneralDetailElement.java
index 6f4a0c20781cc44758fa9dba03d53de741488e77..bdfaf8d35c7d1cb22cae43bf809eb664fdf9b70c 100644 (file)
@@ -15,7 +15,9 @@ import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.location.NamedArea;
 import eu.etaxonomy.cdm.model.occurrence.Collection;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
 import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
 import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
@@ -35,7 +37,7 @@ public class GeneralDetailElement extends
                AbstractCdmDetailElement<DerivedUnitFacade> {
 
        private ToggleableTextElement toggleableText_titleCache;
-
+       private EnumComboElement<SpecimenOrObservationType> combo_specorobstype;
        private EntitySelectionElement<NamedArea> selection_country;
        private LanguageStringWithLabelElement languageText_locality;
        private PointElement element_point;
@@ -68,7 +70,10 @@ public class GeneralDetailElement extends
                toggleableText_titleCache = formFactory.createToggleableTextField(
                                formElement, "Title Cache", entity.getTitleCache(),
                                entity.isProtectedTitleCache(), style);
-
+               combo_specorobstype = formFactory
+                               .createEnumComboElement(SpecimenOrObservationType.class,
+                                               formElement, style);
+               combo_specorobstype.setSelection(entity.getType());
                selection_country = formFactory.createSelectionElement(NamedArea.class, getConversationHolder(),
                                formElement, "Country",
                                entity.getCountry(), EntitySelectionElement.NOTHING, style);
@@ -77,9 +82,6 @@ public class GeneralDetailElement extends
                                                entity.getLocality(), style);
                element_point = formFactory.createPointElement(formElement,
                                entity.getExactLocation(), style);
-               number_elevation = formFactory.createIntegerTextWithLabelElement(
-                               formElement, "Absolute Elevation (m)",
-                               entity.getAbsoluteElevation(), style);
                element_date = formFactory.createTimePeriodElement(formElement, "Date",
                                entity.getGatheringPeriod(), style);
                selection_collector = formFactory
@@ -132,6 +134,8 @@ public class GeneralDetailElement extends
                        getEntity().setCollection(selection_collection.getSelection());
                } else if (eventSource == text_accessionNumber) {
                        getEntity().setAccessionNumber(text_accessionNumber.getText());
+               } else if (eventSource == combo_specorobstype) {
+                       getEntity().setType(combo_specorobstype.getSelection());
                }
 
                if (eventSource != toggleableText_titleCache) {