3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.view
.detail
;
13 import org
.eclipse
.jface
.viewers
.ISelection
;
14 import org
.eclipse
.jface
.viewers
.SelectionChangedEvent
;
15 import org
.eclipse
.swt
.SWT
;
16 import org
.eclipse
.swt
.widgets
.Composite
;
17 import org
.eclipse
.ui
.forms
.widgets
.Section
;
19 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
20 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacadeNotSupportedException
;
21 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
22 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
23 import eu
.etaxonomy
.cdm
.model
.agent
.TeamOrPersonBase
;
24 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
25 import eu
.etaxonomy
.cdm
.model
.common
.User
;
26 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionBase
;
27 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
28 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
29 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKeyNode
;
30 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
31 import eu
.etaxonomy
.cdm
.model
.name
.NonViralName
;
32 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnitBase
;
33 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
34 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
35 import eu
.etaxonomy
.taxeditor
.model
.FeatureNodeContainer
;
36 import eu
.etaxonomy
.taxeditor
.model
.PolytomousKeyRelationship
;
37 import eu
.etaxonomy
.taxeditor
.preference
.IPreferenceKeys
;
38 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
39 import eu
.etaxonomy
.taxeditor
.store
.StoreUtil
;
40 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
.DetailType
;
41 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
.EntityDetailType
;
42 import eu
.etaxonomy
.taxeditor
.ui
.forms
.RootElement
;
43 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
44 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
45 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
46 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
47 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
48 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
49 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
50 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
51 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
52 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
53 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
54 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
55 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
56 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GrantedAuthorityDetailSection
;
57 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
58 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
59 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
60 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
61 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
62 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
63 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
64 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.HybridDetailSection
;
65 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
66 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
67 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
68 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
69 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
70 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
71 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
72 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldObservationDetailSection
;
73 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
74 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeneralDetailSection
;
75 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
76 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
77 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
78 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
79 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
80 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
81 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmDataViewer
;
82 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmViewPart
;
86 * DetailsViewer class.
90 * @created Feb 12, 2010
93 public class DetailsViewer
extends AbstractCdmDataViewer
{
95 private enum VIEW_PART
{
96 TAXON
, NAME
, REFEERENCE
, TEAM
, PERSON
, DESCRIPTION
, DESCRIPTION_ELEMENT
, EMPTY
, IMAGE_GALLERY
, MEDIA
, TEAM_OR_PERSON_BASE
, DERIVED_UNIT
, FEATURE_DISTRIBUTION
, POLYTOMOUS_KEY
, POLYTOMOUS_KEY_NODE
, USER
, GROUP
99 private VIEW_PART currentViewPart
;
101 private ISelection selection
;
105 * Constructor for DetailsViewer.
109 * a {@link org.eclipse.swt.widgets.Composite} object.
111 * a {@link eu.etaxonomy.taxeditor.view.AbstractCdmViewPart}
114 public DetailsViewer(Composite parent
, AbstractCdmViewPart viewPart
) {
115 super(parent
, viewPart
);
118 // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
119 // since we are getting implementations of DerivedUnitBase from the bulk
121 // and not derived unit facade objects,
127 * eu.etaxonomy.taxeditor.editor.view.AbstractCdmDataViewer#setInput(java
131 public void setInput(Object input
) {
132 if (input
instanceof DerivedUnitBase
) {
134 input
= DerivedUnitFacade
.NewInstance((DerivedUnitBase
) input
,
135 PreferencesUtil
.getDerivedUnitConfigurator());
136 } catch (DerivedUnitFacadeNotSupportedException e
) {
137 StoreUtil
.error(getClass(), e
);
140 super.setInput(input
);
144 protected void markViewPartDirty() {
145 if (getInput() instanceof DerivedUnitFacade
) {
146 getViewPart().changed(
147 ((DerivedUnitFacade
) getInput()).innerDerivedUnit());
150 super.markViewPartDirty();
153 // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
158 * @see org.eclipse.jface.viewers.Viewer#refresh()
162 protected void showParts() {
163 if (getInput() instanceof TaxonBase
) {
164 if (currentViewPart
!= VIEW_PART
.TAXON
) {
165 createTaxonSections(rootElement
);
166 currentViewPart
= VIEW_PART
.TAXON
;
168 // preserve a pointer to the AbstractNameComposite
169 // MultiPageTaxonEditor editor =
170 // EditorUtil.getActiveMultiPageTaxonEditor();
171 // if(editor != null){
172 // TaxonNameEditor page = (TaxonNameEditor)
173 // editor.getPage(Page.NAME);
174 // for(AbstractGroupedContainer container :
175 // page.getGroupedContainers()){
176 // if(container.getData() == getInput()){
177 // sourceContainer = container;
182 } else if (getInput() instanceof NonViralName
) {
183 if (currentViewPart
!= VIEW_PART
.NAME
) {
184 createNameSections(rootElement
);
185 currentViewPart
= VIEW_PART
.NAME
;
187 } else if (getInput() instanceof Reference
) {
188 if (currentViewPart
!= VIEW_PART
.REFEERENCE
) {
189 createReferenceSections(rootElement
);
190 currentViewPart
= VIEW_PART
.REFEERENCE
;
192 } else if (getInput() instanceof Team
) {
193 if (currentViewPart
!= VIEW_PART
.TEAM
) {
194 createTeamDetailSection(rootElement
);
195 currentViewPart
= VIEW_PART
.TEAM
;
197 } else if (getInput() instanceof Person
) {
198 if (currentViewPart
!= VIEW_PART
.PERSON
) {
199 createPersonDetailSection(rootElement
);
200 currentViewPart
= VIEW_PART
.PERSON
;
202 } else if (getInput() instanceof TeamOrPersonBase
) {
204 if (currentViewPart
!= VIEW_PART
.TEAM_OR_PERSON_BASE
) {
205 createTeamOrPersonBaseDetailSection(rootElement
);
206 currentViewPart
= VIEW_PART
.TEAM_OR_PERSON_BASE
;
208 } else if (getInput() instanceof DescriptionBase
) {
209 if (((DescriptionBase
) getInput()).isImageGallery()) {
210 if (currentViewPart
!= VIEW_PART
.IMAGE_GALLERY
) {
211 createImageGallerySection(rootElement
);
212 currentViewPart
= VIEW_PART
.IMAGE_GALLERY
;
215 if (currentViewPart
!= VIEW_PART
.DESCRIPTION
) {
216 createDescriptionSection(rootElement
);
217 currentViewPart
= VIEW_PART
.DESCRIPTION
;
220 } else if (getInput() instanceof DescriptionElementBase
) {
221 if (currentViewPart
!= VIEW_PART
.DESCRIPTION_ELEMENT
) {
222 createDescriptionElementSection(rootElement
);
223 currentViewPart
= VIEW_PART
.DESCRIPTION_ELEMENT
;
225 } else if (getInput() instanceof Media
) {
226 if (currentViewPart
!= VIEW_PART
.MEDIA
) {
227 createMediaElementSection(rootElement
);
228 currentViewPart
= VIEW_PART
.MEDIA
;
230 } else if (getInput() instanceof DerivedUnitFacade
) {
231 if (currentViewPart
!= VIEW_PART
.DERIVED_UNIT
) {
232 createDerivedUnitBaseElementSection(rootElement
);
233 currentViewPart
= VIEW_PART
.DERIVED_UNIT
;
235 } else if (getInput() instanceof FeatureNodeContainer
) {
236 if (currentViewPart
!= VIEW_PART
.FEATURE_DISTRIBUTION
) {
237 createFeatureDistributionSection(rootElement
);
238 currentViewPart
= VIEW_PART
.FEATURE_DISTRIBUTION
;
240 } else if (getInput() instanceof PolytomousKey
) {
241 if (currentViewPart
!= VIEW_PART
.POLYTOMOUS_KEY
) {
242 createPolytomousKeySection(rootElement
);
243 currentViewPart
= VIEW_PART
.POLYTOMOUS_KEY
;
245 } else if ((getInput() instanceof PolytomousKeyNode
)
246 || (getInput() instanceof PolytomousKeyRelationship
)) {
247 if (currentViewPart
!= VIEW_PART
.POLYTOMOUS_KEY_NODE
) {
248 createPolytomousKeyNodeSection(rootElement
);
249 currentViewPart
= VIEW_PART
.POLYTOMOUS_KEY_NODE
;
251 } else if (getInput() instanceof User
) {
252 if (currentViewPart
!= VIEW_PART
.USER
) {
253 createUserSection(rootElement
);
254 currentViewPart
= VIEW_PART
.USER
;
256 } else if (getInput() instanceof Group
) {
257 if (currentViewPart
!= VIEW_PART
.GROUP
) {
258 createGroupSection(rootElement
);
259 currentViewPart
= VIEW_PART
.GROUP
;
263 currentViewPart
= VIEW_PART
.EMPTY
;
272 private void createGroupSection(RootElement parent
) {
275 GroupDetailSection groupDetailSection
= (GroupDetailSection
) formFactory
276 .createCdmDetailSection(DetailType
.GROUP
,
277 getConversationHolder(), parent
, this, Section
.TWISTIE
279 MemberDetailSection memberDetailSection
= (MemberDetailSection
) formFactory
280 .createEntityDetailSection(EntityDetailType
.MEMBER
,
281 getConversationHolder(), parent
, Section
.TWISTIE
283 GrantedAuthorityDetailSection grantedAuthorityDetailSection
= (GrantedAuthorityDetailSection
) formFactory
284 .createEntityDetailSection(EntityDetailType
.GRANTED_AUTHORITY
,
285 getConversationHolder(), parent
, Section
.TWISTIE
288 addPart(groupDetailSection
);
289 addPart(memberDetailSection
);
290 addPart(grantedAuthorityDetailSection
);
296 * @see org.eclipse.jface.viewers.Viewer#getSelection()
300 public ISelection
getSelection() {
308 * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
309 * .ISelection, boolean)
313 public void setSelection(ISelection selection
, boolean reveal
) {
314 this.selection
= selection
;
315 SelectionChangedEvent selectionChangedEvent
= new SelectionChangedEvent(
317 fireSelectionChanged(selectionChangedEvent
);
320 private void createTaxonSections(RootElement parent
) {
323 TaxonBaseDetailSection taxonBaseDetailSection
= (TaxonBaseDetailSection
) formFactory
324 .createCdmDetailSection(DetailType
.TAXONBASE
,
325 getConversationHolder(), parent
, this, Section
.TWISTIE
);
327 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
329 NonViralNameDetailSection nonViralNameSection
= (NonViralNameDetailSection
) formFactory
330 .createCdmDetailSection(DetailType
.NONVIRALNAME
,
331 getConversationHolder(), parent
, this, Section
.TWISTIE
334 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
336 NomenclaturalReferenceDetailSection referenceDetailSection
= (NomenclaturalReferenceDetailSection
) formFactory
337 .createCdmDetailSection(DetailType
.NOMENCLATURALREFERENCE
,
338 getConversationHolder(), parent
, this, Section
.TWISTIE
);
340 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
342 NomenclaturalStatusSection nomenclaturalStatusSection
= (NomenclaturalStatusSection
) formFactory
343 .createEntityDetailSection(
344 EntityDetailType
.NOMENCLATURALSTATUS
,
345 getConversationHolder(), parent
, Section
.TWISTIE
);
347 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
349 ProtologueSection protologSection
= (ProtologueSection
) formFactory
350 .createEntityDetailSection(EntityDetailType
.PROTOLOG
,
351 getConversationHolder(), parent
, Section
.TWISTIE
);
353 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
355 TypeDesignationSection typeDesignationSection
= (TypeDesignationSection
) formFactory
356 .createEntityDetailSection(EntityDetailType
.TYPEDESIGNATION
,
357 getConversationHolder(), parent
, Section
.TWISTIE
);
359 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
361 NameRelationshipDetailSection nameRelationshipSection
= (NameRelationshipDetailSection
) formFactory
362 .createEntityDetailSection(EntityDetailType
.NAME_RELATIONSHIP
,
363 getConversationHolder(), parent
, Section
.TWISTIE
);
365 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
367 HybridDetailSection hybridDetailSection
= (HybridDetailSection
) formFactory
368 .createCdmDetailSection(DetailType
.HYBRID
,
369 getConversationHolder(), parent
, this, Section
.TWISTIE
);
371 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
373 ParsingMessagesSection parsingMessagesSection
= (ParsingMessagesSection
) formFactory
374 .createCdmDetailSection(DetailType
.PARSINGMESSAGE
,
375 getConversationHolder(), parent
, this, Section
.EXPANDED
);
377 addPart(taxonBaseDetailSection
);
378 addPart(nonViralNameSection
);
379 addPart(nomenclaturalStatusSection
);
380 addPart(protologSection
);
381 addPart(referenceDetailSection
);
382 addPart(typeDesignationSection
);
383 addPart(nameRelationshipSection
);
384 addPart(hybridDetailSection
);
385 addPart(parsingMessagesSection
);
388 private void createNameSections(RootElement parent
) {
390 NonViralNameDetailSection nonViralNameSection
= (NonViralNameDetailSection
) formFactory
391 .createCdmDetailSection(DetailType
.NONVIRALNAME
,
392 getConversationHolder(), parent
, this, Section
.TWISTIE
395 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
397 NomenclaturalReferenceDetailSection referenceDetailSection
= (NomenclaturalReferenceDetailSection
) formFactory
398 .createCdmDetailSection(DetailType
.NOMENCLATURALREFERENCE
,
399 getConversationHolder(), parent
, this, Section
.TWISTIE
);
401 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
403 NomenclaturalStatusSection nomenclaturalStatusSection
= (NomenclaturalStatusSection
) formFactory
404 .createEntityDetailSection(
405 EntityDetailType
.NOMENCLATURALSTATUS
,
406 getConversationHolder(), parent
, Section
.TWISTIE
);
408 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
410 ProtologueSection protologSection
= (ProtologueSection
) formFactory
411 .createEntityDetailSection(EntityDetailType
.PROTOLOG
,
412 getConversationHolder(), parent
, Section
.TWISTIE
);
414 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
416 TypeDesignationSection typeDesignationSection
= (TypeDesignationSection
) formFactory
417 .createEntityDetailSection(EntityDetailType
.TYPEDESIGNATION
,
418 getConversationHolder(), parent
, Section
.TWISTIE
);
420 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
422 NameRelationshipDetailSection nameRelationshipSection
= (NameRelationshipDetailSection
) formFactory
423 .createEntityDetailSection(EntityDetailType
.NAME_RELATIONSHIP
,
424 getConversationHolder(), parent
, Section
.TWISTIE
);
426 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
428 HybridDetailSection hybridDetailSection
= (HybridDetailSection
) formFactory
429 .createCdmDetailSection(DetailType
.HYBRID
,
430 getConversationHolder(), parent
, this, Section
.TWISTIE
);
432 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
434 addPart(nonViralNameSection
);
435 addPart(nomenclaturalStatusSection
);
436 addPart(protologSection
);
437 addPart(referenceDetailSection
);
438 addPart(typeDesignationSection
);
439 addPart(nameRelationshipSection
);
440 addPart(hybridDetailSection
);
443 private void createReferenceSections(RootElement parent
) {
446 ReferenceDetailSection referenceDetailSection
= (ReferenceDetailSection
) formFactory
447 .createCdmDetailSection(DetailType
.REFERENCEBASE
,
448 getConversationHolder(), parent
, this, Section
.TWISTIE
451 addPart(referenceDetailSection
);
454 private void createTeamOrPersonBaseDetailSection(RootElement parent
) {
456 TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection
= (TeamOrPersonBaseDetailSection
) formFactory
457 .createCdmDetailSection(DetailType
.TEAMORPERSONBASE
,
458 getConversationHolder(), parent
, this, Section
.TWISTIE
461 addPart(teamOrPersonBaseDetailSection
);
464 private void createTeamDetailSection(RootElement parent
) {
466 TeamDetailSection teamDetailSection
= (TeamDetailSection
) formFactory
467 .createCdmDetailSection(DetailType
.TEAM
,
468 getConversationHolder(), parent
, this, Section
.TWISTIE
471 addPart(teamDetailSection
);
474 private void createPersonDetailSection(RootElement parent
) {
476 PersonDetailSection personDetailSection
= (PersonDetailSection
) formFactory
477 .createCdmDetailSection(DetailType
.PERSON
,
478 getConversationHolder(), parent
, this, Section
.TWISTIE
480 addPart(personDetailSection
);
483 private void createDescriptionElementSection(RootElement parent
) {
486 DescriptionElementDetailSection descriptionElementDetailSection
= (DescriptionElementDetailSection
) formFactory
487 .createCdmDetailSection(DetailType
.DESCRIPTIONELEMENT
,
488 getConversationHolder(), parent
, this, Section
.TWISTIE
491 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
493 DescriptionElementSourceSection descriptionElementSourceSection
= (DescriptionElementSourceSection
) formFactory
494 .createEntityDetailSection(
495 EntityDetailType
.DESCRIPTIONELEMENTSOURCE
,
496 getConversationHolder(), parent
, Section
.TWISTIE
);
498 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
500 DescriptionElementMediaSection descriptionElementMediaSection
= (DescriptionElementMediaSection
) formFactory
501 .createEntityDetailSection(
502 EntityDetailType
.DESCRIPTIONELEMENTMEDIA
,
503 getConversationHolder(), parent
, Section
.TWISTIE
);
505 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
507 addPart(descriptionElementDetailSection
);
508 addPart(descriptionElementSourceSection
);
509 addPart(descriptionElementMediaSection
);
512 private void createDescriptionSection(RootElement parent
) {
514 DescriptionDetailSection descriptionDetailSection
= (DescriptionDetailSection
) formFactory
515 .createCdmDetailSection(DetailType
.DESCRIPTION
,
516 getConversationHolder(), parent
, this, Section
.TWISTIE
519 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
521 NaturalLanguageSection naturalLanguageSection
= (NaturalLanguageSection
) formFactory
522 .createCdmDetailSection(DetailType
.NATURAL_LANGUAGE
,
523 getConversationHolder(), parent
, this, Section
.TWISTIE
526 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
528 DescribedSpecimenSection describedSpecimenSection
= (DescribedSpecimenSection
) formFactory
529 .createEntityDetailSection(EntityDetailType
.DESCRIBED_SPECIMEN
,
530 getConversationHolder(), parent
, Section
.TWISTIE
);
532 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
534 DescriptionSourceSection descriptionSourceSection
= (DescriptionSourceSection
) formFactory
535 .createEntityDetailSection(EntityDetailType
.DESCRIPTIONSOURCE
,
536 getConversationHolder(), parent
, Section
.TWISTIE
);
538 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
540 ScopeSection scopeSection
= (ScopeSection
) formFactory
541 .createEntityDetailSection(EntityDetailType
.SCOPE
,
542 getConversationHolder(), parent
, Section
.TWISTIE
);
544 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
546 addPart(descriptionDetailSection
);
547 addPart(naturalLanguageSection
);
548 addPart(describedSpecimenSection
);
549 addPart(descriptionSourceSection
);
550 addPart(scopeSection
);
556 private void createImageGallerySection(RootElement parent
) {
558 DescriptionDetailSection descriptionDetailSection
= (DescriptionDetailSection
) formFactory
559 .createCdmDetailSection(DetailType
.DESCRIPTION
,
560 getConversationHolder(), parent
, this, Section
.TWISTIE
563 addPart(descriptionDetailSection
);
566 private void createMediaElementSection(RootElement parent
) {
568 MediaDetailsSection mediaDetailSection
= (MediaDetailsSection
) formFactory
569 .createCdmDetailSection(DetailType
.MEDIA
,
570 getConversationHolder(), parent
, this, Section
.TWISTIE
573 addPart(mediaDetailSection
);
576 private void createDerivedUnitBaseElementSection(RootElement parent
) {
579 GeneralDetailSection generalDetailSection
= (GeneralDetailSection
) formFactory
580 .createCdmDetailSection(DetailType
.DERIVED_UNIT_GENERAL
,
581 getConversationHolder(), parent
, this, Section
.TWISTIE
584 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
586 GatheringEventDetailSection gatheringEventDetailSection
= (GatheringEventDetailSection
) formFactory
587 .createCdmDetailSection(DetailType
.GATHERING_EVENT
,
588 getConversationHolder(), parent
, this, Section
.TWISTIE
);
590 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
592 FieldObservationDetailSection fieldObservationDetailSection
= (FieldObservationDetailSection
) formFactory
593 .createCdmDetailSection(DetailType
.FIELD_OBSERVATION
,
594 getConversationHolder(), parent
, this, Section
.TWISTIE
);
596 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
598 DerivedUnitBaseDetailSection derivedUnitBaseDetailSection
= (DerivedUnitBaseDetailSection
) formFactory
599 .createCdmDetailSection(DetailType
.DERIVED_UNIT
,
600 getConversationHolder(), parent
, this, Section
.TWISTIE
);
603 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
605 DeterminationDetailSection determinationDetailSection
= (DeterminationDetailSection
) formFactory
606 .createCdmDetailSection(DetailType
.DETERMINATION
,
607 getConversationHolder(), parent
, this, Section
.TWISTIE
);
610 addPart(generalDetailSection
);
611 addPart(gatheringEventDetailSection
);
612 addPart(fieldObservationDetailSection
);
613 addPart(derivedUnitBaseDetailSection
);
614 addPart(determinationDetailSection
);
621 private void createFeatureDistributionSection(RootElement parent
) {
624 FeatureDistributionDetailSection featureDistributionSection
= (FeatureDistributionDetailSection
) formFactory
625 .createCdmDetailSection(DetailType
.FEATURE_DISTRIBUTION
,
626 getConversationHolder(), parent
, this, Section
.TWISTIE
629 addPart(featureDistributionSection
);
632 private void createPolytomousKeySection(RootElement parent
) {
635 PolytomousKeyDetailSection polytomousKeyDetailSection
= (PolytomousKeyDetailSection
) formFactory
636 .createCdmDetailSection(DetailType
.POLYTOMOUS_KEY
,
637 getConversationHolder(), parent
, this, Section
.TWISTIE
640 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
642 GeographicalScopeDetailSection geographicalScopeDetailSection
= (GeographicalScopeDetailSection
) formFactory
643 .createEntityDetailSection(EntityDetailType
.GEOGRAPHICAL_SCOPE
,
644 getConversationHolder(), parent
, Section
.TWISTIE
);
646 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
648 ScopeRestrictionSection scopeRestrictionSection
= (ScopeRestrictionSection
) formFactory
649 .createEntityDetailSection(EntityDetailType
.SCOPE_RESTRICTION
,
650 getConversationHolder(), parent
, Section
.TWISTIE
);
652 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
654 TaxonomicScopeSection taxonomicScopeSection
= (TaxonomicScopeSection
) formFactory
655 .createEntityDetailSection(EntityDetailType
.TAXONOMIC_SCOPE
,
656 getConversationHolder(), parent
, Section
.TWISTIE
);
658 addPart(polytomousKeyDetailSection
);
659 addPart(geographicalScopeDetailSection
);
660 addPart(scopeRestrictionSection
);
661 addPart(taxonomicScopeSection
);
664 private void createPolytomousKeyNodeSection(RootElement parent
) {
667 PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection
= (PolytomousKeyNodeDetailSection
) formFactory
668 .createCdmDetailSection(DetailType
.POLYTOMOUS_KEY_NODE
,
669 getConversationHolder(), parent
, this, Section
.TWISTIE
672 addPart(polytomousKeyNodeDetailSection
);
675 private void createUserSection(RootElement parent
) {
678 UserDetailSection userDetailSection
= (UserDetailSection
) formFactory
679 .createCdmDetailSection(DetailType
.USER
,
680 getConversationHolder(), parent
, this, Section
.TWISTIE
683 GroupsByUserDetailSection groupByUserDetailSection
= (GroupsByUserDetailSection
) formFactory
684 .createEntityDetailSection(EntityDetailType
.GROUPS_BY_USER
,
685 getConversationHolder(), parent
, Section
.TWISTIE
688 addPart(userDetailSection
);
689 addPart(groupByUserDetailSection
);