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;
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;
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;
*/
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){
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){
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);
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);
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);
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);
+ }
}