- fixed initial setting of parameters of GatheringEventDescription
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / view / detail / DetailsViewer.java
index c292c7efc6823ca19121d5821f0303745da89616..be8f7a5bddbe503c250977d1178e3238f233e179 100644 (file)
@@ -48,8 +48,6 @@ import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
 import eu.etaxonomy.taxeditor.ui.element.RootElement;
 import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailSection;
@@ -76,8 +74,6 @@ 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.DerivedUnitBaseDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldObservationDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.occurrence.GeneralDetailSection;
@@ -262,15 +258,9 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createGroupSection(RootElement parent) {
         destroySections();
 
-        GroupDetailSection groupDetailSection = (GroupDetailSection) formFactory.createCdmDetailSection(
-                DetailType.GROUP, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
-        MemberDetailSection memberDetailSection = (MemberDetailSection) formFactory.createEntityDetailSection(
-                EntityDetailType.MEMBER, getConversationHolder(), parent, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
-        GrantedAuthorityDetailSection grantedAuthorityDetailSection = (GrantedAuthorityDetailSection) formFactory
-                .createEntityDetailSection(EntityDetailType.GRANTED_AUTHORITY, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        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);
@@ -311,47 +301,36 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createTaxonSections(RootElement parent) {
         destroySections();
 
-        TaxonBaseDetailSection taxonBaseDetailSection = (TaxonBaseDetailSection) formFactory.createCdmDetailSection(
-                DetailType.TAXONBASE, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+        TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NonViralNameDetailSection nonViralNameSection = (NonViralNameDetailSection) formFactory.createCdmDetailSection(
-                DetailType.NONVIRALNAME, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
+        NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
                         | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NomenclaturalReferenceDetailSection referenceDetailSection = (NomenclaturalReferenceDetailSection) formFactory
-                .createCdmDetailSection(DetailType.NOMENCLATURALREFERENCE, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE);
+        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NomenclaturalStatusSection nomenclaturalStatusSection = (NomenclaturalStatusSection) formFactory
-                .createEntityDetailSection(EntityDetailType.NOMENCLATURALSTATUS, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE);
+        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        ProtologueSection protologSection = (ProtologueSection) formFactory.createEntityDetailSection(
-                EntityDetailType.PROTOLOG, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        TypeDesignationSection typeDesignationSection = (TypeDesignationSection) formFactory.createEntityDetailSection(
-                EntityDetailType.TYPEDESIGNATION, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NameRelationshipDetailSection nameRelationshipSection = (NameRelationshipDetailSection) formFactory
-                .createEntityDetailSection(EntityDetailType.NAME_RELATIONSHIP, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE);
+        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        ParsingMessagesSection parsingMessagesSection = (ParsingMessagesSection) formFactory.createCdmDetailSection(
-                DetailType.PARSINGMESSAGE, getConversationHolder(), parent, this, ExpandableComposite.EXPANDED);
+        ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this, ExpandableComposite.EXPANDED);
 
         addPart(taxonBaseDetailSection);
         addPart(nonViralNameSection);
@@ -370,37 +349,27 @@ public class DetailsViewer extends AbstractCdmDataViewer {
      */
     private void createNameSections(RootElement parent) {
         destroySections();
-        NonViralNameDetailSection nonViralNameSection = (NonViralNameDetailSection) formFactory.createCdmDetailSection(
-                DetailType.NONVIRALNAME, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
+        NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NomenclaturalReferenceDetailSection referenceDetailSection = (NomenclaturalReferenceDetailSection) formFactory
-                .createCdmDetailSection(DetailType.NOMENCLATURALREFERENCE, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE);
+        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NomenclaturalStatusSection nomenclaturalStatusSection = (NomenclaturalStatusSection) formFactory
-                .createEntityDetailSection(EntityDetailType.NOMENCLATURALSTATUS, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE);
+        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        ProtologueSection protologSection = (ProtologueSection) formFactory.createEntityDetailSection(
-                EntityDetailType.PROTOLOG, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        TypeDesignationSection typeDesignationSection = (TypeDesignationSection) formFactory.createEntityDetailSection(
-                EntityDetailType.TYPEDESIGNATION, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NameRelationshipDetailSection nameRelationshipSection = (NameRelationshipDetailSection) formFactory
-                .createEntityDetailSection(EntityDetailType.NAME_RELATIONSHIP, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE);
+        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -420,9 +389,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createReferenceSections(RootElement parent) {
         destroySections();
 
-        ReferenceDetailSection referenceDetailSection = (ReferenceDetailSection) formFactory.createCdmDetailSection(
-                DetailType.REFERENCEBASE, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
+        ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         addPart(referenceDetailSection);
     }
@@ -434,9 +401,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
      */
     private void createTeamOrPersonBaseDetailSection(RootElement parent) {
         destroySections();
-        TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = (TeamOrPersonBaseDetailSection) formFactory
-                .createCdmDetailSection(DetailType.TEAMORPERSONBASE, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         addPart(teamOrPersonBaseDetailSection);
     }
@@ -448,8 +413,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
      */
     private void createTeamDetailSection(RootElement parent) {
         destroySections();
-        TeamDetailSection teamDetailSection = (TeamDetailSection) formFactory.createCdmDetailSection(DetailType.TEAM,
-                getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         addPart(teamDetailSection);
     }
@@ -461,9 +425,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
      */
     private void createPersonDetailSection(RootElement parent) {
         destroySections();
-        PersonDetailSection personDetailSection = (PersonDetailSection) formFactory.createCdmDetailSection(
-                DetailType.PERSON, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
+        PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         addPart(personDetailSection);
     }
 
@@ -475,21 +437,15 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createDescriptionElementSection(RootElement parent) {
         destroySections();
 
-        DescriptionElementDetailSection descriptionElementDetailSection = (DescriptionElementDetailSection) formFactory
-                .createCdmDetailSection(DetailType.DESCRIPTIONELEMENT, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescriptionElementSourceSection descriptionElementSourceSection = (DescriptionElementSourceSection) formFactory
-                .createEntityDetailSection(EntityDetailType.DESCRIPTIONELEMENTSOURCE, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE);
+        DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescriptionElementMediaSection descriptionElementMediaSection = (DescriptionElementMediaSection) formFactory
-                .createEntityDetailSection(EntityDetailType.DESCRIPTIONELEMENTMEDIA, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE);
+        DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -505,32 +461,23 @@ public class DetailsViewer extends AbstractCdmDataViewer {
      */
     private void createDescriptionSection(RootElement parent) {
         destroySections();
-        DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
-                .createCdmDetailSection(DetailType.DESCRIPTION, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NaturalLanguageSection naturalLanguageSection = (NaturalLanguageSection) formFactory.createCdmDetailSection(
-                DetailType.NATURAL_LANGUAGE, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
+        NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescribedSpecimenSection describedSpecimenSection = (DescribedSpecimenSection) formFactory
-                .createEntityDetailSection(EntityDetailType.DESCRIBED_SPECIMEN, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE);
+        DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
-                .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE);
+        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        ScopeSection scopeSection = (ScopeSection) formFactory.createEntityDetailSection(EntityDetailType.SCOPE,
-                getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -548,15 +495,11 @@ public class DetailsViewer extends AbstractCdmDataViewer {
      */
     private void createUseDescriptionSection(RootElement parent) {
         destroySections();
-        DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
-                .createCdmDetailSection(DetailType.DESCRIPTION, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
-                .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -570,9 +513,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
      */
     private void createImageGallerySection(RootElement parent) {
         destroySections();
-        DescriptionDetailSection descriptionDetailSection = (DescriptionDetailSection) formFactory
-                .createCdmDetailSection(DetailType.DESCRIPTION, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         addPart(descriptionDetailSection);
     }
@@ -585,9 +526,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
     private void createMediaElementSection(RootElement parent) {
         destroySections();
-        MediaDetailsSection mediaDetailSection = (MediaDetailsSection) formFactory.createCdmDetailSection(
-                DetailType.MEDIA, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
+        MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         addPart(mediaDetailSection);
     }
@@ -600,40 +539,29 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createDerivedUnitBaseElementSection(RootElement parent) {
         destroySections();
 
-        GeneralDetailSection generalDetailSection = (GeneralDetailSection) formFactory.createCdmDetailSection(
-                DetailType.DERIVED_UNIT_GENERAL, getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        GatheringEventDetailSection gatheringEventDetailSection = (GatheringEventDetailSection) formFactory
-                .createCdmDetailSection(DetailType.GATHERING_EVENT, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE);
+        GeneralDetailSection generalDetailSection = formFactory.createGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        FieldObservationDetailSection fieldObservationDetailSection = (FieldObservationDetailSection) formFactory
-                .createCdmDetailSection(DetailType.FIELD_OBSERVATION, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE);
+        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = (DerivedUnitBaseDetailSection) formFactory
-                .createCdmDetailSection(DetailType.DERIVED_UNIT, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE);
+        FieldObservationDetailSection fieldObservationDetailSection = formFactory.createFieldObservationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DeterminationDetailSection determinationDetailSection = (DeterminationDetailSection) formFactory
-                .createCdmDetailSection(DetailType.DETERMINATION, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE);
+//        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+//
+//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+//
+//        DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
 
         addPart(generalDetailSection);
         addPart(gatheringEventDetailSection);
         addPart(fieldObservationDetailSection);
-        addPart(derivedUnitBaseDetailSection);
-        addPart(determinationDetailSection);
-
+//        addPart(derivedUnitBaseDetailSection);
+//        addPart(determinationDetailSection);
     }
 
     /**
@@ -642,9 +570,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createFeatureDistributionSection(RootElement parent) {
         destroySections();
 
-        FeatureDistributionDetailSection featureDistributionSection = (FeatureDistributionDetailSection) formFactory
-                .createCdmDetailSection(DetailType.FEATURE_DISTRIBUTION, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         addPart(featureDistributionSection);
     }
@@ -657,21 +583,15 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createPolytomousKeyNodeSection(RootElement parent) {
         destroySections();
 
-        PolytomousKeyDetailSection polytomousKeyDetailSection = (PolytomousKeyDetailSection) formFactory
-                .createCdmDetailSection(DetailType.POLYTOMOUS_KEY, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
+        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = (PolytomousKeyNodeDetailSection) formFactory
-                .createCdmDetailSection(DetailType.POLYTOMOUS_KEY_NODE, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        TaxonomicScopeSection taxonomicScopeSection = (TaxonomicScopeSection) formFactory.createEntityDetailSection(
-                EntityDetailType.TAXONOMIC_SCOPE, getConversationHolder(), parent, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.COMPACT);
+        TaxonomicScopeSection taxonomicScopeSection = formFactory.createTaxonomicScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
 
         addPart(polytomousKeyDetailSection);
         addPart(polytomousKeyNodeDetailSection);
@@ -687,9 +607,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createUseRecordSection(RootElement parent) {
         destroySections();
 
-        UseRecordDetailSection descriptionUseRecordSection = (UseRecordDetailSection) formFactory
-                .createCdmDetailSection(DetailType.USE_RECORD, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -705,12 +623,9 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createUserSection(RootElement parent) {
         destroySections();
 
-        UserDetailSection userDetailSection = (UserDetailSection) formFactory.createCdmDetailSection(DetailType.USER,
-                getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-        GroupsByUserDetailSection groupByUserDetailSection = (GroupsByUserDetailSection) formFactory
-                .createEntityDetailSection(EntityDetailType.GROUPS_BY_USER, getConversationHolder(), parent,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         addPart(userDetailSection);
         addPart(groupByUserDetailSection);
@@ -724,13 +639,9 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createTaxonRelationshipSection(RootElement parent) {
         destroySections();
 
-        TaxonRelationshipDetailSection taxonRelationshipDetailSection = (TaxonRelationshipDetailSection) formFactory
-                .createCdmDetailSection(DetailType.TAXON_RELATIONSHIP, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-        ReferencedEntityDetailSection referencedEntityBaseDetailSection = (ReferencedEntityDetailSection) formFactory
-                .createCdmDetailSection(DetailType.REFERENCED_ENTITY, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         addPart(taxonRelationshipDetailSection);
         addPart(referencedEntityBaseDetailSection);
     }
@@ -741,9 +652,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createTermVocabularySection(RootElement parent) {
         destroySections();
 
-        TermVocabularyDetailSection termVocabularyDetailSection = (TermVocabularyDetailSection) formFactory
-                .createCdmDetailSection(DetailType.TERM_VOCABULARY, getConversationHolder(), parent, this,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         addPart(termVocabularyDetailSection);
     }
 
@@ -755,27 +664,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
     private void createDefinedTermSection(RootElement parent) {
         destroySections();
 
-        AbstractFormSection definedTermDetailSection = formFactory.createDefinedTermDetailSection(
-                getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
+        AbstractFormSection definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         addPart(definedTermDetailSection);
     }
-
-    private void createFOSection(RootElement parent){
-        destroySections();
-
-        GeneralDetailSection generalDetailSection = formFactory.createFOSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        FieldObservationDetailSection fieldObservationDetailSection =formFactory.createFODetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-
-        addPart(generalDetailSection);
-        addPart(gatheringEventDetailSection);
-        addPart(fieldObservationDetailSection);
-    }
 }