- added Amplification and Sequence to DerivateView
authorPatric Plitzner <p.plitzner@bgbm.org>
Mon, 6 Jan 2014 09:50:48 +0000 (09:50 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Mon, 6 Jan 2014 09:50:48 +0000 (09:50 +0000)
 - added context menu entry for the creation of both
 - added DetailsViews for both

21 files changed:
.gitattributes
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateContentProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/campanula/derivatesearch/DerivateLabelProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationCollectionSection.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationGeneralDetailElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationGeneralDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/ArtworkGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DnaSampleGeneralDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DnaSampleGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/LivingPlantPhotoGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/PreservedSpecimenDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/PreservedSpecimenDeterminationDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/PreservedSpecimenGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SequenceGeneralDetailElement.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SequenceGeneralDetailSection.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SpecimenScanGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/TissueSampleGeneralDetailSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java

index ac76dd92fc1d4ef0818971324287567b70f6f258..365903ea0a2f75ce6fa8c0085c5c77704ba4ecb3 100644 (file)
@@ -1489,8 +1489,9 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/nam
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractDeterminationEventDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AbstractEventDetailElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationCollectionSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationGeneralDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationGeneralDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/ArtworkGeneralDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/ArtworkGeneralDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/CollectingAreasDetailSection.java -text
@@ -1538,6 +1539,8 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occ
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/PreservedSpecimenGeneralDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/PreservedSpecimenGeneralDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/PreservedSpecimenSourceCollectionDetailSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SequenceGeneralDetailElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SequenceGeneralDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SourceCollectionDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SpecimenCollectionDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SpecimenCollectionDetailSection.java -text
index a0c89f49a6426c6b9dcf3bf6bfe35e9891213b01..f0331dd42637427250a818d1703208b598517356 100644 (file)
@@ -18,6 +18,7 @@ import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeCacheStrategy;
 import eu.etaxonomy.cdm.model.molecular.Amplification;
 import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
+import eu.etaxonomy.cdm.model.molecular.SingleRead;
 import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
 import eu.etaxonomy.cdm.model.occurrence.DerivationEventType;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
@@ -72,6 +73,11 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                                 createMenuItem(menu, "Consensus Sequence", dnaSample, Sequence.class, null);
                                 createMenuItem(menu, "Amplification", dnaSample, Amplification.class, null);
                             }
+                            //context menu for Amplification
+                            else if(selectedElement instanceof Amplification){
+                                Amplification amplification = (Amplification) selectedElement;
+                                createMenuItem(menu, "Single Read", amplification, SingleRead.class, null);
+                            }
                             //default
                             else{
                                 MenuItem menuItem = new MenuItem(menu, SWT.None);
@@ -81,7 +87,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                         }
                     }
 
-                    private void createMenuItem(Menu menu, String menuLabel, SpecimenOrObservationBase<?> parent, Class<?> childClass, SpecimenOrObservationType specimenType) {
+                    private void createMenuItem(Menu menu, String menuLabel, Object parent, Class<?> childClass, SpecimenOrObservationType specimenType) {
                         MenuItem menuItem = new MenuItem(menu, SWT.None);
                         menuItem.setText(menuLabel);
                         menuItem.addSelectionListener(new WidgetSelectionListener(parent, childClass, specimenType));
@@ -94,16 +100,16 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
 
     private class WidgetSelectionListener implements SelectionListener{
 
-        private final SpecimenOrObservationBase<?> parent;
+        private final Object parent;
         //TODO: we need a common interface for the generic like e.g. "IDerivateHierarchyNode"
         private final Class<?> childClass;
-        private SpecimenOrObservationType specimenType;
+        private final SpecimenOrObservationType specimenType;
 
         /**
          * @param parent
          * @param specimenType
          */
-        public WidgetSelectionListener(SpecimenOrObservationBase<?> parent, Class<?> childClass, SpecimenOrObservationType specimenType) {
+        public WidgetSelectionListener(Object parent, Class<?> childClass, SpecimenOrObservationType specimenType) {
             this.parent = parent;
             this.childClass = childClass;
             this.specimenType = specimenType;
@@ -123,7 +129,11 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                     dnaSample.addSequence(Sequence.NewInstance(""));//why does this not have DnaSample as constructor parameter?
                 }
             }
-            else if(DerivedUnit.class.isAssignableFrom(childClass)){
+            else if(parent instanceof Amplification){
+                ((Amplification) parent).addSingleRead(SingleRead.NewInstance());
+            }
+            else if(parent instanceof SpecimenOrObservationBase && DerivedUnit.class.isAssignableFrom(childClass)){
+                SpecimenOrObservationBase<?> specimenOrObservationBase = (SpecimenOrObservationBase<?>)parent;
                 DerivedUnit derivedUnit;
                 if(childClass.equals(DnaSample.class)){
                     derivedUnit = DnaSample.NewInstance();
@@ -131,15 +141,15 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                 else{
                     derivedUnit = DerivedUnit.NewInstance(specimenType);
                 }
-                parent.addDerivationEvent(DerivationEvent.NewSimpleInstance(parent, derivedUnit, DerivationEventType.GATHERING_IN_SITU()));
+                specimenOrObservationBase.addDerivationEvent(DerivationEvent.NewSimpleInstance(specimenOrObservationBase, derivedUnit, DerivationEventType.GATHERING_IN_SITU()));
                 derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                 derivedUnit.getTitleCache(); //update title cache
-                IWorkbenchPart activePart = AbstractUtility.getActivePart();
-                if(activePart instanceof DerivateView){
-                    DerivateView derivateView = (DerivateView)activePart;
-                    derivateView.changed(derivedUnit);
-                    derivateView.viewer.refresh();
-                }
+            }
+            IWorkbenchPart activePart = AbstractUtility.getActivePart();
+            if(activePart instanceof DerivateView){
+                DerivateView derivateView = (DerivateView)activePart;
+                derivateView.changed(null);
+                derivateView.viewer.refresh();
             }
         }
 
index 054ea9fd7c1b7992530d19ebdfba8de74861bd4e..10bc64812f3257a1b00f5cdd1e706fc111580d5a 100644 (file)
@@ -11,6 +11,7 @@ import org.eclipse.jface.viewers.Viewer;
 import eu.etaxonomy.cdm.model.molecular.Amplification;
 import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.molecular.Sequence;
+import eu.etaxonomy.cdm.model.molecular.SingleRead;
 import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
@@ -59,13 +60,26 @@ public class DerivateContentProvider implements ITreeContentProvider {
         if(parentElement instanceof DnaSample){
             DnaSample dnaSample = (DnaSample)parentElement;
             List<Object> children = new ArrayList<Object>();
-            children.addAll(dnaSample.getAmplifications());
+            //order is important: users want to see Sequences first
             children.addAll(dnaSample.getSequences());
+            children.addAll(dnaSample.getAmplifications());
             return children.toArray();
         }
+        else if(parentElement instanceof Amplification){
+         return ((Amplification) parentElement).getSingleReads().toArray();
+        }
+        else if(parentElement instanceof Sequence){
+            return ((Sequence) parentElement).getSingleReads().toArray();
+        }
         else if(parentElement instanceof SpecimenOrObservationBase){
                return getDerivates((SpecimenOrObservationBase) parentElement).toArray();
            }
+        else if(parentElement instanceof SingleRead){
+            List<Object> children = new ArrayList<Object>();
+            children.add(((SingleRead) parentElement).getAmplification());
+            //TODO getConsensusSequence??
+            return children.toArray();
+        }
            return null;
        }
 
@@ -87,6 +101,11 @@ public class DerivateContentProvider implements ITreeContentProvider {
         }
         else if(element instanceof Sequence){
             ((Sequence) element).getDnaSample();
+        }
+        else if(element instanceof SingleRead){
+            // TODO there are multiple possible parents
+            // does returning null help?
+            return null;
         }
                return null;
        }
index 57848cc1cdd0e768dbcf790a31d3d0b5ba31d7e2..e9c8ad128e9e3f2a13c1bea880d626c64b93fd14 100644 (file)
@@ -12,7 +12,6 @@ package eu.etaxonomy.taxeditor.ui.campanula.derivatesearch;
 import org.eclipse.jface.viewers.ColumnLabelProvider;
 import org.eclipse.swt.graphics.Image;
 
-import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
@@ -53,9 +52,6 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
         if(element instanceof FieldUnit){
             return ImageResources.getImage(ImageResources.FIELD_UNIT);
         }
-        else if(element instanceof DnaSample){
-            return ImageResources.getImage(ImageResources.DNA_SAMPLE_DERIVATE);
-        }
         else if(element instanceof DerivedUnit){
             DerivedUnit derivedUnit = (DerivedUnit)element;
             if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.FieldUnit){
index b9be2541d8c00cc840fd2d8115a8010bafc3c61a..c0dd683963ecf8e28a1e4ce49ea6c56cd045c067 100644 (file)
@@ -208,8 +208,9 @@ 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.TypeDesignationSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.AmplificationCollectionSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.AmplificationDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.AmplificationGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.AmplificationGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.ArtworkGeneralDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.ArtworkGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectingAreasDetailSection;
@@ -245,6 +246,8 @@ import eu.etaxonomy.taxeditor.ui.section.occurrence.PreservedSpecimenDeterminati
 import eu.etaxonomy.taxeditor.ui.section.occurrence.PreservedSpecimenGeneralDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.PreservedSpecimenGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.PreservedSpecimenSourceCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.SequenceGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.SequenceGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.SourceCollectionDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailSection;
@@ -1638,6 +1641,18 @@ public class CdmFormFactory extends FormToolkit {
         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 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 SpecimenScanGeneralDetailSection createSpecimenScanGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
         SpecimenScanGeneralDetailSection section = new SpecimenScanGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
         addAndAdaptSection(parentElement, section);
@@ -1934,6 +1949,18 @@ public class CdmFormFactory extends FormToolkit {
         return element;
     }
 
+    public SequenceGeneralDetailElement createSequenceGeneralDetailElement(ICdmFormElement parentElement){
+        SequenceGeneralDetailElement element = new SequenceGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
+    public AmplificationGeneralDetailElement createAmplificationGeneralDetailElement(ICdmFormElement parentElement){
+        AmplificationGeneralDetailElement element = new AmplificationGeneralDetailElement(this, parentElement);
+        addAndAdaptElement(parentElement, element);
+        return element;
+    }
+
     public SpecimenScanGeneralDetailElement createSpecimenScanGeneralDetailElement(ICdmFormElement parentElement){
         SpecimenScanGeneralDetailElement element = new SpecimenScanGeneralDetailElement(this, parentElement);
         addAndAdaptElement(parentElement, element);
@@ -2180,12 +2207,6 @@ public class CdmFormFactory extends FormToolkit {
         return section;
     }
 
-    public AmplificationCollectionSection createAmplificationCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
-        AmplificationCollectionSection section = new AmplificationCollectionSection(this, conversation, parentElement, style);
-        addAndAdaptSection(parentElement, section);
-        return section;
-    }
-
     public GeographicalScopeDetailSection createGeographicalScopeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
         GeographicalScopeDetailSection section = new GeographicalScopeDetailSection(this, conversation, parentElement, style);
         addAndAdaptSection(parentElement, section);
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationCollectionSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationCollectionSection.java
deleted file mode 100644 (file)
index 599c67a..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-// $Id$
-/**
- * Copyright (C) 2013 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-package eu.etaxonomy.taxeditor.ui.section.occurrence;
-
-import java.util.Collection;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.molecular.Amplification;
-import eu.etaxonomy.cdm.model.molecular.DnaSample;
-import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
-
-/**
- * @author pplitzner
- * @date 17.12.2013
- *
- */
-public class AmplificationCollectionSection extends
-AbstractEntityCollectionSection<DnaSample, Amplification> {
-
-    public AmplificationCollectionSection(CdmFormFactory formFactory,
-            ConversationHolder conversation, ICdmFormElement parentElement, int style) {
-        super(formFactory, conversation, parentElement, "Amplifications", style);
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getCollection(java.lang.Object)
-     */
-    /** {@inheritDoc} */
-    @Override
-    public Collection<Amplification> getCollection(DnaSample entity) {
-        return entity.getAmplifications();
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#createNewElement()
-     */
-    /** {@inheritDoc} */
-    @Override
-    public Amplification createNewElement() {
-        return Amplification.NewInstance(getEntity());
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#addElement(eu.etaxonomy.cdm.model.common.IVersionableEntity)
-     */
-    /** {@inheritDoc} */
-    @Override
-    public void addElement(Amplification element) {
-        getEntity().addAmplification(element);
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#removeElement(eu.etaxonomy.cdm.model.common.IVersionableEntity)
-     */
-    /** {@inheritDoc} */
-    @Override
-    public void removeElement(Amplification element) {
-        getEntity().removeAmplification(element);
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getEmptyString()
-     */
-    /** {@inheritDoc} */
-    @Override
-    public String getEmptyString() {
-        return "No amplifications yet.";
-    }
-
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getTooltipString()
-     */
-    /** {@inheritDoc} */
-    @Override
-    protected String getTooltipString() {
-        return "Add amplification";
-    }
-
-}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationGeneralDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationGeneralDetailElement.java
new file mode 100644 (file)
index 0000000..ee8737c
--- /dev/null
@@ -0,0 +1,55 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.section.occurrence;
+
+import eu.etaxonomy.cdm.model.molecular.Amplification;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+
+/**
+ * @author pplitzner
+ * @date 19.12.2013
+ *
+ */
+public class AmplificationGeneralDetailElement extends AbstractCdmDetailElement<Amplification> {
+
+
+    /**
+     * @param formFactory
+     * @param formElement
+     */
+    public AmplificationGeneralDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
+        super(formFactory, formElement);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
+     * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int)
+     */
+    @Override
+    protected void createControls(ICdmFormElement formElement, Amplification entity, int style) {
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
+     * .lang.Object)
+     */
+    @Override
+    public void handleEvent(Object eventSource) {
+    }
+
+}
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationGeneralDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/AmplificationGeneralDetailSection.java
new file mode 100644 (file)
index 0000000..4eb6c19
--- /dev/null
@@ -0,0 +1,57 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.section.occurrence;
+
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.molecular.Amplification;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+
+/**
+ * @author pplitzner
+ * @date 19.12.2013
+ *
+ */
+public class AmplificationGeneralDetailSection extends AbstractCdmDetailSection<Amplification> {
+
+    /**
+     * @param formFactory
+     * @param conversation
+     * @param parentElement
+     * @param selectionProvider
+     * @param style
+     */
+    public AmplificationGeneralDetailSection(CdmFormFactory formFactory,
+            ConversationHolder conversation, ICdmFormElement parentElement,
+            ISelectionProvider selectionProvider, int style) {
+        super(formFactory, conversation, parentElement, selectionProvider, style);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getHeading()
+     */
+    @Override
+    public String getHeading() {
+        return "General Amplification";
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
+     */
+    @Override
+    protected AbstractCdmDetailElement<Amplification> createCdmDetailElement(AbstractCdmDetailSection<Amplification> parentElement, int style) {
+        return formFactory.createAmplificationGeneralDetailElement(parentElement);
+    }
+}
index 1939bcaa909d33f270f2a0a1796edaece144061c..4098709f2450720592ac831592cfe066b1b45a85 100644 (file)
@@ -23,7 +23,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  * @date 12.12.2013
  *
  */
-public class ArtworkGeneralDetailSection  extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection{
+public class ArtworkGeneralDetailSection  extends AbstractCdmDetailSection<DerivedUnitFacade> {
 
     /**
      * @param formFactory
index 9bfd7e990b34d25a2778c990fe3fdcfe1667bd59..4cd9eb74799e7ee72f76348f0d2555bd1b6b887c 100644 (file)
@@ -9,12 +9,9 @@
 */
 package eu.etaxonomy.taxeditor.ui.section.occurrence;
 
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
 import eu.etaxonomy.cdm.model.molecular.DnaSample;
 import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
 
 /**
@@ -24,8 +21,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  */
 public class DnaSampleGeneralDetailElement extends AbstractCdmDetailElement<DnaSample> {
 
-    private AmplificationCollectionSection amplificationCollectionSection;
-
     /**
      * @param formFactory
      * @param formElement
@@ -43,10 +38,6 @@ public class DnaSampleGeneralDetailElement extends AbstractCdmDetailElement<DnaS
      */
     @Override
     protected void createControls(ICdmFormElement formElement, DnaSample entity, int style) {
-
-        amplificationCollectionSection = formFactory.createAmplificationCollectionSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
-        amplificationCollectionSection.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-        amplificationCollectionSection.setEntity(entity);
     }
 
     /*
index 585437b080d1a3c522478691f9a6965ef3113a64..33ccbe4e4e52ea71cc343230533b5cb4191189dc 100644 (file)
@@ -23,7 +23,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  * @date 12.12.2013
  *
  */
-public class DnaSampleGeneralDetailSection extends AbstractCdmDetailSection<DnaSample> implements IDerivedUnitFacadeDetailSection{
+public class DnaSampleGeneralDetailSection extends AbstractCdmDetailSection<DnaSample> {
 
     /**
      * @param formFactory
index 005898ee8fc5a31ef8dc8c0575e4e2cb27590b97..db3459499d6dd95e20fa48105cd9d305f3653f46 100644 (file)
@@ -23,7 +23,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  * @date 12.12.2013
  *
  */
-public class LivingPlantPhotoGeneralDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection{
+public class LivingPlantPhotoGeneralDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> {
 
     /**
      * @param formFactory
index 3fa09b3678fcf494898791a8f709524e132d836d..d3cc0fd437a9e7d2fc581ef60933a4fdaf4f6fa7 100644 (file)
@@ -26,7 +26,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  * @created Jun 24, 2010
  * @version 1.0
  */
-public class PreservedSpecimenDetailSection extends AbstractCdmDetailSection<DerivedUnit> implements IDerivedUnitFacadeDetailSection{
+public class PreservedSpecimenDetailSection extends AbstractCdmDetailSection<DerivedUnit> {
 
        /**
         * <p>Constructor for DerivedUnitBaseDetailSection.</p>
index 7097f99e7526367d7ca4c9dd195983e00250b561..ba628f9066d59780bebde5778ee105d7c2177806 100644 (file)
@@ -24,7 +24,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  * @created May 11, 2011
  * @version 1.0
  */
-public class PreservedSpecimenDeterminationDetailSection extends AbstractCdmDetailSection<DerivedUnit> implements IDerivedUnitFacadeDetailSection {
+public class PreservedSpecimenDeterminationDetailSection extends AbstractCdmDetailSection<DerivedUnit> {
 
        /**
         * @param formFactory
index d541569c4918792534e3d8fd0dcc058ab52060cd..8a646c813dbcecf0070088ba7994f3c9b67e214c 100644 (file)
@@ -23,7 +23,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  * @date 17.12.2013
  *
  */
-public class PreservedSpecimenGeneralDetailSection extends AbstractCdmDetailSection<DerivedUnit> implements IDerivedUnitFacadeDetailSection{
+public class PreservedSpecimenGeneralDetailSection extends AbstractCdmDetailSection<DerivedUnit> {
 
     /**
      * @param formFactory
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SequenceGeneralDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SequenceGeneralDetailElement.java
new file mode 100644 (file)
index 0000000..6166c8b
--- /dev/null
@@ -0,0 +1,55 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.section.occurrence;
+
+import eu.etaxonomy.cdm.model.molecular.Sequence;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+
+/**
+ * @author pplitzner
+ * @date 19.12.2013
+ *
+ */
+public class SequenceGeneralDetailElement extends AbstractCdmDetailElement<Sequence> {
+
+
+    /**
+     * @param formFactory
+     * @param formElement
+     */
+    public SequenceGeneralDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
+        super(formFactory, formElement);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
+     * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int)
+     */
+    @Override
+    protected void createControls(ICdmFormElement formElement, Sequence entity, int style) {
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
+     * .lang.Object)
+     */
+    @Override
+    public void handleEvent(Object eventSource) {
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SequenceGeneralDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SequenceGeneralDetailSection.java
new file mode 100644 (file)
index 0000000..a76380c
--- /dev/null
@@ -0,0 +1,58 @@
+// $Id$
+/**
+* Copyright (C) 2013 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.section.occurrence;
+
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.model.molecular.Sequence;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+
+/**
+ * @author pplitzner
+ * @date 19.12.2013
+ *
+ */
+public class SequenceGeneralDetailSection extends AbstractCdmDetailSection<Sequence>{
+
+    /**
+     * @param formFactory
+     * @param conversation
+     * @param parentElement
+     * @param selectionProvider
+     * @param style
+     */
+    public SequenceGeneralDetailSection(CdmFormFactory formFactory,
+            ConversationHolder conversation, ICdmFormElement parentElement,
+            ISelectionProvider selectionProvider, int style) {
+        super(formFactory, conversation, parentElement, selectionProvider, style);
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getHeading()
+     */
+    @Override
+    public String getHeading() {
+        return "General Sequence";
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
+     */
+    @Override
+    protected AbstractCdmDetailElement<Sequence> createCdmDetailElement(AbstractCdmDetailSection<Sequence> parentElement, int style) {
+        return formFactory.createSequenceGeneralDetailElement(parentElement);
+    }
+
+}
index 211a9a5da234ec7c5309fec06170734712d708b6..ab01d2bce1ed77ba7d9d78b876200216aa8f83ec 100644 (file)
@@ -23,7 +23,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  * @date 12.12.2013
  *
  */
-public class SpecimenScanGeneralDetailSection  extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection{
+public class SpecimenScanGeneralDetailSection  extends AbstractCdmDetailSection<DerivedUnitFacade> {
 
     /**
      * @param formFactory
index c5450b424886b1fd5e77b8180fddb1c39221bbb8..3dacc51921784f45ee79537c56926f6a632f3a52 100644 (file)
@@ -23,8 +23,7 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
  * @date 12.12.2013
  *
  */
-public class TissueSampleGeneralDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> implements
-        IDerivedUnitFacadeDetailSection {
+public class TissueSampleGeneralDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> {
 
     /**
      * @param formFactory
index 0e148ad68c247ed6388f42870b21ddb178ab0341..950696328f922b85ad9778cc92291add749f3f0a 100644 (file)
@@ -18,7 +18,6 @@ import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.taxeditor.model.IElementHasDetails;
 import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
@@ -74,11 +73,7 @@ public class CdmSectionPart<T> extends SectionPart implements
                if (input instanceof IElementHasDetails) {
                        input = ((IElementHasDetails) input).getData();
                }
-               if(input instanceof DerivedUnit && ((DerivedUnit) input).getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen){
-                   // Do nothing! This is the case if the new DetailsViews are used that are based on
-                   // the DerivedUnits themselves instead of the DerivedUnitFacade
-               }
-               else if ((input instanceof TaxonBase)
+               if ((input instanceof TaxonBase)
                                && (formSection instanceof ITaxonBaseDetailSection)) {
                        ((ITaxonBaseDetailSection) formSection)
                                        .setTaxonBase((TaxonBase) input);
index e0aa10f80ed7c510df200fe262f40dc2af2b8855..0d097af1e86fcf759e51d6426430bbb208087429 100644 (file)
@@ -38,10 +38,12 @@ import eu.etaxonomy.cdm.model.description.PolytomousKey;
 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
 import eu.etaxonomy.cdm.model.description.SpecimenDescription;
 import eu.etaxonomy.cdm.model.media.Media;
-import eu.etaxonomy.cdm.model.molecular.DnaSample;
+import eu.etaxonomy.cdm.model.molecular.Amplification;
+import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.cdm.model.name.NonViralName;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
@@ -79,6 +81,7 @@ import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
 import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
 import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.AmplificationGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.ArtworkGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
@@ -91,6 +94,7 @@ import eu.etaxonomy.taxeditor.ui.section.occurrence.LivingPlantPhotoGeneralDetai
 import eu.etaxonomy.taxeditor.ui.section.occurrence.PreservedSpecimenDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.PreservedSpecimenDeterminationDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.PreservedSpecimenGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.SequenceGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenScanGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.TissueSampleGeneralDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
@@ -118,107 +122,106 @@ import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
  */
 public class DetailsViewer extends AbstractCdmDataViewer {
 
-       private ISelection selection;
-
-       /**
-        * <p>
-        * Constructor for DetailsViewer.
-        * </p>
-        *
-        * @param parent
-        *            a {@link org.eclipse.swt.widgets.Composite} object.
-        * @param viewPart
-        *            a {@link eu.etaxonomy.taxeditor.view.AbstractCdmViewPart}
-        *            object.
-        */
-       public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
-               super(parent, viewPart);
-       }
-
-       // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
-       // since we are getting implementations of DerivedUnitBase from the bulk
-       // editor
-       // and not derived unit facade objects,
-
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * eu.etaxonomy.taxeditor.editor.view.AbstractCdmDataViewer#setInput(java
-        * .lang.Object)
-        */
-       @Override
-       public void setInput(Object input) {
-           if(input instanceof DnaSample){
-
-           }
-           else if (input instanceof DerivedUnit) {
-               if(((DerivedUnit) input).getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen){
-                // Do nothing! This is the case if the new DetailsViews are used that are based on
-                // the DerivedUnits themselves instead of the DerivedUnitFacade
-               }
-               else {
+    private ISelection selection;
+
+    /**
+     * <p>
+     * Constructor for DetailsViewer.
+     * </p>
+     *
+     * @param parent
+     *            a {@link org.eclipse.swt.widgets.Composite} object.
+     * @param viewPart
+     *            a {@link eu.etaxonomy.taxeditor.view.AbstractCdmViewPart}
+     *            object.
+     */
+    public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
+        super(parent, viewPart);
+    }
+
+    // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
+    // since we are getting implementations of DerivedUnitBase from the bulk
+    // editor
+    // and not derived unit facade objects,
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * eu.etaxonomy.taxeditor.editor.view.AbstractCdmDataViewer#setInput(java
+     * .lang.Object)
+     */
+    @Override
+    public void setInput(Object input) {
+        if (input instanceof DerivedUnit) {
+            DerivedUnit derivedUnit = (DerivedUnit)input;
+            if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen
+                    ||derivedUnit.getRecordBasis()==SpecimenOrObservationType.DnaSample){
+                // Do nothing! This is the case if the new DetailsViews are used that are based on
+                // the DerivedUnits themselves instead of the DerivedUnitFacade
+            }
+            else {
                 try {
-                    input = DerivedUnitFacade.NewInstance((DerivedUnit) input,
+                    input = DerivedUnitFacade.NewInstance(derivedUnit,
                             PreferencesUtil.getDerivedUnitConfigurator());
                 } catch (DerivedUnitFacadeNotSupportedException e) {
                     AbstractUtility.error(getClass(), e);
                 }
             }
-               }
-               else if(input instanceof FieldUnit){
-                   input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
-               }
-               super.setInput(input);
-       }
-
-       @Override
-       protected void markViewPartDirty() {
-               if (getInput() instanceof DerivedUnitFacade) {
-                   DerivedUnitFacade facade = (DerivedUnitFacade) getInput();
-                   if(facade.innerDerivedUnit()!=null){
-                       getViewPart().changed(facade.innerDerivedUnit());
-                   }
-                   else if(facade.innerFieldUnit()!=null){
-                       getViewPart().changed(facade.innerFieldUnit());
-                   }
-               }
-
-               super.markViewPartDirty();
-       }
-
-       // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
-
-       /*
-        * (non-Javadoc)
-        *
-        * @see org.eclipse.jface.viewers.Viewer#refresh()
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected void showParts() {
-           // FIXME (CM) : Need to clean out this code.
-           // Too much type checking to decide which detail view to display.
-           // Need to build in a mechanism where navigators / editors are 'aware'
-           // of the corresponding detail viewer.
+        }
+        else if(input instanceof FieldUnit){
+            input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
+        }
+        super.setInput(input);
+    }
+
+    @Override
+    protected void markViewPartDirty() {
+        if (getInput() instanceof DerivedUnitFacade) {
+            DerivedUnitFacade facade = (DerivedUnitFacade) getInput();
+            if(facade.innerDerivedUnit()!=null){
+                getViewPart().changed(facade.innerDerivedUnit());
+            }
+            else if(facade.innerFieldUnit()!=null){
+                getViewPart().changed(facade.innerFieldUnit());
+            }
+        }
+
+        super.markViewPartDirty();
+    }
+
+    // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.eclipse.jface.viewers.Viewer#refresh()
+     */
+    /** {@inheritDoc} */
+    @Override
+    protected void showParts() {
+        // FIXME (CM) : Need to clean out this code.
+        // Too much type checking to decide which detail view to display.
+        // Need to build in a mechanism where navigators / editors are 'aware'
+        // of the corresponding detail viewer.
         Object input = getInput();
         if (input instanceof TaxonBase) {
-                       createTaxonSections(rootElement);
+            createTaxonSections(rootElement);
 
         } else if (input instanceof NonViralName) {
-                       createNameSections(rootElement);
+            createNameSections(rootElement);
 
         } else if (input instanceof Reference) {
-                       createReferenceSections(rootElement);
+            createReferenceSections(rootElement);
 
         } else if (input instanceof Team) {
-                       createTeamDetailSection(rootElement);
+            createTeamDetailSection(rootElement);
 
         } else if (input instanceof Person) {
-                       createPersonDetailSection(rootElement);
+            createPersonDetailSection(rootElement);
 
         } else if (input instanceof TeamOrPersonBase) {
-                       createTeamOrPersonBaseDetailSection(rootElement);
+            createTeamOrPersonBaseDetailSection(rootElement);
 
         } else if (input instanceof DescriptionBase) {
             if(input instanceof SpecimenDescription){
@@ -249,21 +252,21 @@ public class DetailsViewer extends AbstractCdmDataViewer {
             Set<Marker> descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
             MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(
                     UsageTermCollection.uuidUseMarkerType);
-                       Boolean isUseDescription = false;
-                       for (Marker marker : descriptionMarkers) {
-                               if (marker.getMarkerType().equals(useMarkertype)) {
-                                       isUseDescription = true;
-                               }
-                       }
+            Boolean isUseDescription = false;
+            for (Marker marker : descriptionMarkers) {
+                if (marker.getMarkerType().equals(useMarkertype)) {
+                    isUseDescription = true;
+                }
+            }
 
             if (isUseDescription == true && input instanceof CategoricalData) {
-                               createUseRecordSection(rootElement);
+                createUseRecordSection(rootElement);
             } else {
-                               createDescriptionElementSection(rootElement);
-                       }
+                createDescriptionElementSection(rootElement);
+            }
 
         } else if (input instanceof Media) {
-                       createMediaElementSection(rootElement);
+            createMediaElementSection(rootElement);
 
         } else if (input instanceof DerivedUnitFacade) {
             if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
@@ -275,9 +278,9 @@ public class DetailsViewer extends AbstractCdmDataViewer {
             else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){
                 createTissueSampleSection(rootElement);
             }
-//            else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.DnaSample){
-//                createDnaSampleSection(rootElement);
-//            }
+            //            else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.DnaSample){
+            //                createDnaSampleSection(rootElement);
+            //            }
             //FIXME: change to specific SpecimenOrObservationType
             else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.StillImage){
                 createSpecimenScanSection(rootElement);
@@ -291,394 +294,400 @@ public class DetailsViewer extends AbstractCdmDataViewer {
             else{
                 createDerivedUnitBaseElementSection(rootElement);
             }
-
-        } else if(input instanceof DnaSample){
-            createDnaSampleSection(rootElement);
-        } else if (input instanceof FieldUnit) {
-            createFieldUnitSection(rootElement);
-
-        } else if (input instanceof DerivedUnit){
-            SpecimenOrObservationType recordBasis = ((DerivedUnit) input).getRecordBasis();
+        } else if (input instanceof SpecimenOrObservationBase){
+            SpecimenOrObservationType recordBasis = ((SpecimenOrObservationBase<?>) input).getRecordBasis();
             if(recordBasis==SpecimenOrObservationType.PreservedSpecimen){
                 createPreservedSpecimenSpecimenSection(rootElement);
             }
+            else if(recordBasis==SpecimenOrObservationType.FieldUnit){
+                createFieldUnitSection(rootElement);
+            }
+            else if(recordBasis==SpecimenOrObservationType.DnaSample){
+                createDnaSampleSection(rootElement);
+            }
+        }
+        else if(input instanceof Amplification){
+            createAmplificationSection(rootElement);
+        }
+        else if(input instanceof Sequence){
+            createSequenceSection(rootElement);
         }
         else if (input instanceof FeatureNodeContainer) {
-                       createFeatureDistributionSection(rootElement);
+            createFeatureDistributionSection(rootElement);
 
         } else if (input instanceof PolytomousKey) {
-                       //createPolytomousKeySection(rootElement);
+            //createPolytomousKeySection(rootElement);
 
         } else if ((input instanceof PolytomousKeyNode) || (input instanceof PolytomousKeyRelationship)) {
-                       createPolytomousKeyNodeSection(rootElement);
+            createPolytomousKeyNodeSection(rootElement);
         } else if (input instanceof User) {
-                       createUserSection(rootElement);
+            createUserSection(rootElement);
         } else if (input instanceof Group) {
-                       createGroupSection(rootElement);
+            createGroupSection(rootElement);
         } else if (input instanceof TaxonRelationship) {
-                       createTaxonRelationshipSection(rootElement);
+            createTaxonRelationshipSection(rootElement);
         } else if (input instanceof TermVocabulary) {
-                       createTermVocabularySection(rootElement);
+            createTermVocabularySection(rootElement);
         } else if (input instanceof DefinedTermBase) {
-                       createDefinedTermSection(rootElement);
-               } else {
-                       destroySections();
-               }
-               layout();
-       }
+            createDefinedTermSection(rootElement);
+        } else {
+            destroySections();
+        }
+        layout();
+    }
 
 
-       /**
-        * @param rootElement
-        */
-       private void createGroupSection(RootElement parent) {
-               destroySections();
+    /**
+     * @param rootElement
+     */
+    private void createGroupSection(RootElement parent) {
+        destroySections();
 
         GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
         MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               addPart(groupDetailSection);
-               addPart(memberDetailSection);
-               addPart(grantedAuthorityDetailSection);
-       }
-
-       /*
-        * (non-Javadoc)
-        *
-        * @see org.eclipse.jface.viewers.Viewer#getSelection()
-        */
-       /** {@inheritDoc} */
-       @Override
-       public ISelection getSelection() {
-               return selection;
-       }
-
-       /*
-        * (non-Javadoc)
-        *
-        * @see
-        * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
-        * .ISelection, boolean)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void setSelection(ISelection selection, boolean reveal) {
-               this.selection = selection;
+        addPart(groupDetailSection);
+        addPart(memberDetailSection);
+        addPart(grantedAuthorityDetailSection);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.eclipse.jface.viewers.Viewer#getSelection()
+     */
+    /** {@inheritDoc} */
+    @Override
+    public ISelection getSelection() {
+        return selection;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
+     * .ISelection, boolean)
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void setSelection(ISelection selection, boolean reveal) {
+        this.selection = selection;
         SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
-               fireSelectionChanged(selectionChangedEvent);
-       }
+        fireSelectionChanged(selectionChangedEvent);
+    }
 
-       /**
-        * createTaxonSections(RootElement parent)
+    /**
+     * createTaxonSections(RootElement parent)
      *
-        * @param parent
-        */
-       private void createTaxonSections(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createTaxonSections(RootElement parent) {
+        destroySections();
 
         TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
+                | ExpandableComposite.EXPANDED);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this, ExpandableComposite.EXPANDED);
 
-               addPart(taxonBaseDetailSection);
-               addPart(nonViralNameSection);
-               addPart(nomenclaturalStatusSection);
-               addPart(protologSection);
-               addPart(referenceDetailSection);
-               addPart(typeDesignationSection);
-               addPart(nameRelationshipSection);
-               addPart(parsingMessagesSection);
-       }
-
-       /**
-        * createNameSections
+        addPart(taxonBaseDetailSection);
+        addPart(nonViralNameSection);
+        addPart(nomenclaturalStatusSection);
+        addPart(protologSection);
+        addPart(referenceDetailSection);
+        addPart(typeDesignationSection);
+        addPart(nameRelationshipSection);
+        addPart(parsingMessagesSection);
+    }
+
+    /**
+     * createNameSections
      *
-        * @param parent
-        */
-       private void createNameSections(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createNameSections(RootElement parent) {
+        destroySections();
         NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-               addPart(nonViralNameSection);
-               addPart(nomenclaturalStatusSection);
-               addPart(protologSection);
-               addPart(referenceDetailSection);
-               addPart(typeDesignationSection);
-               addPart(nameRelationshipSection);
-       }
+        addPart(nonViralNameSection);
+        addPart(nomenclaturalStatusSection);
+        addPart(protologSection);
+        addPart(referenceDetailSection);
+        addPart(typeDesignationSection);
+        addPart(nameRelationshipSection);
+    }
 
-       /**
-        * createReferenceSections
+    /**
+     * createReferenceSections
      *
-        * @param parent
-        */
-       private void createReferenceSections(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createReferenceSections(RootElement parent) {
+        destroySections();
 
         ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               addPart(referenceDetailSection);
-       }
+        addPart(referenceDetailSection);
+    }
 
-       /**
-        * createTeamOrPersonBaseDetailSection
+    /**
+     * createTeamOrPersonBaseDetailSection
      *
-        * @param parent
-        */
-       private void createTeamOrPersonBaseDetailSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createTeamOrPersonBaseDetailSection(RootElement parent) {
+        destroySections();
         TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               addPart(teamOrPersonBaseDetailSection);
-       }
+        addPart(teamOrPersonBaseDetailSection);
+    }
 
-       /**
-        * createTeamDetailSection
+    /**
+     * createTeamDetailSection
      *
-        * @param parent
-        */
-       private void createTeamDetailSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createTeamDetailSection(RootElement parent) {
+        destroySections();
         TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               addPart(teamDetailSection);
-       }
+        addPart(teamDetailSection);
+    }
 
-       /**
-        * createPersonDetailSection
+    /**
+     * createPersonDetailSection
      *
-        * @param parent
-        */
-       private void createPersonDetailSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createPersonDetailSection(RootElement parent) {
+        destroySections();
         PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-               addPart(personDetailSection);
-       }
+        addPart(personDetailSection);
+    }
 
-       /**
-        * createDescriptionElementSection
+    /**
+     * createDescriptionElementSection
      *
-        * @param parent
-        */
-       private void createDescriptionElementSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createDescriptionElementSection(RootElement parent) {
+        destroySections();
 
         DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-               addPart(descriptionElementDetailSection);
-               addPart(descriptionElementSourceSection);
-               addPart(descriptionElementMediaSection);
-       }
+        addPart(descriptionElementDetailSection);
+        addPart(descriptionElementSourceSection);
+        addPart(descriptionElementMediaSection);
+    }
 
-       /**
-        * createDescriptionSection
+    /**
+     * createDescriptionSection
      *
-        * @param parent
-        */
-       private void createDescriptionSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createDescriptionSection(RootElement parent) {
+        destroySections();
         DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-//             DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
-//                             .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
-//                                             getConversationHolder(), parent, Section.TWISTIE);
-//
-//             formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        //             DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
+        //                             .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
+        //                                             getConversationHolder(), parent, Section.TWISTIE);
+        //
+        //             formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-               addPart(descriptionDetailSection);
-               addPart(naturalLanguageSection);
-               addPart(describedSpecimenSection);
-//             addPart(descriptionSourceSection);
-               addPart(scopeSection);
-       }
-
-       /**
-        * createDescriptionSection
-        *
-        * @param parent
-        */
-       private void createSpecimenDescriptionSection(RootElement parent) {
-           destroySections();
-           DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-           addPart(descriptionDetailSection);
-       }
-
-       /**
-        * Creates the use Description section
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+        addPart(descriptionDetailSection);
+        addPart(naturalLanguageSection);
+        addPart(describedSpecimenSection);
+        //             addPart(descriptionSourceSection);
+        addPart(scopeSection);
+    }
+
+    /**
+     * createDescriptionSection
      *
-        * @param parent
-        */
-       private void createUseDescriptionSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createSpecimenDescriptionSection(RootElement parent) {
+        destroySections();
         DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        addPart(descriptionDetailSection);
+    }
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+    /**
+     * Creates the use Description section
+     *
+     * @param parent
+     */
+    private void createUseDescriptionSection(RootElement parent) {
+        destroySections();
+        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-               addPart(descriptionDetailSection);
-               addPart(descriptionSourceSection);
+        addPart(descriptionDetailSection);
+        addPart(descriptionSourceSection);
 
-       }
+    }
 
 
-       /**
-        * @param rootElement
-        */
-       private void createImageGallerySection(RootElement parent) {
-               destroySections();
+    /**
+     * @param rootElement
+     */
+    private void createImageGallerySection(RootElement parent) {
+        destroySections();
         DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               addPart(descriptionDetailSection);
-       }
+        addPart(descriptionDetailSection);
+    }
 
-       /**
-        * createMediaElementSection
+    /**
+     * createMediaElementSection
      *
-        * @param parent
-        */
+     * @param parent
+     */
 
-       private void createMediaElementSection(RootElement parent) {
-               destroySections();
+    private void createMediaElementSection(RootElement parent) {
+        destroySections();
         MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               addPart(mediaDetailSection);
-       }
+        addPart(mediaDetailSection);
+    }
 
-       /**
-        * createDerivedUnitBaseElementSection
+    /**
+     * createDerivedUnitBaseElementSection
      *
-        * @param parent
-        */
-       private void createDerivedUnitBaseElementSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createDerivedUnitBaseElementSection(RootElement parent) {
+        destroySections();
 
         DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-               addPart(derivedUnitGeneralDetailSection);
-               addPart(gatheringEventDetailSection);
-               addPart(fieldUnitDetailSection);
-               addPart(derivedUnitBaseDetailSection);
-               addPart(determinationDetailSection);
+        addPart(derivedUnitGeneralDetailSection);
+        addPart(gatheringEventDetailSection);
+        addPart(fieldUnitDetailSection);
+        addPart(derivedUnitBaseDetailSection);
+        addPart(determinationDetailSection);
 
-       }
+    }
 
-       private void createFieldUnitSection(RootElement parent) {
-           destroySections();
+    private void createFieldUnitSection(RootElement parent) {
+        destroySections();
 
-           FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-           formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-           GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-           formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-           FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+        FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
-           addPart(fielUnitGeneralDetailSection);
-           addPart(gatheringEventDetailSection);
-           addPart(fieldUnitDetailSection);
-       }
+        addPart(fielUnitGeneralDetailSection);
+        addPart(gatheringEventDetailSection);
+        addPart(fieldUnitDetailSection);
+    }
 
-       private void createPreservedSpecimenSpecimenSection(RootElement parent) {
-           destroySections();
+    private void createPreservedSpecimenSpecimenSection(RootElement parent) {
+        destroySections();
 
-           PreservedSpecimenGeneralDetailSection section = formFactory.createPreservedSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        PreservedSpecimenGeneralDetailSection section = formFactory.createPreservedSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-           formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
         PreservedSpecimenDetailSection derivedUnitBaseDetailSection = formFactory.createPreservedSpecimenDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
@@ -689,74 +698,92 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         addPart(section);
         addPart(derivedUnitBaseDetailSection);
         addPart(determinationDetailSection);
-       }
+    }
 
-       private void createTissueSampleSection(RootElement parent) {
-           destroySections();
+    private void createTissueSampleSection(RootElement parent) {
+        destroySections();
 
-           TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-           formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-           addPart(section);
-       }
+        addPart(section);
+    }
 
-       private void createDnaSampleSection(RootElement parent) {
-           destroySections();
-           DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+    private void createDnaSampleSection(RootElement parent) {
+        destroySections();
+        DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-           formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-           addPart(section);
-       }
+        addPart(section);
+    }
 
-       private void createSpecimenScanSection(RootElement parent) {
-           destroySections();
-           SpecimenScanGeneralDetailSection section = formFactory.createSpecimenScanGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+    private void createAmplificationSection(RootElement parent) {
+        destroySections();
+        AmplificationGeneralDetailSection section = formFactory.createAmplificationGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-           formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-           addPart(section);
-       }
+        addPart(section);
+    }
 
-       private void createLivingPlantPhotoSection(RootElement parent) {
-           destroySections();
-           LivingPlantPhotoGeneralDetailSection section = formFactory.createLivingPlantPhotoGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+    private void createSequenceSection(RootElement parent) {
+        destroySections();
+        SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-           formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-           addPart(section);
-       }
+        addPart(section);
+    }
 
-       private void createArtworkSection(RootElement parent) {
-           destroySections();
-           ArtworkGeneralDetailSection section = formFactory.createArtworkGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+    private void createSpecimenScanSection(RootElement parent) {
+        destroySections();
+        SpecimenScanGeneralDetailSection section = formFactory.createSpecimenScanGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-           formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-           addPart(section);
-       }
+        addPart(section);
+    }
 
+    private void createLivingPlantPhotoSection(RootElement parent) {
+        destroySections();
+        LivingPlantPhotoGeneralDetailSection section = formFactory.createLivingPlantPhotoGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+        addPart(section);
+    }
+
+    private void createArtworkSection(RootElement parent) {
+        destroySections();
+        ArtworkGeneralDetailSection section = formFactory.createArtworkGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+        addPart(section);
+    }
 
 
-       /**
-        * @param rootElement
-        */
-       private void createFeatureDistributionSection(RootElement parent) {
-               destroySections();
+
+    /**
+     * @param rootElement
+     */
+    private void createFeatureDistributionSection(RootElement parent) {
+        destroySections();
 
         FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               addPart(featureDistributionSection);
-       }
+        addPart(featureDistributionSection);
+    }
 
-       /**
-        * createPolytomousKeyNodeSection
+    /**
+     * createPolytomousKeyNodeSection
      *
-        * @param parent
-        */
-       private void createPolytomousKeyNodeSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createPolytomousKeyNodeSection(RootElement parent) {
+        destroySections();
 
         PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
 
@@ -768,80 +795,80 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         TaxonomicScopeSection taxonomicScopeSection = formFactory.createTaxonomicScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
 
-           addPart(polytomousKeyDetailSection);
-           addPart(polytomousKeyNodeDetailSection);
-           addPart(taxonomicScopeSection);
+        addPart(polytomousKeyDetailSection);
+        addPart(polytomousKeyNodeDetailSection);
+        addPart(taxonomicScopeSection);
 
-       }
+    }
 
-       /**
-        * create the UseRecordSection
+    /**
+     * create the UseRecordSection
      *
-        * @param parent
-        */
-       private void createUseRecordSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createUseRecordSection(RootElement parent) {
+        destroySections();
 
         UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-               addPart(descriptionUseRecordSection);
+        addPart(descriptionUseRecordSection);
 
 
-       }
+    }
 
-       /**
-        * createUserSection
+    /**
+     * createUserSection
      *
-        * @param parent
-        */
-       private void createUserSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createUserSection(RootElement parent) {
+        destroySections();
 
         UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-               addPart(userDetailSection);
-               addPart(groupByUserDetailSection);
-       }
+        addPart(userDetailSection);
+        addPart(groupByUserDetailSection);
+    }
 
-       /**
-        * createTaxonRelationshipSection
+    /**
+     * createTaxonRelationshipSection
      *
-        * @param parent
-        */
-       private void createTaxonRelationshipSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createTaxonRelationshipSection(RootElement parent) {
+        destroySections();
 
         TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-               addPart(taxonRelationshipDetailSection);
-               addPart(referencedEntityBaseDetailSection);
-       }
+        addPart(taxonRelationshipDetailSection);
+        addPart(referencedEntityBaseDetailSection);
+    }
 
-       /**
-        * @param rootElement
-        */
-       private void createTermVocabularySection(RootElement parent) {
-               destroySections();
+    /**
+     * @param rootElement
+     */
+    private void createTermVocabularySection(RootElement parent) {
+        destroySections();
 
         TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-               addPart(termVocabularyDetailSection);
-       }
+        addPart(termVocabularyDetailSection);
+    }
 
-       /**
-        * createDefinedTermSection
+    /**
+     * createDefinedTermSection
      *
-        * @param parent
-        */
-       private void createDefinedTermSection(RootElement parent) {
-               destroySections();
+     * @param parent
+     */
+    private void createDefinedTermSection(RootElement parent) {
+        destroySections();
 
         AbstractFormSection definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-               addPart(definedTermDetailSection);
-       }
+        addPart(definedTermDetailSection);
+    }
 
 }