- extended DnaQuality details view
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / CdmFormFactory.java
index cbd7249d5d328e0f0315b3677ccc275ffd25e09b..03f76ed7ce5a57d1fe595afa9768eed9e01d7775 100644 (file)
@@ -37,6 +37,7 @@ import org.eclipse.ui.forms.widgets.ExpandableComposite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.Section;
 import org.eclipse.ui.internal.forms.widgets.FormFonts;
+import org.joda.time.DateTime;
 import org.joda.time.Partial;
 import org.springframework.security.core.GrantedAuthority;
 
@@ -56,10 +57,12 @@ import eu.etaxonomy.cdm.model.common.Group;
 import eu.etaxonomy.cdm.model.common.ICdmBase;
 import eu.etaxonomy.cdm.model.common.IEnumTerm;
 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
+import eu.etaxonomy.cdm.model.common.Identifier;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.common.Marker;
 import eu.etaxonomy.cdm.model.common.TermType;
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.common.TimePeriod;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.model.common.VersionableEntity;
@@ -84,6 +87,7 @@ import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
 import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
 import eu.etaxonomy.cdm.model.media.Rights;
+import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
 import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
@@ -91,31 +95,15 @@ 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.reference.Reference;
+import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
 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.FieldObservationDetailsSection;
-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.FieldObservationGeneralSection;
-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.fieldObservation.GatheringEventSection;
-import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.DerivedUnitDetailsElement;
-import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.DerivedUnitDetailsElementController;
-import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.DerivedUnitDetailsSection;
-import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.SpecimenDetailsElement;
-import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.SpecimenDetailsElementController;
-import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.SpecimenDetailsSection;
-import eu.etaxonomy.taxeditor.ui.campanula.detailViews.specimen.SpecimenGeneralSection;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
 import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
 import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection.UnitType;
+import eu.etaxonomy.taxeditor.ui.mvc.element.DateElement;
 import eu.etaxonomy.taxeditor.ui.openurl.IOpenUrlEnabled;
 import eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement;
 import eu.etaxonomy.taxeditor.ui.password.EditPasswordElement;
@@ -185,7 +173,8 @@ import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.ScopeRestrictionSection;
 import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
 import eu.etaxonomy.taxeditor.ui.section.media.ImageFileElement;
-import eu.etaxonomy.taxeditor.ui.section.media.MediaElement;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaMetaElement;
 import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationElement;
 import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationPartElement;
 import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationPartSection;
@@ -207,6 +196,8 @@ import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.ProtologueElement;
 import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
 import eu.etaxonomy.taxeditor.ui.section.name.SpecimenTypeDesignationElement;
+import eu.etaxonomy.taxeditor.ui.section.name.SynonymRelationshipDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.name.SynonymRelationshipDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectingAreasDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectionDetailElement;
@@ -221,6 +212,7 @@ import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationEventDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationHistoryDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.EmptySection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailElement;
@@ -228,9 +220,53 @@ import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSectio
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.NamedAreaDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.OriginalLabelDataSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.SourceCollectionDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenCurrentDeterminationDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenDeterminationDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenDeterminationDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenDeterminationHistoryDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenSourceCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationCloningDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationCloningDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGelPhotoCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGelPhotoDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationPrimerDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationPrimerDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.CurrentSampleDesignationDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.PrimerGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationHistoryDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationTextDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceContigFileCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceReferenceCollectionDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceReferenceCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadPherogramCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.media.LivingPlantPhotoGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.media.LivingPlantPhotoGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.media.SpecimenScanGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.media.SpecimenScanGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;
@@ -414,7 +450,7 @@ public class CdmFormFactory extends FormToolkit {
         if (selectionProvider != null) {
             selectionProvider.removeSelectionChangedListener(selectionArbitrator);
         } else {
-            AbstractUtility.error(this.getClass(),
+            MessagingUtils.error(this.getClass(),
                     "Tried to destroy a selection listener from this factories listeners but was null", null);
         }
     }
@@ -430,7 +466,7 @@ public class CdmFormFactory extends FormToolkit {
      *            {@link eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement}
      *            object.
      */
-    public void adapt(AbstractCdmFormElement formElement) {
+    public void adapt(ICdmFormElement formElement) {
         formElement.setPropertyChangeListeners(propertyChangeListeners);
     }
 
@@ -504,31 +540,6 @@ public class CdmFormFactory extends FormToolkit {
         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;
-    }
-
     /**
      * <p>
      * createMultiLanguageTextElement
@@ -567,27 +578,76 @@ public class CdmFormFactory extends FormToolkit {
         return element;
     }
 
+    /**
+     * Creates a text field with a label. The initial content will be the return value of the initalObject's {@link #toString()}
+     * method.<br>
+     * <b>Note</b>: if initialObject is <code>null</code> then an empty string is used.
+     * @param parentElement the parent container
+     * @param labelString the label name
+     * @param initialObject the object from which the <code>toString()</code> method is called
+     * @param style {@link SWT} style constant
+     * @return the created textfield with label
+     */
+    public TextWithLabelElement createTextWithLabelElement(ICdmFormElement parentElement, String labelString,
+            Object initialObject, int style) {
+        return createTextWithLabelElement(parentElement, labelString, initialObject==null?"":initialObject.toString(), style);
+    }
+
     /**
      * <p>
      * createTextWithLabelElement
      * </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 style
      *            a int.
+     * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
+     *         object.
+     */
+    public TextWithLabelElement createTextWithLabelElement(ICdmFormElement parentElement, String labelString,
+            String initialText, int style) {
+        return createTextWithLabelElement(parentElement, labelString, initialText, null, style);
+    }
+    /**
+     * <p>
+     * createTextWithLabelElement
+     * </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 textLimit maximal number of characters allowed
+     * @param style
+     *            a int.
      * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
      *         object.
      */
     public TextWithLabelElement createTextWithLabelElement(ICdmFormElement parentElement, String labelString,
-            String initialText, int style) {
+            String initialText, Integer textLimit, int style) {
+        if(initialText==null){
+            initialText = "";
+        }
+
         TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, initialText, null,
-                style);
+                textLimit, style);
+        adapt(element);
+        parentElement.addElement(element);
+        return element;
+    }
+
+    public TextWithLabelElement createMultiLineTextWithLabel(ICdmFormElement parentElement, String labelString,
+            int textHeight, int style) {
+        TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, "", textHeight, true, style);
         adapt(element);
         parentElement.addElement(element);
         return element;
@@ -718,27 +778,6 @@ public class CdmFormFactory extends FormToolkit {
         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.
-     */
-    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;
-    }
 
     /**
      * <p>
@@ -770,6 +809,7 @@ public class CdmFormFactory extends FormToolkit {
      * createTermComboElement
      * </p>
      *
+     * @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
      * @param termComboType
      *            a
      *            {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
@@ -787,7 +827,7 @@ public class CdmFormFactory extends FormToolkit {
      * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
      *         object.
      */
-
+    @Deprecated
     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,
@@ -832,6 +872,41 @@ public class CdmFormFactory extends FormToolkit {
                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.
+        */
+
+       public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
+               TermVocabulary<?> termVocabulary,
+               ICdmFormElement parentElement,
+               String labelString,
+               T selection,
+               int style) {
+           TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termVocabulary, labelString, selection, style);
+           adapt(element);
+           parentElement.addElement(element);
+           return element;
+       }
+
     /**
      * <p>
      * createEnumComboElement
@@ -946,7 +1021,10 @@ public class CdmFormFactory extends FormToolkit {
      * @return a {@link eu.etaxonomy.taxeditor.ui.element.CheckboxElement}
      *         object.
      */
-    public CheckboxElement createCheckbox(ICdmFormElement parentElement, String label, boolean initialState, int style) {
+    public CheckboxElement createCheckbox(ICdmFormElement parentElement, String label, Boolean initialState, int style) {
+        if(initialState==null){
+            initialState = Boolean.FALSE;
+        }
         CheckboxElement element = new CheckboxElement(this, parentElement, label, initialState, style | orientation);
         adapt(element);
         parentElement.addElement(element);
@@ -1127,6 +1205,22 @@ public class CdmFormFactory extends FormToolkit {
         return element;
     }
 
+
+
+    /**
+     * @param conversationHolder
+     * @param parent
+     * @param detailsViewer
+     * @param i
+     * @return
+     */
+    public EmptySection createEmptySection(CdmFormFactory formFactory, ICdmFormElement parentElement, int style) {
+        EmptySection section = new EmptySection(formFactory, parentElement, style);
+        parentElement.addElement(section);
+        adapt(section);
+        return section;
+    }
+
     /**
      * <p>
      * createDateDetailSection
@@ -1214,7 +1308,7 @@ public class CdmFormFactory extends FormToolkit {
      */
     public void removeSelectionListener(SelectionListener listener) {
         if (listener == null) {
-            AbstractUtility.error(this.getClass(),
+            MessagingUtils.error(this.getClass(),
                     "Tried to remove a selection listener from this factories listeners but was null", null);
         } else {
             selectionListenerList.remove(listener);
@@ -1355,8 +1449,8 @@ public class CdmFormFactory extends FormToolkit {
      *            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);
+    public EmptyElement createEmptyElement(ICdmFormElement parentElement, String emptyText) {
+        EmptyElement element = new EmptyElement(this, parentElement, emptyText, SWT.NULL);
         adapt(element);
         parentElement.addElement(element);
         return element;
@@ -1545,6 +1639,12 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
+    public OriginalLabelDataSection createOriginalLabelDataSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        OriginalLabelDataSection section = new OriginalLabelDataSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
     public NaturalLanguageSection createNaturalLanguageSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
         NaturalLanguageSection section = new NaturalLanguageSection(this, conversation, parentElement, selectionProvider, style);
         addAndAdaptSection(parentElement, section);
@@ -1599,6 +1699,102 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
+    public PreservedSpecimenGeneralDetailSection createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        PreservedSpecimenGeneralDetailSection section = new PreservedSpecimenGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public TissueSampleGeneralDetailSection createTissueSampleGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        TissueSampleGeneralDetailSection section = new TissueSampleGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DnaSampleGeneralDetailSection createDnaSampleGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        DnaSampleGeneralDetailSection section = new DnaSampleGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public DnaQualityDetailSection createDnaQualityDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        DnaQualityDetailSection section = new DnaQualityDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SequenceGeneralDetailSection createSequenceGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        SequenceGeneralDetailSection section = new SequenceGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SequenceContigFileCollectionDetailSection createSequenceContigFileCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        SequenceContigFileCollectionDetailSection section = new SequenceContigFileCollectionDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SingleReadPherogramCollectionDetailSection createSingleReadPherogramCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        SingleReadPherogramCollectionDetailSection section = new SingleReadPherogramCollectionDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SequenceReferenceCollectionDetailSection createSequenceReferenceCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        SequenceReferenceCollectionDetailSection section = new SequenceReferenceCollectionDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SingleReadGeneralDetailSection createSingleReadGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        SingleReadGeneralDetailSection section = new SingleReadGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public AmplificationGeneralDetailSection createAmplificationGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        AmplificationGeneralDetailSection section = new AmplificationGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public AmplificationPrimerDetailSection createAmplificationPrimerDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        AmplificationPrimerDetailSection section = new AmplificationPrimerDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public AmplificationCloningDetailSection createAmplificationCloningDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        AmplificationCloningDetailSection section = new AmplificationCloningDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public AmplificationGelPhotoCollectionDetailSection createAmplificationGelPhotoCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        AmplificationGelPhotoCollectionDetailSection section = new AmplificationGelPhotoCollectionDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SpecimenScanGeneralDetailSection createSpecimenScanGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        SpecimenScanGeneralDetailSection section = new SpecimenScanGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public LivingPlantPhotoGeneralDetailSection createLivingPlantPhotoGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        LivingPlantPhotoGeneralDetailSection section = new LivingPlantPhotoGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public MediaSpecimenGeneralDetailSection createMediaSpecimenGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        MediaSpecimenGeneralDetailSection section = new MediaSpecimenGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
     public HybridDetailSection createHybridDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
         HybridDetailSection section = new HybridDetailSection(this, conversation, parentElement, selectionProvider, style);
         addAndAdaptSection(parentElement, section);
@@ -1623,6 +1819,18 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
+    public SampleDesignationDetailSection createSampleDesignationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        SampleDesignationDetailSection section = new SampleDesignationDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public PreservedSpecimenDeterminationDetailSection createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+        PreservedSpecimenDeterminationDetailSection section = new PreservedSpecimenDeterminationDetailSection(this, conversation, parentElement, selectionProvider, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
     public TaxonRelationshipDetailSection createTaxonRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
         TaxonRelationshipDetailSection section = new TaxonRelationshipDetailSection(this, conversation, parentElement, selectionProvider, style);
         addAndAdaptSection(parentElement, section);
@@ -1853,6 +2061,95 @@ public class CdmFormFactory extends FormToolkit {
         return element;
     }
 
+    public PreservedSpecimenGeneralDetailElement createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement){
+        PreservedSpecimenGeneralDetailElement element = new PreservedSpecimenGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public TissueSampleGeneralDetailElement createTissueSampleGeneralDetailElement(ICdmFormElement parentElement){
+        TissueSampleGeneralDetailElement element = new TissueSampleGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public DnaSampleGeneralDetailElement createDnaSampleGeneralDetailElement(ICdmFormElement parentElement){
+        DnaSampleGeneralDetailElement element = new DnaSampleGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public DnaQualityDetailElement createDnaQualityDetailElement(ICdmFormElement parentElement){
+        DnaQualityDetailElement element = new DnaQualityDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public SequenceGeneralDetailElement createSequenceGeneralDetailElement(ICdmFormElement parentElement){
+        SequenceGeneralDetailElement element = new SequenceGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public SingleReadGeneralDetailElement createSingleReadGeneralDetailElement(ICdmFormElement parentElement){
+        SingleReadGeneralDetailElement element = new SingleReadGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public PrimerGeneralDetailElement createPrimerGeneralDetailElement(ICdmFormElement parentElement){
+        PrimerGeneralDetailElement element = new PrimerGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public AmplificationGeneralDetailElement createAmplificationGeneralDetailElement(ICdmFormElement parentElement){
+        AmplificationGeneralDetailElement element = new AmplificationGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public AmplificationPrimerDetailElement createAmplificationPrimerDetailElement(ICdmFormElement parentElement){
+        AmplificationPrimerDetailElement element = new AmplificationPrimerDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public AmplificationCloningDetailElement createAmplificationCloningDetailElement(ICdmFormElement parentElement){
+        AmplificationCloningDetailElement element = new AmplificationCloningDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public AmplificationGelPhotoDetailElement createAmplificationGelPhotoDetailElement(ICdmFormElement parentElement){
+        AmplificationGelPhotoDetailElement element = new AmplificationGelPhotoDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public SpecimenScanGeneralDetailElement createSpecimenScanGeneralDetailElement(ICdmFormElement parentElement){
+        SpecimenScanGeneralDetailElement element = new SpecimenScanGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public LivingPlantPhotoGeneralDetailElement createLivingPlantPhotoGeneralDetailElement(ICdmFormElement parentElement){
+        LivingPlantPhotoGeneralDetailElement element = new LivingPlantPhotoGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public MediaSpecimenGeneralDetailElement createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement){
+        MediaSpecimenGeneralDetailElement element = new MediaSpecimenGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public MediaDetailElement createMediaDetailElement(ICdmFormElement parentElement){
+        MediaDetailElement mediaDetailElement = new MediaDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, mediaDetailElement);
+        return mediaDetailElement;
+    }
 
     public GatheringEventDetailElement createGatheringEventDetailElement(ICdmFormElement parentElement) {
         GatheringEventDetailElement element = new GatheringEventDetailElement(this, parentElement);
@@ -1873,12 +2170,36 @@ public class CdmFormFactory extends FormToolkit {
         return element;
     }
 
+    public OriginalLabelDataElement createOriginalLabelDataElement(ICdmFormElement parentElement) {
+        OriginalLabelDataElement element = new OriginalLabelDataElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public PreservedSpecimenDetailElement createPreservedSpecimenDetailElement(ICdmFormElement parentElement) {
+        PreservedSpecimenDetailElement element = new PreservedSpecimenDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public PreservedSpecimenDeterminationDetailElement createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement) {
+        PreservedSpecimenDeterminationDetailElement element = new PreservedSpecimenDeterminationDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
     public DeterminationDetailElement createDeterminationDetailElement(ICdmFormElement parentElement) {
         DeterminationDetailElement element = new DeterminationDetailElement(this, parentElement);
         addAndAdaptElement(parentElement, element);
         return element;
     }
 
+    public SampleDesignationDetailElement createSampleDesignationDetailElement(ICdmFormElement parentElement) {
+        SampleDesignationDetailElement element = new SampleDesignationDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
     /**
      * @param parentElement
      * @param element
@@ -1967,6 +2288,12 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
+    public SynonymRelationshipDetailSection createSynonymRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        SynonymRelationshipDetailSection section = new SynonymRelationshipDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
     public ProtologueSection createProtologueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
         ProtologueSection section = new ProtologueSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
@@ -2027,24 +2354,54 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
+    public CurrentSampleDesignationDetailSection createCurrentSampleDesignationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        CurrentSampleDesignationDetailSection section = new CurrentSampleDesignationDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
     public CurrentDeterminationDetailSection createCurrentDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
         CurrentDeterminationDetailSection section = new CurrentDeterminationDetailSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
         return section;
     }
 
+    public PreservedSpecimenCurrentDeterminationDetailSection createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        PreservedSpecimenCurrentDeterminationDetailSection section = new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
+    public SampleDesignationHistoryDetailSection createSampleDesignationHistoryDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        SampleDesignationHistoryDetailSection section = new SampleDesignationHistoryDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
     public DeterminationHistoryDetailSection createDeterminationHistoryDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
         DeterminationHistoryDetailSection section = new DeterminationHistoryDetailSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
         return section;
     }
 
+    public PreservedSpecimenDeterminationHistoryDetailSection createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        PreservedSpecimenDeterminationHistoryDetailSection section = new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
     public SpecimenCollectionDetailSection createSpecimenCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
         SpecimenCollectionDetailSection section = new SpecimenCollectionDetailSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
         return section;
     }
 
+    public PreservedSpecimenSourceCollectionDetailSection createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+        PreservedSpecimenSourceCollectionDetailSection section = new PreservedSpecimenSourceCollectionDetailSection(this, conversation, parentElement, style);
+        addAndAdaptSection(parentElement, section);
+        return section;
+    }
+
     public SourceCollectionDetailSection createSourceCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
         SourceCollectionDetailSection section = new SourceCollectionDetailSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
@@ -2126,7 +2483,7 @@ public class CdmFormFactory extends FormToolkit {
         } else if (entity instanceof Marker) {
             element = new MarkerElement(this, parentElement, (Marker) entity, removeListener, style);
         } else if (entity instanceof Media) {
-            element = new MediaElement(this, parentElement, (Media) entity, removeListener, style);
+            element = new MediaMetaElement(this, parentElement, (Media) entity, removeListener, style);
         } else if (entity instanceof MediaRepresentation) {
             element = new MediaRepresentationElement(this, parentElement, (MediaRepresentation) entity, removeListener,
                     style);
@@ -2169,13 +2526,21 @@ public class CdmFormFactory extends FormToolkit {
 
                        }
         } else if (entity instanceof Reference) {
-            element = new DescriptionSourceElement(this, parentElement, (Reference) entity, removeListener, style);
+            if(parentElement instanceof SequenceReferenceCollectionDetailSection){
+                element = new SequenceReferenceCollectionDetailElement(this, parentElement, (Reference) entity, removeListener, style);
+            }
+            else{
+                element = new DescriptionSourceElement(this, parentElement, (Reference) entity, removeListener, style);
+            }
         } else if (entity instanceof NameTypeDesignation) {
             element = new NameTypeDesignationElement(this, parentElement, (NameTypeDesignation) entity, removeListener,
                     style);
         } else if (entity instanceof NameRelationship) {
             element = new NameRelationshipDetailElement(this, parentElement, (NameRelationship) entity, removeListener,
                     style);
+        } else if (entity instanceof SynonymRelationship) {
+            element = new SynonymRelationshipDetailElement(this, parentElement, (SynonymRelationship) entity, removeListener,
+                    style);
         } else if (entity instanceof SpecimenTypeDesignation) {
             element = new SpecimenTypeDesignationElement(this, parentElement, (SpecimenTypeDesignation) entity,
                     removeListener, style);
@@ -2223,16 +2588,20 @@ public class CdmFormFactory extends FormToolkit {
             if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
                 element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
             }
+        } else if (entity instanceof Identifier) {
+            element = new SampleDesignationTextDetailElement(this, parentElement, (Identifier<DnaSample>) entity, removeListener, backgroundColor, style);
         }
 
         if (element == null) {
-            AbstractUtility.errorDialog("No element for entity", this,
+            MessagingUtils.messageDialog("No element for entity", this,
                     "Could not generate element for entity. Looks like the case is not handled already. Check implementation. Entity: "
                             + entity, null);
         }
 
-        else if (backgroundColor != null && !backgroundColor.isDisposed()) {
-            element.setPersistentBackground(backgroundColor);
+        else{
+            if (backgroundColor != null && !backgroundColor.isDisposed()) {
+                element.setPersistentBackground(backgroundColor);
+            }
             adapt(element);
             parentElement.addElement(element);
         }
@@ -2240,13 +2609,6 @@ public class CdmFormFactory extends FormToolkit {
         return element;
     }
 
-    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.
@@ -2316,6 +2678,14 @@ public class CdmFormFactory extends FormToolkit {
         return labelElement;
     }
 
+    public DateElement createDateElement(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
+        Label label = new Label(formElement.getLayoutComposite(), style);
+        label.setText(labelText+" (yyyy-MM-dd)");
+        DateElement dateElement = new DateElement(formElement.getLayoutComposite(), dateTime, style);
+        dateElement.initController(this, formElement);
+        return dateElement;
+    }
+
     /**
      * <p>
      * Getter for the field <code>selectionProvider</code>.
@@ -2400,118 +2770,10 @@ public class CdmFormFactory extends FormToolkit {
         return text;
     }
 
-
-
-    /**
-     * @param conversationHolder
-     * @param parent
-     * @param detailsViewer
-     * @param i
-     * @return
-     */
-    public FieldObservationGeneralSection createFieldObservationGeneralSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
-        FieldObservationGeneralSection section = new FieldObservationGeneralSection(this, conversation, parentElement, selectionProvider, style);
+    public PreservedSpecimenDetailSection createPreservedSpecimenDetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
+        PreservedSpecimenDetailSection section = new PreservedSpecimenDetailSection(this, conversation, parentElement, selectionProvider, style);
         addAndAdaptSection(parentElement, section);
         return section;
     }
-    /**
-     * @param conversationHolder
-     * @param parent
-     * @param detailsViewer
-     * @param i
-     * @return
-     */
-    public GatheringEventSection createGatheringEventSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
-        GatheringEventSection section = new GatheringEventSection(this, conversation, parentElement, selectionProvider, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-    }
-    /**
-     * @param conversationHolder
-     * @param parent
-     * @param detailsViewer
-     * @param i
-     * @return
-     */
-    public FieldObservationDetailsSection createFieldObservationDetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
-        FieldObservationDetailsSection section = new FieldObservationDetailsSection(this, conversation, parentElement, selectionProvider, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-    }
-
-    public SpecimenGeneralSection createSpecimenSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
-        SpecimenGeneralSection section = new SpecimenGeneralSection(this, conversation, parentElement, selectionProvider, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-    }
-
-    public SpecimenDetailsSection createSpecimenDetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
-        SpecimenDetailsSection section = new SpecimenDetailsSection(this, conversation, parentElement, selectionProvider, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-    }
-
-    public DerivedUnitDetailsSection createDerivedUnitDetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
-        DerivedUnitDetailsSection section = new DerivedUnitDetailsSection(this, conversation, parentElement, selectionProvider, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-    }
-
-    public FieldObservationGeneralElementController createSpecimenGeneralElementController(ICdmFormElement parentElement){
-        return createFieldObservationGeneralElementController_internal(parentElement, true, false);
-    }
-
-    public SpecimenDetailsElementController createSpecimenDetailsElementController(ICdmFormElement parentElement){
-        SpecimenDetailsElement element = new SpecimenDetailsElement(parentElement.getLayoutComposite(), SWT.NONE);
-        element.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
-        SpecimenDetailsElementController controller = new SpecimenDetailsElementController(element, this, parentElement);
-        addAndAdaptElement(parentElement, controller);
-        return controller;
-    }
-
-    public DerivedUnitDetailsElementController createDerivedUnitDetailsElementController(ICdmFormElement parentElement){
-        DerivedUnitDetailsElement element = new DerivedUnitDetailsElement(parentElement.getLayoutComposite(), SWT.NONE);
-        element.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
-        DerivedUnitDetailsElementController controller = new DerivedUnitDetailsElementController(element, this, parentElement);
-        addAndAdaptElement(parentElement, controller);
-        return controller;
-    }
-
-    public FieldObservationGeneralElementController createSpecimenGeneralElementControllerWizard(ICdmFormElement parentElement){
-        return createFieldObservationGeneralElementController_internal(parentElement, true, true);
-    }
-
-    public FieldObservationGeneralElementController createFieldObservationGeneralElementControllerWizard(ICdmFormElement parentElement){
-        return createFieldObservationGeneralElementController_internal(parentElement, false, true);
-    }
-
-    public FieldObservationGeneralElementController createFieldObservationGeneralElementController(ICdmFormElement parentElement){
-        return createFieldObservationGeneralElementController_internal(parentElement, false, false);
-    }
-
-    private FieldObservationGeneralElementController createFieldObservationGeneralElementController_internal(ICdmFormElement parentElement, boolean isSpecimen, boolean isWizard){
-        FieldObservationGeneralElement element = new FieldObservationGeneralElement(parentElement.getLayoutComposite(), SWT.NONE);
-        element.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
-        FieldObservationGeneralElementController controller = new FieldObservationGeneralElementController(element, this, parentElement, isSpecimen, isWizard);
-        addAndAdaptElement(parentElement, controller);
-        return controller;
-    }
-
-    public GatheringEventDetailsElementController createGatheringEventDetailsElementController(ICdmFormElement parentElement) {
-        GatheringEventDetailsElement element = new GatheringEventDetailsElement(parentElement.getLayoutComposite(), SWT.NONE);
-        element.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
-        GatheringEventDetailsElementController controller = new GatheringEventDetailsElementController(element, this, parentElement);
-        adapt(controller);
-        parentElement.addElement(controller);
-        return controller;
-    }
-
-    public FieldObservationDetailsElementController createFieldObservationDetailsElementController(ICdmFormElement parentElement) {
-        FieldObservationDetailsElement element = new FieldObservationDetailsElement(parentElement.getLayoutComposite(), SWT.NONE);
-        element.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2,1));
-        FieldObservationDetailsElementController controller = new FieldObservationDetailsElementController(element, this, parentElement);
-        addAndAdaptElement(parentElement, controller);
-        return controller;
-    }
 
 }