// $Id$
/**
* Copyright (C) 2011 EDIT
- * European Distributed Institute of Taxonomy
+ * 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.
*/
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeNode;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
-import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.agent.Team;
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.cdm.model.common.Marker;
-import eu.etaxonomy.cdm.model.common.MarkerType;
import eu.etaxonomy.cdm.model.common.TermVocabulary;
import eu.etaxonomy.cdm.model.common.User;
import eu.etaxonomy.cdm.model.description.CategoricalData;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-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.Sequence;
+import eu.etaxonomy.cdm.model.molecular.SingleRead;
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.MediaSpecimen;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
-
-import eu.etaxonomy.taxeditor.editor.UsageTermCollection;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
+import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.UsageTermCollection;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.RootElement;
import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
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.DerivedUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldObservationDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.EmptySection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.GeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.OriginalLabelDataSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceContigFileCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceReferenceCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadPherogramCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
/**
- *
+ *
* The DetailsViewer handles the content of the details view (
* {@link DetailsViewPart}).<br>
* Depending on the type of the selected element the section of the details view
*/
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 DerivedUnit) {
- try {
- input = DerivedUnitFacade.NewInstance((DerivedUnit) input,
- PreferencesUtil.getDerivedUnitConfigurator());
- } catch (DerivedUnitFacadeNotSupportedException e) {
- AbstractUtility.error(getClass(), e);
- }
- }
- super.setInput(input);
- }
-
- @Override
- protected void markViewPartDirty() {
- if (getInput() instanceof DerivedUnitFacade) {
- getViewPart().changed(((DerivedUnitFacade) getInput()).innerDerivedUnit());
- }
-
- 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.
+ 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,
+
+ @Override
+ public void setInput(Object input) {
+ if(input instanceof TreeNode){
+ input = ((TreeNode) input).getValue();
+ }
+ if(input instanceof GbifResponse){
+ input = ((GbifResponse) input).getDerivedUnitFacade();
+ }
+ if (input.getClass().equals(DerivedUnit.class)) {
+ DerivedUnit derivedUnit = (DerivedUnit)input;
+ try {
+ input = DerivedUnitFacade.NewInstance(derivedUnit,
+ PreferencesUtil.getDerivedUnitConfigurator());
+ } catch (DerivedUnitFacadeNotSupportedException e) {
+// MessagingUtils.error(getClass(), e); //nothing should happen, later on the Details View will show an according information that it is not possible to open this data
+ }
+ }
+ 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());
+ }
+ }
+ else{
+ super.markViewPartDirty();
+ }
+ }
+
+ // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
+
+
+ /** {@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();
+
+ destroySections();
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) {
- Set<Marker> descriptionMarkers = ((DescriptionBase) input).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;
- }
- }
- if (((DescriptionBase) input).isImageGallery()) {
- createImageGallerySection(rootElement);
-
- } else if (isUseDescription) {
- createUseDescriptionSection(rootElement);
- } else {
- createDescriptionSection(rootElement);
-
- }
+ if(input instanceof SpecimenDescription){
+ //TODO: add more sections to DetailsView for SpecimenDescription
+ createSpecimenDescriptionSection(rootElement);
+ }
+ else{
+ Set<Marker> descriptionMarkers = ((DescriptionBase<?>) input).getMarkers();
+
+ Boolean isUseDescription = false;
+ for (Marker marker : descriptionMarkers) {
+ if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
+ isUseDescription = true;
+ }
+ }
+ if (((DescriptionBase<?>) input).isImageGallery()) {
+ createImageGallerySection(rootElement);
+
+ } else if (isUseDescription) {
+ createUseDescriptionSection(rootElement);
+ } else {
+ createDescriptionSection(rootElement);
+
+ }
+ }
} else if (input instanceof DescriptionElementBase) {
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()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
+ 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) {
- createDerivedUnitBaseElementSection(rootElement);
-
- } else if (input instanceof FeatureNodeContainer) {
- createFeatureDistributionSection(rootElement);
-
- } else if (input instanceof PolytomousKey) {
- //createPolytomousKeySection(rootElement);
-
- } else if ((input instanceof PolytomousKeyNode) || (input instanceof PolytomousKeyRelationship)) {
- createPolytomousKeyNodeSection(rootElement);
+ if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
+ if(((DerivedUnitFacade) input).innerFieldUnit()==null){
+ MessagingUtils.error(DetailsViewer.class, "FieldUnit of facade is null", null);
+ }
+ else{
+ createFieldUnitSection(rootElement);
+ }
+ }
+ else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.PreservedSpecimen){
+ if(((DerivedUnitFacade) input).innerDerivedUnit()==null){
+ MessagingUtils.error(DetailsViewer.class, "DerivedUnit of facade is null", null);
+ }
+ else{
+ createDerivedUnitBaseElementSection(rootElement);
+ }
+ }
+ else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){
+ //TissueSample should only be created by using it's own class
+ //in future using only one class with different SpecimenOrObservationTypes is desired
+// createTissueSampleSection(rootElement);
+ }
+ else{
+ createDerivedUnitBaseElementSection(rootElement);
+ }
+ } else if (input instanceof DnaSample){
+ DnaSample dnaSample = (DnaSample)input;
+ if(dnaSample.getRecordBasis()==SpecimenOrObservationType.TissueSample){
+ createTissueSampleSection(rootElement);
+ }
+ else if(dnaSample.getRecordBasis()==SpecimenOrObservationType.DnaSample){
+ createDnaSampleSection(rootElement);
+ }
+ } else if (input instanceof MediaSpecimen){
+ createMediaSpecimenSection(rootElement);
+ }
+ else if(input instanceof Sequence){
+ createSequenceSection(rootElement);
+ }
+ else if(input instanceof SingleRead){
+ createSingleReadSection(rootElement);
+ }
+ else if (input instanceof FeatureNodeContainer) {
+ createFeatureDistributionSection(rootElement);
+
+ }else if ((input instanceof PolytomousKeyNode) || (input instanceof PolytomousKeyRelationship)) {
+ 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();
- }
-
-
- /**
- * @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;
- SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
- fireSelectionChanged(selectionChangedEvent);
- }
-
- /**
- * createTaxonSections(RootElement parent)
- *
- * @param parent
- */
- private void createTaxonSections(RootElement parent) {
- destroySections();
-
- TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE
- | ExpandableComposite.EXPANDED);
-
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ createDefinedTermSection(rootElement);
+ }
+ else {
+ createEmptySection(rootElement);
+ }
+ layout();
+ }
- NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ /**
+ * @param rootElement
+ */
+ private void createEmptySection(RootElement parent) {
+ destroySections();
- NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE);
+ EmptySection emptySection = formFactory.createEmptySection(formFactory, parent, SWT.NONE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(emptySection);
+ }
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ /**
+ * @param rootElement
+ */
+ private void createGroupSection(RootElement parent) {
+ destroySections();
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ 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);
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ addPart(groupDetailSection);
+ addPart(memberDetailSection);
+ addPart(grantedAuthorityDetailSection);
+ }
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.Viewer#getSelection()
+ */
+ /** {@inheritDoc} */
+ @Override
+ public ISelection getSelection() {
+ return selection;
+ }
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ /** {@inheritDoc} */
+ @Override
+ public void setSelection(ISelection selection, boolean reveal) {
+ this.selection = selection;
+ if(this.selection!=null){
+ SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
+ fireSelectionChanged(selectionChangedEvent);
+ }
+ }
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ /**
+ * createTaxonSections(RootElement parent)
+ *
+ * @param parent
+ */
+ private void createTaxonSections(RootElement parent) {
+ destroySections();
- ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this, ExpandableComposite.EXPANDED);
+ ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
+ ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
- addPart(taxonBaseDetailSection);
- addPart(nonViralNameSection);
- addPart(nomenclaturalStatusSection);
- addPart(protologSection);
- addPart(referenceDetailSection);
- addPart(typeDesignationSection);
- addPart(nameRelationshipSection);
- addPart(parsingMessagesSection);
- }
+ TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- /**
- * createNameSections
- *
- * @param parent
- */
- private void createNameSections(RootElement parent) {
- destroySections();
- NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ 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 | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ //TODO RL
+ if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
+ ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ 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);
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ addPart(protologSection);
+ addPart(typeDesignationSection);
+ addPart(nameRelationshipSection);
+ }
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ addPart(parsingMessagesSection);
+ addPart(taxonBaseDetailSection);
+ addPart(nonViralNameSection);
+ addPart(nomenclaturalStatusSection);
+ addPart(referenceDetailSection);
+ }
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ /**
+ * createNameSections
+ *
+ * @param parent
+ */
+ private void createNameSections(RootElement parent) {
+ destroySections();
+ NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(nonViralNameSection);
- addPart(nomenclaturalStatusSection);
- addPart(protologSection);
- addPart(referenceDetailSection);
- addPart(typeDesignationSection);
- addPart(nameRelationshipSection);
- }
+ addPart(nonViralNameSection);
+ addPart(nomenclaturalStatusSection);
+ addPart(referenceDetailSection);
+//TODO RL
+ if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
+ ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(protologSection);
+ 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);
+ 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);
- }
-
- /**
- * createPersonDetailSection
+ addPart(teamDetailSection);
+ }
+
+ /**
+ * 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);
- }
-
- /**
- * 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);
- }
-
- /**
- * createMediaElementSection
+ addPart(descriptionDetailSection);
+ }
+
+ /**
+ * 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();
- GeneralDetailSection generalDetailSection = formFactory.createGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
+ if(!(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart)){
+ derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
+ }
+ addPart(derivedUnitGeneralDetailSection);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(derivedUnitBaseDetailSection);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ OriginalLabelDataSection originalLabelDataSection = formFactory.createOriginalLabelDataSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ addPart(originalLabelDataSection);
+
+ //for editors working with facades
+ if(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart){
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ addPart(gatheringEventDetailSection);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ addPart(fieldUnitDetailSection);
+ }
+
+ if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ addPart(determinationDetailSection);
+ }
+ if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(taxonAssociationDetailSection);
+ }
+
+ }
+
+ private void createFieldUnitSection(RootElement parent) {
+ destroySections();
+
+ FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+ 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);
+
+ addPart(fielUnitGeneralDetailSection);
+ addPart(gatheringEventDetailSection);
+ addPart(fieldUnitDetailSection);
+
+ if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ addPart(determinationDetailSection);
+ }
+ }
+
+ private void createTissueSampleSection(RootElement parent) {
+ destroySections();
+
+ TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+ addPart(section);
+ addPart(sampleDesignationDetailSection);
+ }
+
+ private void createDnaSampleSection(RootElement parent) {
+ destroySections();
+
+ DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+ addPart(section);
+ addPart(qualitySection);
+ addPart(sampleDesignationDetailSection);
+ }
+
+ private void createSequenceSection(RootElement parent) {
+ destroySections();
+
+ SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- FieldObservationDetailSection fieldObservationDetailSection = formFactory.createFieldObservationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(section);
+ addPart(referenceSection);
+ addPart(contigFileSection);
+ }
+
+ private void createSingleReadSection(RootElement parent) {
+ destroySections();
+
+ SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(section);
+
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(pherogramSection);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ }
+
+ private void createMediaSpecimenSection(RootElement parent) {
+ destroySections();
- DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(generalSection);
- addPart(generalDetailSection);
- addPart(gatheringEventDetailSection);
- addPart(fieldObservationDetailSection);
- addPart(derivedUnitBaseDetailSection);
- addPart(determinationDetailSection);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ addPart(rightsSection);
- }
+ }
- /**
- * @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);
-
+
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
+
PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
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);
-
- addPart(descriptionUseRecordSection);
-
-
- }
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ 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();
-
- AbstractFormSection definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(definedTermDetailSection);
- }
-
- private void createFODetailsView(RootElement parent) {
+ * @param parent
+ */
+ private void createDefinedTermSection(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);
+ AbstractFormSection<?> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(definedTermDetailSection);
}
+
}