merged/implemented cdm3.3 model adaptations
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / CdmFormFactory.java
index 533b43b021722b9146b536c7a9cde59a4c2272e0..29f1bb06484c8ae8eed2bd035fd71b209b61b035 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package eu.etaxonomy.taxeditor.ui.element;
 
@@ -50,12 +50,10 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.Credit;
 import eu.etaxonomy.cdm.model.common.DefinedTerm;
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
 import eu.etaxonomy.cdm.model.common.Extension;
 import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
 import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.common.IDefinedTerm;
 import eu.etaxonomy.cdm.model.common.IEnumTerm;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
 import eu.etaxonomy.cdm.model.common.Language;
@@ -68,6 +66,7 @@ import eu.etaxonomy.cdm.model.common.VersionableEntity;
 import eu.etaxonomy.cdm.model.description.CategoricalData;
 import eu.etaxonomy.cdm.model.description.CommonTaxonName;
 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
+import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
 import eu.etaxonomy.cdm.model.description.Distribution;
 import eu.etaxonomy.cdm.model.description.Feature;
 import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
@@ -91,12 +90,24 @@ import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
 import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
-import eu.etaxonomy.cdm.model.occurrence.GatheringEvent;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.ui.campanula.basicFields.NamedAreaFieldController;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.FieldObservationDetailsElement;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.FieldObservationDetailsElementController;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.FieldObservationGeneralElement;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.FieldObservationGeneralElementController;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.FieldObservationSection;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.GatheringEventDetailsElement;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.fieldObservation.GatheringEventDetailsElementController;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.SpecimenGeneralElement;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.SpecimenGeneralElementController;
+import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.SpecimenSection;
 import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection.UnitType;
@@ -260,379 +271,379 @@ import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
  * <p>
  * CdmFormFactory class.
  * </p>
- * 
+ *
  * @author n.hoffmann
  * @created Feb 24, 2010
  * @version 1.0
  */
 public class CdmFormFactory extends FormToolkit {
 
-       private BoldFontHolder2 boldFontHolder2;
-       private MouseListener selectionMouseHandler;
-       private FocusListener selectionFocusHandler;
+    private BoldFontHolder2 boldFontHolder2;
+    private MouseListener selectionMouseHandler;
+    private FocusListener selectionFocusHandler;
 
     private final Set<SelectionListener> selectionListenerList = new HashSet<SelectionListener>();
 
-       private final List<IPropertyChangeListener> propertyChangeListeners = new ArrayList<IPropertyChangeListener>();
+    private final List<IPropertyChangeListener> propertyChangeListeners = new ArrayList<IPropertyChangeListener>();
 
-       private final int orientation = Window.getDefaultOrientation();
-       private ISelectionProvider selectionProvider;
+    private final int orientation = Window.getDefaultOrientation();
+    private ISelectionProvider selectionProvider;
 
-       /** Constant <code>EMPTY_SELECTION</code> */
-       public static ISelection EMPTY_SELECTION = new ISelection() {
-               @Override
-               public boolean isEmpty() {
-                       return true;
-               }
-       };
-       
-       /**
-        * 
-        * @author n.hoffmann
-        * @date Jan 25, 2010
-        *
-        */
-       private class SelectionMouseHandler extends MouseAdapter {
-               @Override
-               public void mouseDown(MouseEvent e) {
-                       notifySelectionListeners(e);
-               }
-       }
+    /** Constant <code>EMPTY_SELECTION</code> */
+    public static ISelection EMPTY_SELECTION = new ISelection() {
+        @Override
+        public boolean isEmpty() {
+            return true;
+        }
+    };
+
+    /**
+     *
+     * @author n.hoffmann
+     * @date Jan 25, 2010
+     *
+     */
+    private class SelectionMouseHandler extends MouseAdapter {
+        @Override
+        public void mouseDown(MouseEvent e) {
+            notifySelectionListeners(e);
+        }
+    }
 
-       /**
-        * 
-        * @author n.hoffmann
-        * @date Jan 25, 2010
-        *
-        */
-       private class SelectionFocusHandler extends FocusAdapter {
-               @Override
-               public void focusGained(FocusEvent e) {
-                       notifySelectionListeners(e);
-               }
-       }
+    /**
+     *
+     * @author n.hoffmann
+     * @date Jan 25, 2010
+     *
+     */
+    private class SelectionFocusHandler extends FocusAdapter {
+        @Override
+        public void focusGained(FocusEvent e) {
+            notifySelectionListeners(e);
+        }
+    }
 
-       private void notifySelectionListeners(TypedEvent e) {
-               Event event = new Event();
-               event.widget = e.widget;
-               SelectionEvent selectionEvent = new SelectionEvent(event);
+    private void notifySelectionListeners(TypedEvent e) {
+        Event event = new Event();
+        event.widget = e.widget;
+        SelectionEvent selectionEvent = new SelectionEvent(event);
 
         for (SelectionListener listener : selectionListenerList) {
             listener.widgetSelected(selectionEvent);
-               }
-       }
-
-       /**
-        * <p>
-        * Constructor for CdmFormFactory.
-        * </p>
-        * 
-        * @param display
-        *            a {@link org.eclipse.swt.widgets.Display} object.
-        * @param selectionProvider
-        *            a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
-        */
-       public CdmFormFactory(Display display, ISelectionProvider selectionProvider) {
-               super(display);
-               this.selectionProvider = selectionProvider;
-               init();
-       }
-
-       /**
-        * <p>
-        * Constructor for CdmFormFactory.
-        * </p>
-        * 
-        * @param display
-        *            a {@link org.eclipse.swt.widgets.Display} object.
-        */
-       public CdmFormFactory(Display display) {
-               super(display);
-               init();
-       }
-
-       /**
-        * 
-        */
-       private void init() {
-               boldFontHolder2 = new BoldFontHolder2();
-               selectionMouseHandler = new SelectionMouseHandler();
-               selectionFocusHandler = new SelectionFocusHandler();
-       }
+        }
+    }
 
-       /**
-        * Creates an instance initialized with the correct selectionProvider
-        * 
-        * Make sure to remove the instance when the entityComposite disposes via
-        * destroySelectionArbitrator(..)
-        * 
-        * @param entityElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
-        *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
-        *         object.
+    /**
+     * <p>
+     * Constructor for CdmFormFactory.
+     * </p>
+     *
+     * @param display
+     *            a {@link org.eclipse.swt.widgets.Display} object.
+     * @param selectionProvider
+     *            a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
+     */
+    public CdmFormFactory(Display display, ISelectionProvider selectionProvider) {
+        super(display);
+        this.selectionProvider = selectionProvider;
+        init();
+    }
+
+    /**
+     * <p>
+     * Constructor for CdmFormFactory.
+     * </p>
+     *
+     * @param display
+     *            a {@link org.eclipse.swt.widgets.Display} object.
+     */
+    public CdmFormFactory(Display display) {
+        super(display);
+        init();
+    }
+
+    /**
+        *
         */
+    private void init() {
+        boldFontHolder2 = new BoldFontHolder2();
+        selectionMouseHandler = new SelectionMouseHandler();
+        selectionFocusHandler = new SelectionFocusHandler();
+    }
+
+    /**
+     * Creates an instance initialized with the correct selectionProvider
+     *
+     * Make sure to remove the instance when the entityComposite disposes via
+     * destroySelectionArbitrator(..)
+     *
+     * @param entityElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.IEntityElement}
+     *            object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
+     *         object.
+     */
     public SelectionArbitrator createSelectionArbitrator(IEntityElement entityElement) {
         SelectionArbitrator selectionArbitrator = new SelectionArbitrator(entityElement);
-               selectionArbitrator.addSelectionProvider(selectionProvider);
-               selectionProvider.addSelectionChangedListener(selectionArbitrator);
-               addSelectionListener(selectionArbitrator);
-               return selectionArbitrator;
-       }
-
-       /**
-        * <p>
-        * destroySelectionArbitrator
-        * </p>
-        * 
-        * @param selectionArbitrator
+        selectionArbitrator.addSelectionProvider(selectionProvider);
+        selectionProvider.addSelectionChangedListener(selectionArbitrator);
+        addSelectionListener(selectionArbitrator);
+        return selectionArbitrator;
+    }
+
+    /**
+     * <p>
+     * destroySelectionArbitrator
+     * </p>
+     *
+     * @param selectionArbitrator
      *            a
      *            {@link eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator}
-        *            object.
-        */
+     *            object.
+     */
     public void destroySelectionArbitrator(SelectionArbitrator selectionArbitrator) {
-               removeSelectionListener(selectionArbitrator);
-               if (selectionProvider != null) {
+        removeSelectionListener(selectionArbitrator);
+        if (selectionProvider != null) {
             selectionProvider.removeSelectionChangedListener(selectionArbitrator);
-               } else {
+        } else {
             AbstractUtility.error(this.getClass(),
                     "Tried to destroy a selection listener from this factories listeners but was null", null);
-               }
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void adapt(Composite composite) {
-               composite.addMouseListener(selectionMouseHandler);
-               super.adapt(composite);
-       }
+        }
+    }
 
-       /**
-        * <p>
+    /**
+     * <p>
      * Adapts the {@link AbstractCdmFormElement}:<br>
      * - sets the {@link IPropertyChangeListener}s handled by this class
-        * </p>
-        * 
-        * @param formElement
-        *            a
-        *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
-        *            object.
-        */
-       public void adapt(AbstractCdmFormElement formElement) {
-               formElement.setPropertyChangeListeners(propertyChangeListeners);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void adapt(Control control, boolean trackFocus, boolean trackKeyboard) {
-               if (trackFocus) {
-                       control.addFocusListener(selectionFocusHandler);
-               }
-               super.adapt(control, trackFocus, trackKeyboard);
-       }
-
-       /**
-        * <p>
-        * destroyElement
-        * </p>
-        * 
-        * @param formElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        */
-       public void destroyElement(ICdmFormElement formElement) {
-               // return if element was not initialized
-               if (formElement == null) {
-                       return;
-               }
-               // destroy selection arbitrator, if any
-               if (formElement instanceof ISelectableElement) {
+     * </p>
+     *
+     * @param formElement
+     *            a
+     *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
+     *            object.
+     */
+    public void adapt(AbstractCdmFormElement formElement) {
+        formElement.setPropertyChangeListeners(propertyChangeListeners);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void adapt(Control control, boolean trackFocus, boolean trackKeyboard) {
+        if (trackFocus) {
+            control.addFocusListener(selectionFocusHandler);
+        }
+        super.adapt(control, trackFocus, trackKeyboard);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void adapt(Composite composite) {
+        composite.addMouseListener(selectionMouseHandler);
+        super.adapt(composite);
+    }
+
+    /**
+     * <p>
+     * destroyElement
+     * </p>
+     *
+     * @param formElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     */
+    public void destroyElement(ICdmFormElement formElement) {
+        // return if element was not initialized
+        if (formElement == null) {
+            return;
+        }
+        // destroy selection arbitrator, if any
+        if (formElement instanceof ISelectableElement) {
             destroySelectionArbitrator(((ISelectableElement) formElement).getSelectionArbitrator());
-               }
-               // remove this element form its parents list of elements
-               // ICdmFormElement parentElement = formElement.getParentElement();
-               // if(parentElement != null){
-               // parentElement.removeElement(formElement);
-               // }
-               // call destroy on child elements recursively
-               for (ICdmFormElement childElement : formElement.getElements()) {
-                       destroyElement(childElement);
-               }
-               // dispose of the controls
-               for (Control control : formElement.getControls()) {
-                       // we added the layoutComposite of the parental element as the
-                       // layout composite to this formElement
-                       // but we do not want to destroy it.
-                       if (control.equals(formElement.getLayoutComposite())) {
-                               continue;
-                       } else {
-                               control.dispose();
-                               control = null;
-                       }
-               }
-       }
-
-       /**
-        * <p>
-        * createEmptyCell
-        * </p>
-        * 
-        * @param parent
-        *            a {@link org.eclipse.swt.widgets.Composite} object.
-        * @return a {@link org.eclipse.swt.widgets.Label} object.
-        */
-       public Label createEmptyCell(Composite parent) {
-               return this.createLabel(parent, null);
-       }
+        }
+        // remove this element form its parents list of elements
+        // ICdmFormElement parentElement = formElement.getParentElement();
+        // if(parentElement != null){
+        // parentElement.removeElement(formElement);
+        // }
+        // call destroy on child elements recursively
+        for (ICdmFormElement childElement : formElement.getElements()) {
+            destroyElement(childElement);
+        }
+        // dispose of the controls
+        for (Control control : formElement.getControls()) {
+            // we added the layoutComposite of the parental element as the
+            // layout composite to this formElement
+            // but we do not want to destroy it.
+            if (control.equals(formElement.getLayoutComposite())) {
+                continue;
+            } else {
+                control.dispose();
+                control = null;
+            }
+        }
+    }
 
-       /**
-        * <p>
-        * createMultilineTextWithLabel
-        * </p>
-        * 
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param textHeight
-        *            a int.
-        * @param style
-        *            a int.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createEmptyCell
+     * </p>
+     *
+     * @param parent
+     *            a {@link org.eclipse.swt.widgets.Composite} object.
+     * @return a {@link org.eclipse.swt.widgets.Label} object.
+     */
+    public Label createEmptyCell(Composite parent) {
+        return this.createLabel(parent, null);
+    }
+
+    /**
+     * <p>
+     * createMultilineTextWithLabel
+     * </p>
+     *
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param textHeight
+     *            a int.
+     * @param style
+     *            a int.
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
+     *         object.
+     */
     public TextWithLabelElement createMultilineTextWithLabel(ICdmFormElement parentElement, String labelString,
             int textHeight, int style) {
         TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, "", textHeight, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createMultiLanguageTextElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param multilanguageText
-        *            a {@link java.util.Map} object.
-        * @param textHeight
-        *            a int.
-        * @param style
-        *            a int.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createMultiLanguageTextElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param multilanguageText
+     *            a {@link java.util.Map} object.
+     * @param textHeight
+     *            a int.
+     * @param style
+     *            a int.
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement}
+     *         object.
+     */
     public MultilanguageTextElement createMultiLanguageTextElement(ICdmFormElement parentElement, String labelString,
             Map<Language, LanguageString> multilanguageText, int textHeight, int style) {
         MultilanguageTextElement element = new MultilanguageTextElement(this, parentElement, labelString,
                 multilanguageText, textHeight, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
     public KeyStatementElement createKeyStatementElement(ICdmFormElement parentElement, String labelString,
-                       KeyStatement keyStatement, int textHeight, int style) {
+            KeyStatement keyStatement, int textHeight, int style) {
         KeyStatementElement element = new KeyStatementElement(this, parentElement, labelString, keyStatement,
                 textHeight, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createTextWithLabelElement
-        * </p>
-        * 
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param initialText
-        *            a {@link java.lang.String} object.
-        * @param style
-        *            a int.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createTextWithLabelElement
+     * </p>
+     *
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param initialText
+     *            a {@link java.lang.String} object.
+     * @param style
+     *            a int.
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
+     *         object.
+     */
     public TextWithLabelElement createTextWithLabelElement(ICdmFormElement parentElement, String labelString,
-                       String initialText, int style) {
+            String initialText, int style) {
         TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, initialText, null,
                 style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
     public UriWithLabelElement createUriWithLabelElement(ICdmFormElement parentElement, String labelString,
             URI initialUri, int style) {
         UriWithLabelElement element = new UriWithLabelElement(this, parentElement, labelString, initialUri, null, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * @param element
-        * @param string
-        * @param uri
-        * @param style
-        * @return
-        */
+    /**
+     * @param element
+     * @param string
+     * @param uri
+     * @param style
+     * @return
+     */
     public OpenUrlSelectorElement createOpenUrlSelectorElement(ICdmFormElement parentElement, String labelString,
-                       IOpenUrlEnabled openUrlEnabled, int style) {
+            IOpenUrlEnabled openUrlEnabled, int style) {
         OpenUrlSelectorElement element = new OpenUrlSelectorElement(this, parentElement, labelString, openUrlEnabled,
                 style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * 
-        * @param parentElement
-        * @param labelString
-        * @param conversationEnabled
-        * @param user
-        * @param style
-        * @return
-        */
+    /**
+     *
+     * @param parentElement
+     * @param labelString
+     * @param conversationEnabled
+     * @param user
+     * @param style
+     * @return
+     */
     public EditPasswordElement createEditPasswordElement(ICdmFormElement parentElement, String labelString,
-                       ConversationHolder conversation, User user, int style) {
+            ConversationHolder conversation, User user, int style) {
         EditPasswordElement element = new EditPasswordElement(this, parentElement, labelString, user, conversation);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createIntegerTextWithLabelElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param initialInteger
-        *            a {@link java.lang.Integer} object.
-        * @param style
-        *            a int.
+    /**
+     * <p>
+     * createIntegerTextWithLabelElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param initialInteger
+     *            a {@link java.lang.Integer} object.
+     * @param style
+     *            a int.
      * @return a
      *         {@link eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement}
-        *         object.
-        */
+     *         object.
+     */
        public NumberWithLabelElement createNumberTextWithLabelElement(
                        ICdmFormElement parentElement, String labelString,
                        Number initialNumber, int style) {
@@ -643,147 +654,146 @@ public class CdmFormFactory extends FormToolkit {
                return element;
        }
 
-
-       /**
-        * <p>
-        * createLanguageStringWithLabelElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param languageString
-        *            a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
-        * @param style
-        *            a int.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createLanguageStringWithLabelElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param languageString
+     *            a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
+     * @param style
+     *            a int.
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
+     *         object.
+     */
     public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
             String labelString, LanguageString languageString, int style) {
         LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(this, parentElement, labelString,
                 languageString, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createLanguageStringWithLabelElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param languageString
-        *            a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
-        * @param height
-        *            a int.
-        * @param style
-        *            a int.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createLanguageStringWithLabelElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param languageString
+     *            a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
+     * @param height
+     *            a int.
+     * @param style
+     *            a int.
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
+     *         object.
+     */
     public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
             String labelString, LanguageString languageString, int height, int style) {
         LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(this, parentElement, labelString,
                 languageString, height, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createTextElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param initialText
-        *            a {@link java.lang.String} object.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createTextElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param initialText
+     *            a {@link java.lang.String} object.
+     * @param style
+     *            a int.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
+     *         object.
+     */
     public TextWithLabelElement createTextElement(ICdmFormElement parentElement, String initialText, int style) {
         TextWithLabelElement element = new TextWithLabelElement(this, parentElement, null, initialText, null, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createKeyValueViewerElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param keyHeading
-        *            a {@link java.lang.String} object.
-        * @param valueHeading
-        *            a {@link java.lang.String} object.
-        * @param map
-        *            a {@link java.util.Map} object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createKeyValueViewerElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param keyHeading
+     *            a {@link java.lang.String} object.
+     * @param valueHeading
+     *            a {@link java.lang.String} object.
+     * @param map
+     *            a {@link java.util.Map} object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.KeyValueViewerElement}
+     *         object.
+     */
     public KeyValueViewerElement createKeyValueViewerElement(ICdmFormElement parentElement, String keyHeading,
-                       String valueHeading, Map<Object, Object> map) {
+            String valueHeading, Map<Object, Object> map) {
         KeyValueViewerElement element = new KeyValueViewerElement(this, parentElement, keyHeading, valueHeading, map);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
+    /**
+     * <p>
+     * createTermComboElement
+     * </p>
+     *
+     * @param termComboType
+     *            a
+     *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
+     *            object.
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param selection
+     *            a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
+     *            object.
+     * @param style
+     *            a int.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
+     *         object.
+     */
 
-       /**
-        * <p>
-        * createTermComboElement
-        * </p>
-        * 
-        * @param termComboType
-        *            a
-        *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param selection
-        *            a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
-        *         object.
-        */
-       
     public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(Class<T> termComboType,
             ICdmFormElement parentElement, String labelString, T selection, int style) {
         TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString,
                 selection, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
-       
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
        /**
         * <p>
         * createTermComboElement
         * </p>
-        * 
+        *
         * @param termComboType
         *            a
         *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
@@ -801,12 +811,12 @@ public class CdmFormFactory extends FormToolkit {
         * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
         *         object.
         */
-       
+
        public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
-                       TermType termType, 
+                       TermType termType,
                        ICdmFormElement parentElement,
-                       String labelString, 
-                       T selection, 
+                       String labelString,
+                       T selection,
                        int style) {
                TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, style);
                adapt(element);
@@ -814,251 +824,251 @@ public class CdmFormFactory extends FormToolkit {
                return element;
        }
 
-       /**
-        * <p>
-        * createEnumComboElement
-        * </p>
-        * 
-        * @param enumComboType
-        *            a
-        *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
-        *            object.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createEnumComboElement
+     * </p>
+     *
+     * @param enumComboType
+     *            a
+     *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EnumComboType}
+     *            object.
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param style
+     *            a int.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.term.AbstractEnumComboElement}
+     *         object.
+     */
        public <T extends IEnumTerm> EnumComboElement<T> createEnumComboElement(
                        Class<T> enumComboType, ICdmFormElement parentElement,
                        int style) {
-               EnumComboElement<T> element = new EnumComboElement<T>(this, parentElement, enumComboType, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        EnumComboElement<T> element = new EnumComboElement<T>(this, parentElement, enumComboType, style);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createBrowserElement
-        * </p>
-        * 
-        * @param imageUri
-        *            a {@link java.net.URI} object.
-        * @param style
-        *            a int.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
+    /**
+     * <p>
+     * createBrowserElement
+     * </p>
+     *
+     * @param imageUri
+     *            a {@link java.net.URI} object.
+     * @param style
+     *            a int.
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
      * @return a {@link eu.etaxonomy.taxeditor.ui.element.BrowserElement}
      *         object.
-        */
+     */
     public BrowserElement createBrowserElement(ICdmFormElement parentElement, URI imageUri, int style) {
         BrowserElement element = new BrowserElement(this, parentElement, imageUri, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createImageElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param imageUri
-        *            a {@link java.net.URI} object.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
-        */
+    /**
+     * <p>
+     * createImageElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param imageUri
+     *            a {@link java.net.URI} object.
+     * @param style
+     *            a int.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
+     */
     public ImageElement createImageElement(ICdmFormElement parentElement, URI imageUri, int style) {
         ImageElement element = new ImageElement(this, parentElement, imageUri, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createTextActionElement
-        * </p>
-        * 
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param initialText
-        *            a {@link java.lang.String} object.
-        * @param style
-        *            a int.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param buttonLabel
-        *            a {@link java.lang.String} object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createTextActionElement
+     * </p>
+     *
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param initialText
+     *            a {@link java.lang.String} object.
+     * @param style
+     *            a int.
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param buttonLabel
+     *            a {@link java.lang.String} object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextActionElement}
+     *         object.
+     */
     public TextActionElement createTextActionElement(ICdmFormElement parentElement, String labelString,
-                       String buttonLabel, String initialText, int style) {
+            String buttonLabel, String initialText, int style) {
         TextActionElement element = new TextActionElement(this, parentElement, labelString, buttonLabel, initialText,
                 style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createCheckbox
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param label
-        *            a {@link java.lang.String} object.
-        * @param initialState
-        *            a boolean.
-        * @param style
-        *            a int.
+    /**
+     * <p>
+     * createCheckbox
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param label
+     *            a {@link java.lang.String} object.
+     * @param initialState
+     *            a boolean.
+     * @param style
+     *            a int.
      * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
      *         object.
-        */
+     */
     public CheckboxElement createCheckbox(ICdmFormElement parentElement, String label, boolean initialState, int style) {
         CheckboxElement element = new CheckboxElement(this, parentElement, label, initialState, style | orientation);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * Creates a section as a part of the form.
-        * 
-        * @return the section widget
-        * @param section
+    /**
+     * Creates a section as a part of the form.
+     *
+     * @return the section widget
+     * @param section
      *            a
      *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
-        *            object.
-        */
-       public Section adapt(AbstractFormSection section) {
-               section.setMenu(section.getLayoutComposite().getMenu());
-               adapt(section, true, true);
+     *            object.
+     */
+    public Section adapt(AbstractFormSection section) {
+        section.setMenu(section.getLayoutComposite().getMenu());
+        adapt(section, true, true);
 
-               // handle focus and property change events for cdm use
-               section.addFocusListener(selectionFocusHandler);
-               section.setPropertyChangeListeners(propertyChangeListeners);
+        // handle focus and property change events for cdm use
+        section.addFocusListener(selectionFocusHandler);
+        section.setPropertyChangeListeners(propertyChangeListeners);
 
-               if (section.getToggle() != null) {
+        if (section.getToggle() != null) {
             section.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE_HOVER));
             section.getToggle().setDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE));
-               }
+        }
 
         section.setFont(boldFontHolder2.getBoldFont(section.getLayoutComposite().getFont()));
 
         if ((section.getStyle() & ExpandableComposite.TITLE_BAR) != 0
                 || (section.getStyle() & ExpandableComposite.SHORT_TITLE_BAR) != 0) {
-                       getColors().initializeSectionToolBarColors();
+            getColors().initializeSectionToolBarColors();
             section.setTitleBarBackground(getColors().getColor(IFormColors.TB_BG));
             section.setTitleBarBorderColor(getColors().getColor(IFormColors.TB_BORDER));
-               }
-               // call setTitleBarForeground regardless as it also sets the label color
+        }
+        // call setTitleBarForeground regardless as it also sets the label color
         section.setTitleBarForeground(getColors().getColor(IFormColors.TB_TOGGLE));
-               return section;
-       }
+        return section;
+    }
 
-       private class BoldFontHolder2 {
-               private Font normalFont;
+    private class BoldFontHolder2 {
+        private Font normalFont;
 
-               private Font boldFont;
+        private Font boldFont;
 
-               public BoldFontHolder2() {
-               }
+        public BoldFontHolder2() {
+        }
 
-               public Font getBoldFont(Font font) {
-                       createBoldFont(font);
-                       return boldFont;
-               }
+        public Font getBoldFont(Font font) {
+            createBoldFont(font);
+            return boldFont;
+        }
 
-               private void createBoldFont(Font font) {
-                       if (normalFont == null || !normalFont.equals(font)) {
-                               normalFont = font;
-                               dispose();
-                       }
-                       if (boldFont == null) {
+        private void createBoldFont(Font font) {
+            if (normalFont == null || !normalFont.equals(font)) {
+                normalFont = font;
+                dispose();
+            }
+            if (boldFont == null) {
                 boldFont = FormFonts.getInstance().getBoldFont(getColors().getDisplay(), normalFont);
-                       }
-               }
+            }
+        }
 
-               public void dispose() {
-                       if (boldFont != null) {
+        public void dispose() {
+            if (boldFont != null) {
                 FormFonts.getInstance().markFinished(boldFont, getColors().getDisplay());
-                               boldFont = null;
-                       }
-               }
-       }
+                boldFont = null;
+            }
+        }
+    }
 
-       /**
-        * <p>
-        * createToggleableTextField
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param initialText
-        *            a {@link java.lang.String} object.
-        * @param initialState
-        *            a boolean.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createToggleableTextField
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param initialText
+     *            a {@link java.lang.String} object.
+     * @param initialState
+     *            a boolean.
+     * @param style
+     *            a int.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
+     *         object.
+     */
     public ToggleableTextElement createToggleableTextField(ICdmFormElement parentElement, String labelString,
-                       String initialText, boolean initialState, int style) {
+            String initialText, boolean initialState, int style) {
         ToggleableTextElement element = new ToggleableTextElement(this, parentElement, labelString, initialText,
                 initialState, style | orientation);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createTimePeriodElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param timePeriod
-        *            a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
-        *         object.
-        */
+    /**
+     * <p>
+     * createTimePeriodElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param timePeriod
+     *            a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
+     * @param style
+     *            a int.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
+     *         object.
+     */
     public TimePeriodElement createTimePeriodElement(ICdmFormElement parentElement, String labelString,
-                       TimePeriod timePeriod, int style) {
+            TimePeriod timePeriod, int style) {
         TimePeriodElement element = new TimePeriodElement(this, parentElement, labelString, timePeriod, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
-       
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
        /**
         * <p>
         * createGatheringEventUnitElement
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
@@ -1072,15 +1082,15 @@ public class CdmFormFactory extends FormToolkit {
         *         object.
         */
        public GatheringEventUnitElement createGatheringEventUnitElement(
-                       ICdmFormElement parentElement, 
+                       ICdmFormElement parentElement,
                        String labelString,
-                       DerivedUnitFacade gatheringEvent, 
-                       MinMaxTextSection.UnitType unitType,                    
+                       DerivedUnitFacade gatheringEvent,
+                       MinMaxTextSection.UnitType unitType,
                        int style) {
-               GatheringEventUnitElement element = new GatheringEventUnitElement(this, 
+               GatheringEventUnitElement element = new GatheringEventUnitElement(this,
                                parentElement,
-                               labelString, 
-                               gatheringEvent, 
+                               labelString,
+                               gatheringEvent,
                                unitType,
                                style);
                adapt(element);
@@ -1088,331 +1098,337 @@ public class CdmFormFactory extends FormToolkit {
                return element;
        }
 
-       /**
-        * <p>
-        * createPointElement
-        * </p>
-        * 
-        * @param style
-        *            a int.
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param point
-        *            a {@link eu.etaxonomy.cdm.model.location.Point} object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
-        */
+    /**
+     * <p>
+     * createPointElement
+     * </p>
+     *
+     * @param style
+     *            a int.
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param point
+     *            a {@link eu.etaxonomy.cdm.model.location.Point} object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
+     */
     public PointElement createPointElement(ICdmFormElement parentElement, Point point, int style) {
         PointElement element = new PointElement(this, parentElement, point, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createDateDetailSection
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
-        *         object.
-        */
+    /**
+     * <p>
+     * createDateDetailSection
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param style
+     *            a int.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.DateDetailSection}
+     *         object.
+     */
     public DateDetailSection createDateDetailSection(ICdmFormElement parentElement, int style) {
         DateDetailSection section = new DateDetailSection(this, parentElement, style);
-               parentElement.addElement(section);
-               adapt(section);
-               return section;
-       }
-       
-       /**
-        * <p>
-        * createDateDetailSection
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
-        *         object.
-        */
-       public MinMaxTextSection createMinMaxTextSection(ICdmFormElement parentElement, UnitType unitType, int style) {
-               MinMaxTextSection section = new MinMaxTextSection(this, parentElement, unitType, style);
-               parentElement.addElement(section);
-               adapt(section);
-               return section;
-       }
-
-       /**
-        * <p>
-        * createPartialElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param labelString
-        *            a {@link java.lang.String} object.
-        * @param partial
-        *            a {@link org.joda.time.Partial} object.
-        * @param style
-        *            a int.
-     * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
-     *         object.
-        */
-    public PartialElement createPartialElement(ICdmFormElement parentElement, String labelString, Partial partial,
-            int style) {
-        PartialElement element = new PartialElement(this, parentElement, labelString, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
-
-       /**
-        * <p>
-        * addSelectionListener
-        * </p>
-        * 
-        * @param listener
-        *            a {@link org.eclipse.swt.events.SelectionListener} object.
-        */
-       public void addSelectionListener(SelectionListener listener) {
-               selectionListenerList.add(listener);
-       }
-
-       /**
-        * <p>
-        * removeSelectionListener
-        * </p>
-        * 
-        * @param listener
-        *            a {@link org.eclipse.swt.events.SelectionListener} object.
-        */
-       public void removeSelectionListener(SelectionListener listener) {
-               if (listener == null) {
-            AbstractUtility.error(this.getClass(),
-                    "Tried to remove a selection listener from this factories listeners but was null", null);
-               } else {
-                       selectionListenerList.remove(listener);
-               }
-       }
-
-       /**
-        * <p>
-        * addPropertyChangeListener
-        * </p>
-        * 
-        * @param listener
-        *            a {@link org.eclipse.jface.util.IPropertyChangeListener}
-        *            object.
-        */
-       public void addPropertyChangeListener(IPropertyChangeListener listener) {
-               if(propertyChangeListeners.contains(listener)){
-                       return;
-               }
-               propertyChangeListeners.add(0, listener);
-       }
-
-       /**
-        * <p>
-        * removePropertyChangeListener
-        * </p>
-        * 
-        * @param listener
-        *            a {@link org.eclipse.jface.util.IPropertyChangeListener}
-        *            object.
-        */
-       public void removePropertyChangeListener(IPropertyChangeListener listener) {
-               propertyChangeListeners.remove(listener);
-       }
-
-       /**
-        * <p>
-        * createHorizontalSeparator
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a {@link org.eclipse.swt.widgets.Label} object.
-        */
-    public Label createHorizontalSeparator(ICdmFormElement parentElement, int style) {
-        Label separator = this.createSeparator(parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
-               separator.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
-               return separator;
-       }
-
-       /**
-        * <p>
-        * createVersionElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param entity
-        *            a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
-        *         object.
-        */
-    public VersionElement createVersionElement(ICdmFormElement parentElement, VersionableEntity entity, int style) {
-        VersionElement element = new VersionElement(this, parentElement, entity, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
-       
-       /**
-        * @param cdmBaseSection
-        * @param object
-        * @param style
-        * @return
-        */
-    public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement, CdmBase entity, int style) {
-        CdmBaseElement element = new CdmBaseElement(this, parentElement, entity, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
-
-
-       /**
-        * <p>
-        * createVersionSection
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
-        *         object.
-        */
-    public VersionSection createVersionSection(ICdmFormElement parentElement, int style) {
-               VersionSection section = new VersionSection(this, parentElement, style);
-               parentElement.addElement(section);
-               adapt(section);
-               return section;
-       }
-       
-       /**
-        * @param parent
-        * @param i
-        * @return
-        */
-       public CdmBaseSection createCdmBaseSection(ICdmFormElement parentElement, int style) {
-               CdmBaseSection section = new CdmBaseSection(this, parentElement, style);
-               parentElement.addElement(section);
-               adapt(section);
-               return section;
-       }
-
-       /**
-        * <p>
-        * createEmptyElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
-        */
-       public EmptyElement createEmptyElement(ICdmFormElement parentElement) {
-        EmptyElement element = new EmptyElement(this, parentElement, null, SWT.NULL);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
-
-       /**
-        * <p>
-        * createHeadlineSection
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
-        *         object.
-        */
-       public HeadlineSection createHeadlineSection(ICdmFormElement parentElement) {
-        HeadlineSection section = new HeadlineSection(this, parentElement, SWT.NULL);
-               parentElement.addElement(section);
-               adapt(section);
-               return section;
-       }
+        parentElement.addElement(section);
+        adapt(section);
+        return section;
+    }
 
        /**
         * <p>
-        * createParsingMessageElement
+        * createDateDetailSection
         * </p>
-        * 
+        *
         * @param parentElement
         *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
         *            object.
-        * @param parserProblem
-        *            a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
-        *            object.
         * @param style
         *            a int.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
+        * @return a {@link eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection}
         *         object.
         */
+       public MinMaxTextSection createMinMaxTextSection(ICdmFormElement parentElement, UnitType unitType, int style) {
+               MinMaxTextSection section = new MinMaxTextSection(this, parentElement, unitType, style);
+               parentElement.addElement(section);
+               adapt(section);
+               return section;
+       }
+
+    /**
+     * <p>
+     * createPartialElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param labelString
+     *            a {@link java.lang.String} object.
+     * @param partial
+     *            a {@link org.joda.time.Partial} object.
+     * @param style
+     *            a int.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
+     *         object.
+     */
+    public PartialElement createPartialElement(ICdmFormElement parentElement, String labelString, Partial partial,
+            int style) {
+        PartialElement element = new PartialElement(this, parentElement, labelString, style);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
+    /**
+     * <p>
+     * addSelectionListener
+     * </p>
+     *
+     * @param listener
+     *            a {@link org.eclipse.swt.events.SelectionListener} object.
+     */
+    public void addSelectionListener(SelectionListener listener) {
+        selectionListenerList.add(listener);
+    }
+
+    /**
+     * <p>
+     * removeSelectionListener
+     * </p>
+     *
+     * @param listener
+     *            a {@link org.eclipse.swt.events.SelectionListener} object.
+     */
+    public void removeSelectionListener(SelectionListener listener) {
+        if (listener == null) {
+            AbstractUtility.error(this.getClass(),
+                    "Tried to remove a selection listener from this factories listeners but was null", null);
+        } else {
+            selectionListenerList.remove(listener);
+        }
+    }
+
+    /**
+     * <p>
+     * addPropertyChangeListener
+     * </p>
+     *
+     * @param listener
+     *            a {@link org.eclipse.jface.util.IPropertyChangeListener}
+     *            object.
+     */
+    public void addPropertyChangeListener(IPropertyChangeListener listener) {
+        if (propertyChangeListeners.contains(listener)) {
+            return;
+        }
+        propertyChangeListeners.add(0, listener);
+    }
+
+    /**
+     * <p>
+     * removePropertyChangeListener
+     * </p>
+     *
+     * @param listener
+     *            a {@link org.eclipse.jface.util.IPropertyChangeListener}
+     *            object.
+     */
+    public void removePropertyChangeListener(IPropertyChangeListener listener) {
+        propertyChangeListeners.remove(listener);
+    }
+
+    /**
+     * @return the propertyChangeListeners
+     */
+    public List<IPropertyChangeListener> getPropertyChangeListeners() {
+        return propertyChangeListeners;
+    }
+
+    /**
+     * <p>
+     * createHorizontalSeparator
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param style
+     *            a int.
+     * @return a {@link org.eclipse.swt.widgets.Label} object.
+     */
+    public Label createHorizontalSeparator(ICdmFormElement parentElement, int style) {
+        Label separator = this.createSeparator(parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
+        separator.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
+        return separator;
+    }
+
+    /**
+     * <p>
+     * createVersionElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param entity
+     *            a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
+     *            object.
+     * @param style
+     *            a int.
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
+     *         object.
+     */
+    public VersionElement createVersionElement(ICdmFormElement parentElement, VersionableEntity entity, int style) {
+        VersionElement element = new VersionElement(this, parentElement, entity, style);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
+    /**
+     * @param cdmBaseSection
+     * @param object
+     * @param style
+     * @return
+     */
+    public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement, CdmBase entity, int style) {
+        CdmBaseElement element = new CdmBaseElement(this, parentElement, entity, style);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
+    /**
+     * <p>
+     * createVersionSection
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param style
+     *            a int.
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
+     *         object.
+     */
+    public VersionSection createVersionSection(ICdmFormElement parentElement, int style) {
+        VersionSection section = new VersionSection(this, parentElement, style);
+        parentElement.addElement(section);
+        adapt(section);
+        return section;
+    }
+
+    /**
+     * @param parent
+     * @param i
+     * @return
+     */
+    public CdmBaseSection createCdmBaseSection(ICdmFormElement parentElement, int style) {
+        CdmBaseSection section = new CdmBaseSection(this, parentElement, style);
+        parentElement.addElement(section);
+        adapt(section);
+        return section;
+    }
+
+    /**
+     * <p>
+     * createEmptyElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
+     */
+    public EmptyElement createEmptyElement(ICdmFormElement parentElement) {
+        EmptyElement element = new EmptyElement(this, parentElement, null, SWT.NULL);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
+    /**
+     * <p>
+     * createHeadlineSection
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
+     *         object.
+     */
+    public HeadlineSection createHeadlineSection(ICdmFormElement parentElement) {
+        HeadlineSection section = new HeadlineSection(this, parentElement, SWT.NULL);
+        parentElement.addElement(section);
+        adapt(section);
+        return section;
+    }
+
+    /**
+     * <p>
+     * createParsingMessageElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param parserProblem
+     *            a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
+     *            object.
+     * @param style
+     *            a int.
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
+     *         object.
+     */
     public ParsingMessageElement createParsingMessageElement(ICdmFormElement parentElement,
             ParserProblem parserProblem, int style) {
         ParsingMessageElement element = new ParsingMessageElement(this, parentElement, parserProblem, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
     public AbstractFormSection createDefinedTermDetailSection(Class definedTermClass, ConversationHolder conversation,
             ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
 
         AbstractFormSection section = new DefinedTermDetailSection(this, definedTermClass, conversation, parentElement,
                 selectionProvider, style);
-       
-               parentElement.addElement(section);
-               adapt(section);
-               return section;
-               
-       }
-       
-       /**
-        * @param definedTermClass
-        * @param formElement
-        * @param style
-        * @return
-        */
+
+        parentElement.addElement(section);
+        adapt(section);
+        return section;
+
+    }
+
+    /**
+     * @param definedTermClass
+     * @param formElement
+     * @param style
+     * @return
+     */
     public AbstractCdmDetailElement createDefinedTermDetailElement(Class definedTermClass, AbstractCdmDetailSection parentElement, int style) {
-               AbstractCdmDetailElement element = null;
-               
-               if (NamedArea.class.isAssignableFrom(definedTermClass)){
-                       element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
+        AbstractCdmDetailElement element = null;
+
+        if (NamedArea.class.isAssignableFrom(definedTermClass)) {
+            element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
         } else {
-                       element = new DefinedTermDetailElement(this, parentElement);
-               }
-               
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+            element = new DefinedTermDetailElement(this, parentElement);
+        }
+
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
 
     //--------DetailSections---------
@@ -1608,6 +1624,11 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
+    public GatheringEventDetailSection createGatheringSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
 
     public NamedAreaDetailSection createNamedAreaDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
         NamedAreaDetailSection section = new NamedAreaDetailSection(this, conversation, parentElement, selectionProvider, style);
@@ -1621,28 +1642,10 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
-    public GeneralDetailSection createFOSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
-        GeneralDetailSection section = new GeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-               }
-               
-    public GatheringEventDetailSection createGatheringSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
-        GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-    }
-
-    public FieldObservationDetailSection createFODetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
-        FieldObservationDetailSection section = new FieldObservationDetailSection(this, conversation, parentElement, selectionProvider, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-               }
-
     private void addAndAdaptSection(ICdmFormElement parentElement, AbstractFormSection<?> section) {
-               parentElement.addElement(section);
-               adapt(section);
-       }
+        parentElement.addElement(section);
+        adapt(section);
+    }
 
     //--------DetailElements------------
 
@@ -1819,42 +1822,44 @@ public class CdmFormFactory extends FormToolkit {
         addAndAdaptElement(parentElement, element);
         return element;
     }
-       
-       
+
+
     public GeneralDetailElement createGeneralDetailElement(ICdmFormElement parentElement){
         GeneralDetailElement element = new GeneralDetailElement(this, parentElement);
         addAndAdaptElement(parentElement, element);
         return element;
     }
 
+
     public GatheringEventDetailElement createGatheringEventDetailElement(ICdmFormElement parentElement) {
         GatheringEventDetailElement element = new GatheringEventDetailElement(this, parentElement);
         addAndAdaptElement(parentElement, element);
         return element;
-               }
+    }
 
     public FieldObservationDetailElement createFieldObservationDetailElement(ICdmFormElement parentElement) {
         FieldObservationDetailElement element = new FieldObservationDetailElement(this, parentElement);
         addAndAdaptElement(parentElement, element);
         return element;
-               }
+    }
+
 
     public DerivedUnitBaseDetailElement createDerivedUnitBaseDetailElement(ICdmFormElement parentElement) {
         DerivedUnitBaseDetailElement element = new DerivedUnitBaseDetailElement(this, parentElement);
         addAndAdaptElement(parentElement, element);
-               return element;
-       }
+        return element;
+    }
 
     public DeterminationDetailElement createDeterminationDetailElement(ICdmFormElement parentElement) {
         DeterminationDetailElement element = new DeterminationDetailElement(this, parentElement);
         addAndAdaptElement(parentElement, element);
         return element;
-       }
+    }
 
-       /**
-        * @param parentElement
+    /**
+     * @param parentElement
      * @param element
-        */
+     */
     private void addAndAdaptElement(ICdmFormElement parentElement, AbstractCdmDetailElement<?> element) {
         adapt(element);
         parentElement.addElement(element);
@@ -2051,326 +2056,388 @@ public class CdmFormFactory extends FormToolkit {
         GroupsByUserDetailSection section = new GroupsByUserDetailSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
         return section;
-               }
+    }
 
     public TaxonomicScopeSection createTaxonomicScopeSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
         TaxonomicScopeSection section = new TaxonomicScopeSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
-               return section;
-       }
+        return section;
+    }
 
-       /**
-        * <p>
-        * createEntityCollectionElement
-        * </p>
-        * 
-        * @param removeListener
-        *            a {@link org.eclipse.swt.events.SelectionListener} object.
-        * @param style
-        *            a int.
-        * @param parentElement
+    /**
+     * <p>
+     * createEntityCollectionElement
+     * </p>
+     *
+     * @param removeListener
+     *            a {@link org.eclipse.swt.events.SelectionListener} object.
+     * @param style
+     *            a int.
+     * @param parentElement
      *            a
      *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
-        *            object.
-        * @param versionableEntity
-        *            a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
-        *            object.
-        * @param backgroundColor
-        *            a {@link org.eclipse.swt.graphics.Color} object.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
-        *         object.
-        */
+     *            object.
+     * @param versionableEntity
+     *            a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
+     *            object.
+     * @param backgroundColor
+     *            a {@link org.eclipse.swt.graphics.Color} object.
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
+     *         object.
+     */
     public AbstractEntityCollectionElement createEntityCollectionElement(AbstractFormSection parentElement,
             Object versionableEntity, SelectionListener removeListener, Color backgroundColor, int style) {
-               AbstractEntityCollectionElement element = null;
+        AbstractEntityCollectionElement element = null;
 
-               Object entity = HibernateProxyHelper.deproxy(versionableEntity);
+        Object entity = HibernateProxyHelper.deproxy(versionableEntity);
 
-               if (entity instanceof Annotation) {
+        if (entity instanceof Annotation) {
             element = new AnnotationElement(this, parentElement, (Annotation) entity, removeListener, style);
-               } else if (entity instanceof Person) {
+        } else if (entity instanceof Person) {
             element = new TeamMemberElement(this, parentElement, (Person) entity, removeListener, style);
-               } else if (entity instanceof Credit) {
+        } else if (entity instanceof Credit) {
             element = new CreditElement(this, parentElement, (Credit) entity, removeListener, style);
-               } else if (entity instanceof Extension) {
+        } else if (entity instanceof Extension) {
             element = new ExtensionElement(this, parentElement, (Extension) entity, removeListener, style);
-               } else if (entity instanceof Marker) {
+        } else if (entity instanceof Marker) {
             element = new MarkerElement(this, parentElement, (Marker) entity, removeListener, style);
-               } else if (entity instanceof Media) {
+        } else if (entity instanceof Media) {
             element = new MediaElement(this, parentElement, (Media) entity, removeListener, style);
-               } else if (entity instanceof MediaRepresentation) {
+        } else if (entity instanceof MediaRepresentation) {
             element = new MediaRepresentationElement(this, parentElement, (MediaRepresentation) entity, removeListener,
                     style);
-               } else if (entity instanceof ImageFile) {
+        } else if (entity instanceof ImageFile) {
             element = new ImageFileElement(this, parentElement, (ImageFile) entity, removeListener, style);
-               } else if (entity instanceof MediaRepresentationPart){
+        } else if (entity instanceof MediaRepresentationPart) {
             element = new MediaRepresentationPartElement(this, parentElement, (MediaRepresentationPart) entity,
                     removeListener, style);
-               } else if (entity instanceof NomenclaturalStatus) {
+        } else if (entity instanceof NomenclaturalStatus) {
             element = new NomenclaturalStatusElement(this, parentElement, (NomenclaturalStatus) entity, removeListener,
                     style);
-               } else if (entity instanceof Rights) {
+        } else if (entity instanceof Rights) {
             element = new RightsElement(this, parentElement, (Rights) entity, removeListener, style);
         } else if (entity instanceof DescriptionElementSource) {
             element = new DescriptionElementSourceElement(this, parentElement, (DescriptionElementSource) entity,
-                                       removeListener, style);
-               } else if (entity instanceof IdentifiableSource) {
+                    removeListener, style);
+        } else if (entity instanceof IdentifiableSource) {
             element = new IdentifiableSourceElement(this, parentElement, (IdentifiableSource) entity, removeListener,
                     style);
                } else if (entity instanceof DefinedTerm) {
                        switch(((DefinedTerm)entity).getTermType()) {
                                case Scope:
-                                       element = new ScopeElement(this, 
-                                                       parentElement, 
+                                       element = new ScopeElement(this,
+                                                       parentElement,
                                                        (DefinedTerm) entity,
-                                                       removeListener, 
+                                                       removeListener,
                                                        style);
                                        break;
                                case Modifier:
-                                       element = new ModifierElement(this, 
+                                       element = new ModifierElement(this,
                                                        parentElement,
-                                                       (DefinedTerm) entity, 
-                                                       removeListener, 
+                                                       (DefinedTerm) entity,
+                                                       removeListener,
                                                        style);
                                        break;
                                default:
                                        //FIXME : Actually we should through an exception here
                                        element = null;
                                        break;
-                       
+
                        }
-               } else if (entity instanceof Reference) {
+        } else if (entity instanceof Reference) {
             element = new DescriptionSourceElement(this, parentElement, (Reference) entity, removeListener, style);
-               } else if (entity instanceof NameTypeDesignation) {
+        } else if (entity instanceof NameTypeDesignation) {
             element = new NameTypeDesignationElement(this, parentElement, (NameTypeDesignation) entity, removeListener,
                     style);
-               } else if (entity instanceof NameRelationship) {
+        } else if (entity instanceof NameRelationship) {
             element = new NameRelationshipDetailElement(this, parentElement, (NameRelationship) entity, removeListener,
                     style);
-               } else if (entity instanceof SpecimenTypeDesignation) {
+        } else if (entity instanceof SpecimenTypeDesignation) {
             element = new SpecimenTypeDesignationElement(this, parentElement, (SpecimenTypeDesignation) entity,
                     removeListener, style);
-               } else if (entity instanceof StateData) {
+        } else if (entity instanceof StateData) {
             element = new StateDataElement(this, parentElement, (StateData) entity, removeListener, style);
-               } else if (entity instanceof StatisticalMeasurementValue) {
+        } else if (entity instanceof StatisticalMeasurementValue) {
             element = new StatisticalMeasurementValueElement(this, parentElement, (StatisticalMeasurementValue) entity,
-                                       removeListener, style);
-               } else if (entity instanceof DerivedUnit) {
-                       switch(((DerivedUnit)entity).getRecordBasis()) {
+                    removeListener, style);
+        } else if (entity instanceof DerivedUnit) {
+               switch(((DerivedUnit)entity).getRecordBasis()) {
                                case LivingSpecimen:
                                case PreservedSpecimen:
                                case OtherSpecimen:
-                                       element = new SpecimenCollectionDetailElement(this, 
+                                       element = new SpecimenCollectionDetailElement(this,
                                                                parentElement,
-                                                               (DerivedUnit) entity, 
-                                                               removeListener, 
+                                                               (DerivedUnit) entity,
+                                                               removeListener,
                                                                style);
                                        break;
                                default:
-                                       element = new DerivedUnitElement(this, 
+                                       element = new DerivedUnitElement(this,
                                                                parentElement,
-                                                               (DerivedUnit) entity, 
-                                                               removeListener, 
+                                                               (DerivedUnit) entity,
+                                                               removeListener,
                                                                style);
-                       }                       
+                       }
 
-               } else if (entity instanceof NamedArea) {
+        } else if (entity instanceof NamedArea) {
             element = new NamedAreaDetailElement(this, parentElement, (NamedArea) entity, removeListener, style);
-               } else if (entity instanceof DeterminationEvent) {
-            element = new DeterminationEventDetailElement(this, parentElement, (DeterminationEvent) entity,
-                    removeListener, style);
-               } else if (entity instanceof User) {
+        } else if (entity instanceof DeterminationEvent) {
+            element = new DeterminationEventDetailElement(this, parentElement, (DeterminationEvent) entity, removeListener, style);
+        } else if (entity instanceof DerivedUnit && ((DerivedUnit)entity).getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen) {
+            element = new SpecimenCollectionDetailElement(this, parentElement, (DerivedUnit) entity, removeListener, style);
+        } else if (entity instanceof User) {
             element = new MemberDetailElement(this, parentElement, (User) entity, removeListener, style);
-               } else if (entity instanceof GrantedAuthority) {
+        } else if (entity instanceof GrantedAuthority) {
             element = new GrantedAuthorityCollectionElement(this, parentElement, (GrantedAuthorityImpl) entity,
                     removeListener, style);
-               } else if (entity instanceof Group) {
+        } else if (entity instanceof Group) {
             element = new GroupsByUserDetailElement(this, parentElement, (Group) entity, removeListener, style);
-               } else if (entity instanceof Taxon) {
+        } else if (entity instanceof Taxon) {
             element = new TaxonDetailElement(this, parentElement, (Taxon) entity, removeListener, style);
-               } else if (entity instanceof DescriptionElementBase) {
-                       // this is the special case for protologs, maybe we can do this
-                       // differently when API improves
-                       DescriptionElementBase descriptionElement = (DescriptionElementBase) entity;
-                       if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
+        } else if (entity instanceof DescriptionElementBase) {
+            // this is the special case for protologs, maybe we can do this
+            // differently when API improves
+            DescriptionElementBase descriptionElement = (DescriptionElementBase) entity;
+            if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
                 element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
-                       }
-               }
+            }
+        }
 
-               if (element == null) {
+        if (element == null) {
             AbstractUtility.errorDialog("No element for entity", this,
                     "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
-                                                                       + entity, null);
-
-               }
+                            + entity, null);
+        }
 
         else if (backgroundColor != null && !backgroundColor.isDisposed()) {
-                       element.setPersistentBackground(backgroundColor);
-               }
+            element.setPersistentBackground(backgroundColor);
+            adapt(element);
+            parentElement.addElement(element);
+        }
 
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
+        return element;
+    }
 
-       /**
-        * <p>
-        * Creates a selection element for the given type T.
-        * </p>
-        * <p>
-        *      <strong>Selection elements not handled by this method:</strong>
-        *      <ul>
+    public void createNamedAreaFieldController(AbstractFormSection parentElement, NamedArea namedArea, SelectionListener removeListener){
+//        Object entity = HibernateProxyHelper.deproxy(versionableEntity); TODO deproxy necessary??
+        NamedAreaFieldController element = new NamedAreaFieldController(this, parentElement, namedArea, removeListener, SWT.NONE);
+        adapt(element);
+        parentElement.addElement(element);
+    }
+
+    /**
+     * <p>
+     * Creates a selection element for the given type T.
+     * </p>
+     * <p>
+     * <strong>Selection elements not handled by this method:</strong>
+     * <ul>
      * <li>{@link TaxonNodeSelectionElement} see
      * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
      * </li>
      * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
      * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
      * </li>
-        *      </ul>   
-        * </p>
-        * 
-        * @param clazz
+     * </ul>
+     * </p>
+     *
+     * @param clazz
      *            a {@link Class} object of the type that you want the selection
      *            element to handle
-        * @param parentElement
+     * @param parentElement
      *            a {@link ICdmFormElement} object.
-        * @param labelString
-        *            a {@link String} object.
-        * @param selectionType
-        * @param selection
-        *            a {@link ICdmBase} object.
-        * @param style
-        *            a int.
-        * @param conversation
-        *            a {@link ConversationHolder} object.
+     * @param labelString
+     *            a {@link String} object.
+     * @param selectionType
+     * @param selection
+     *            a {@link ICdmBase} object.
+     * @param style
+     *            a int.
+     * @param conversation
+     *            a {@link ConversationHolder} object.
      * @return a {@link EntitySelectionElement} object.
-        */
+     */
     public <T extends ICdmBase> EntitySelectionElement<T> createSelectionElement(Class<T> clazz,
             ConversationHolder conversation, ICdmFormElement parentElement, String labelString, T selection, int mode,
             int style) {
         EntitySelectionElement<T> element = new EntitySelectionElement<T>(this, conversation, parentElement, clazz,
                 labelString, selection, mode, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
-       
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
     public TaxonNodeSelectionElement createTaxonNodeSelectionElement(ConversationHolder conversation,
             ICdmFormElement parentElement, String labelString, TaxonNode selection, int mode, int style) {
         TaxonNodeSelectionElement element = new TaxonNodeSelectionElement(this, conversation, parentElement,
                 labelString, selection, mode, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
-       
-       public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
+    public NomenclaturalAuthorTeamSelectionElement createNomenclaturalAuthorTeamSelectionElement(
             ConversationHolder conversation, ICdmFormElement parentElement, String labelString, Team selection,
             int mode, int style) {
         NomenclaturalAuthorTeamSelectionElement element = new NomenclaturalAuthorTeamSelectionElement(this,
                 conversation, parentElement, labelString, selection, mode, style);
-               adapt(element);
-               parentElement.addElement(element);
-               return element;
-       }
-       
-       
-       /** {@inheritDoc} */
-       public LabelElement createLabel(ICdmFormElement parentElement, String text) {
-               LabelElement labelElement = new LabelElement(this, parentElement, text);
-               adapt(labelElement);
-               parentElement.addElement(labelElement);
-               return labelElement;
-       }
-
-       /**
-        * <p>
-        * Getter for the field <code>selectionProvider</code>.
-        * </p>
-        * 
-        * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
-        */
-       public ISelectionProvider getSelectionProvider() {
-               return selectionProvider;
-       }
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
-       /**
-        * <p>
-        * createDetailedDescriptionDetailElement
-        * </p>
-        * 
-        * @param parentElement
-        *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
-        *            object.
-        * @param entity
-        *            a
-        *            {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
-        *            object.
-        * @param style
-        *            a int.
-        * @return a
-        *         {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
-        *         object.
-        */
-       public AbstractDetailedDescriptionDetailElement createDetailedDescriptionDetailElement(
+    /** {@inheritDoc} */
+    public LabelElement createLabel(ICdmFormElement parentElement, String text) {
+        LabelElement labelElement = new LabelElement(this, parentElement, text);
+        adapt(labelElement);
+        parentElement.addElement(labelElement);
+        return labelElement;
+    }
+
+    /**
+     * <p>
+     * Getter for the field <code>selectionProvider</code>.
+     * </p>
+     *
+     * @return a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
+     */
+    public ISelectionProvider getSelectionProvider() {
+        return selectionProvider;
+    }
+
+    /**
+     * <p>
+     * createDetailedDescriptionDetailElement
+     * </p>
+     *
+     * @param parentElement
+     *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+     *            object.
+     * @param entity
+     *            a
+     *            {@link eu.etaxonomy.cdm.model.description.DescriptionElementBase}
+     *            object.
+     * @param style
+     *            a int.
+     * @return a
+     *         {@link eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement}
+     *         object.
+     */
+    public AbstractDetailedDescriptionDetailElement createDetailedDescriptionDetailElement(
             ICdmFormElement parentElement, DescriptionElementBase entity, int style) {
-               AbstractDetailedDescriptionDetailElement detailedDescriptionElement = null;
+        AbstractDetailedDescriptionDetailElement detailedDescriptionElement = null;
 
-               if (entity instanceof CategoricalData) {
+        if (entity instanceof CategoricalData) {
             detailedDescriptionElement = new CategoricalDataDetailElement(this, parentElement,
                     (CategoricalData) entity, style);
-               } else if (entity instanceof CommonTaxonName) {
+        } else if (entity instanceof CommonTaxonName) {
             detailedDescriptionElement = new CommonNameDetailElement(this, parentElement, (CommonTaxonName) entity,
                     style);
-               } else if (entity instanceof Distribution) {
+        } else if (entity instanceof Distribution) {
             detailedDescriptionElement = new DistributionDetailElement(this, parentElement, (Distribution) entity,
                     style);
-               } else if (entity instanceof IndividualsAssociation) {
+        } else if (entity instanceof IndividualsAssociation) {
             detailedDescriptionElement = new IndividualsAssociationDetailElement(this, parentElement,
                     (IndividualsAssociation) entity, style);
-               } else if (entity instanceof QuantitativeData) {
+        } else if (entity instanceof QuantitativeData) {
             detailedDescriptionElement = new QuantitativeDataDetailElement(this, parentElement,
                     (QuantitativeData) entity, style);
-               } else if (entity instanceof TaxonInteraction) {
+        } else if (entity instanceof TaxonInteraction) {
             detailedDescriptionElement = new TaxonInteractionDetailElement(this, parentElement,
                     (TaxonInteraction) entity, style);
-               } else if (entity instanceof TextData) {
+        } else if (entity instanceof TextData) {
             detailedDescriptionElement = new TextDataDetailElement(this, parentElement, (TextData) entity, style);
-               } else {
+        } else {
             throw new IllegalStateException("There is no interface for the given description element");
-               }
-               adapt(detailedDescriptionElement);
-               parentElement.addElement(detailedDescriptionElement);
-               return detailedDescriptionElement;
-
-       }
-
-       /**
-        * Creates a styled text as a part of the form.
-        * 
-        * @param parent
-        *            the text parent
-        * @param value
-        *            the text initial value
-        * @param style
-        *            the text style
-        * @return the text widget
-        */
-       public StyledText createStyledText(Composite parent, String value, int style) {
+        }
+        adapt(detailedDescriptionElement);
+        parentElement.addElement(detailedDescriptionElement);
+        return detailedDescriptionElement;
+
+    }
+
+    /**
+     * Creates a styled text as a part of the form.
+     *
+     * @param parent
+     *            the text parent
+     * @param value
+     *            the text initial value
+     * @param style
+     *            the text style
+     * @return the text widget
+     */
+    public StyledText createStyledText(Composite parent, String value, int style) {
         StyledText text = new StyledText(parent, getBorderStyle() | style | getOrientation());
         if (value != null) {
-                       text.setText(value);
+            text.setText(value);
         }
-               text.setForeground(getColors().getForeground());
-               text.setBackground(getColors().getBackground());
-               // text.addFocusListener(visibilityHandler);
-               return text;
-       }
+        text.setForeground(getColors().getForeground());
+        text.setBackground(getColors().getBackground());
+        // text.addFocusListener(visibilityHandler);
+        return text;
+    }
+
+
+
+    /**
+     * @param conversationHolder
+     * @param parent
+     * @param detailsViewer
+     * @param i
+     * @return
+     */
+    public FieldObservationSection createFieldObservationSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
+        FieldObservationSection section = new FieldObservationSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
 
+    /**
+     * @param conversationHolder
+     * @param parent
+     * @param detailsViewer
+     * @param i
+     * @return
+     */
+    public SpecimenSection createSpecimenSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
+        SpecimenSection section = new SpecimenSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
 
+    public SpecimenGeneralElementController createSpecimenGeneralElementController(ICdmFormElement parentElement){
+        SpecimenGeneralElement specimenGeneralElement = new SpecimenGeneralElement(parentElement.getLayoutComposite(), SWT.NONE);
+        specimenGeneralElement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
+        SpecimenGeneralElementController element = new SpecimenGeneralElementController(specimenGeneralElement, this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
 
+    public FieldObservationGeneralElementController createFieldObservationGeneralElement(ICdmFormElement parentElement){
+        FieldObservationGeneralElement fieldObservationGeneralElement = new FieldObservationGeneralElement(parentElement.getLayoutComposite(), SWT.NONE);
+        fieldObservationGeneralElement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
+        FieldObservationGeneralElementController element = new FieldObservationGeneralElementController(fieldObservationGeneralElement, this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
 
+    public GatheringEventDetailsElementController createGatheringEventDetailsElementController(ICdmFormElement parentElement) {
+        GatheringEventDetailsElement gatheringEventDetailsElement = new GatheringEventDetailsElement(parentElement.getLayoutComposite(), SWT.NONE);
+        gatheringEventDetailsElement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
+        GatheringEventDetailsElementController element = new GatheringEventDetailsElementController(gatheringEventDetailsElement, this, parentElement);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
 
+    public FieldObservationDetailsElementController createFieldObservationDetailsElementController(ICdmFormElement parentElement) {
+        FieldObservationDetailsElement fieldObservationDetailsElement = new FieldObservationDetailsElement(parentElement.getLayoutComposite(), SWT.NONE);
+        fieldObservationDetailsElement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
+        FieldObservationDetailsElementController element = new FieldObservationDetailsElementController(fieldObservationDetailsElement, this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
 
 }