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
.DefinedTermBase
;
25 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
26 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
27 import eu
.etaxonomy
.cdm
.model
.common
.User
;
28 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionBase
;
29 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
30 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
31 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKeyNode
;
32 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
33 import eu
.etaxonomy
.cdm
.model
.name
.NonViralName
;
34 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnitBase
;
35 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
36 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
37 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationship
;
38 import eu
.etaxonomy
.taxeditor
.model
.FeatureNodeContainer
;
39 import eu
.etaxonomy
.taxeditor
.model
.PolytomousKeyRelationship
;
40 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
41 import eu
.etaxonomy
.taxeditor
.store
.StoreUtil
;
42 import eu
.etaxonomy
.taxeditor
.ui
.forms
.AbstractFormSection
;
43 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
.DetailType
;
44 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
.EntityDetailType
;
45 import eu
.etaxonomy
.taxeditor
.ui
.forms
.RootElement
;
46 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
47 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
48 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
49 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
50 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
51 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
52 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
53 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
54 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
55 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
56 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
57 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
58 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
59 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
60 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GrantedAuthorityDetailSection
;
61 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
62 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
63 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.GeographicalScopeDetailSection
;
64 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
65 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
66 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.ScopeRestrictionSection
;
67 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
68 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
69 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
70 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
71 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
72 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
73 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
74 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
75 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldObservationDetailSection
;
76 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
77 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeneralDetailSection
;
78 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
79 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
80 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
81 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
82 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
83 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
84 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
85 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
86 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmDataViewer
;
87 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmViewPart
;
91 * DetailsViewer class.
95 * @created Feb 12, 2010
98 public class DetailsViewer
extends AbstractCdmDataViewer
{
100 private ISelection selection
;
104 * Constructor for DetailsViewer.
108 * a {@link org.eclipse.swt.widgets.Composite} object.
110 * a {@link eu.etaxonomy.taxeditor.view.AbstractCdmViewPart}
113 public DetailsViewer(Composite parent
, AbstractCdmViewPart viewPart
) {
114 super(parent
, viewPart
);
117 // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
118 // since we are getting implementations of DerivedUnitBase from the bulk
120 // and not derived unit facade objects,
126 * eu.etaxonomy.taxeditor.editor.view.AbstractCdmDataViewer#setInput(java
130 public void setInput(Object input
) {
131 if (input
instanceof DerivedUnitBase
) {
133 input
= DerivedUnitFacade
.NewInstance((DerivedUnitBase
) input
,
134 PreferencesUtil
.getDerivedUnitConfigurator());
135 } catch (DerivedUnitFacadeNotSupportedException e
) {
136 StoreUtil
.error(getClass(), e
);
139 super.setInput(input
);
143 protected void markViewPartDirty() {
144 if (getInput() instanceof DerivedUnitFacade
) {
145 getViewPart().changed(
146 ((DerivedUnitFacade
) getInput()).innerDerivedUnit());
149 super.markViewPartDirty();
152 // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
157 * @see org.eclipse.jface.viewers.Viewer#refresh()
161 protected void showParts() {
162 if (getInput() instanceof TaxonBase
) {
163 createTaxonSections(rootElement
);
165 } else if (getInput() instanceof NonViralName
) {
166 createNameSections(rootElement
);
168 } else if (getInput() instanceof Reference
) {
169 createReferenceSections(rootElement
);
171 } else if (getInput() instanceof Team
) {
172 createTeamDetailSection(rootElement
);
174 } else if (getInput() instanceof Person
) {
175 createPersonDetailSection(rootElement
);
177 } else if (getInput() instanceof TeamOrPersonBase
) {
178 createTeamOrPersonBaseDetailSection(rootElement
);
180 } else if (getInput() instanceof DescriptionBase
) {
181 if (((DescriptionBase
) getInput()).isImageGallery()) {
182 createImageGallerySection(rootElement
);
185 createDescriptionSection(rootElement
);
188 } else if (getInput() instanceof DescriptionElementBase
) {
189 createDescriptionElementSection(rootElement
);
191 } else if (getInput() instanceof Media
) {
192 createMediaElementSection(rootElement
);
194 } else if (getInput() instanceof DerivedUnitFacade
) {
195 createDerivedUnitBaseElementSection(rootElement
);
197 } else if (getInput() instanceof FeatureNodeContainer
) {
198 createFeatureDistributionSection(rootElement
);
200 } else if (getInput() instanceof PolytomousKey
) {
201 createPolytomousKeySection(rootElement
);
203 } else if ((getInput() instanceof PolytomousKeyNode
)
204 || (getInput() instanceof PolytomousKeyRelationship
)) {
205 createPolytomousKeyNodeSection(rootElement
);
207 } else if (getInput() instanceof User
) {
208 createUserSection(rootElement
);
210 } else if (getInput() instanceof Group
) {
211 createGroupSection(rootElement
);
213 } else if (getInput() instanceof TaxonRelationship
) {
214 createTaxonRelationshipSection(rootElement
);
216 } else if (getInput() instanceof TermVocabulary
) {
217 createTermVocabularySection(rootElement
);
219 } else if (getInput() instanceof DefinedTermBase
) {
220 createDefinedTermSection(rootElement
);
230 private void createGroupSection(RootElement parent
) {
233 GroupDetailSection groupDetailSection
= (GroupDetailSection
) formFactory
234 .createCdmDetailSection(DetailType
.GROUP
,
235 getConversationHolder(), parent
, this, Section
.TWISTIE
237 MemberDetailSection memberDetailSection
= (MemberDetailSection
) formFactory
238 .createEntityDetailSection(EntityDetailType
.MEMBER
,
239 getConversationHolder(), parent
, Section
.TWISTIE
241 GrantedAuthorityDetailSection grantedAuthorityDetailSection
= (GrantedAuthorityDetailSection
) formFactory
242 .createEntityDetailSection(EntityDetailType
.GRANTED_AUTHORITY
,
243 getConversationHolder(), parent
, Section
.TWISTIE
246 addPart(groupDetailSection
);
247 addPart(memberDetailSection
);
248 addPart(grantedAuthorityDetailSection
);
254 * @see org.eclipse.jface.viewers.Viewer#getSelection()
258 public ISelection
getSelection() {
266 * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
267 * .ISelection, boolean)
271 public void setSelection(ISelection selection
, boolean reveal
) {
272 this.selection
= selection
;
273 SelectionChangedEvent selectionChangedEvent
= new SelectionChangedEvent(
275 fireSelectionChanged(selectionChangedEvent
);
278 private void createTaxonSections(RootElement parent
) {
281 TaxonBaseDetailSection taxonBaseDetailSection
= (TaxonBaseDetailSection
) formFactory
282 .createCdmDetailSection(DetailType
.TAXONBASE
,
283 getConversationHolder(), parent
, this, Section
.TWISTIE
);
285 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
287 NonViralNameDetailSection nonViralNameSection
= (NonViralNameDetailSection
) formFactory
288 .createCdmDetailSection(DetailType
.NONVIRALNAME
,
289 getConversationHolder(), parent
, this, Section
.TWISTIE
292 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
294 NomenclaturalReferenceDetailSection referenceDetailSection
= (NomenclaturalReferenceDetailSection
) formFactory
295 .createCdmDetailSection(DetailType
.NOMENCLATURALREFERENCE
,
296 getConversationHolder(), parent
, this, Section
.TWISTIE
);
298 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
300 NomenclaturalStatusSection nomenclaturalStatusSection
= (NomenclaturalStatusSection
) formFactory
301 .createEntityDetailSection(
302 EntityDetailType
.NOMENCLATURALSTATUS
,
303 getConversationHolder(), parent
, Section
.TWISTIE
);
305 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
307 ProtologueSection protologSection
= (ProtologueSection
) formFactory
308 .createEntityDetailSection(EntityDetailType
.PROTOLOG
,
309 getConversationHolder(), parent
, Section
.TWISTIE
);
311 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
313 TypeDesignationSection typeDesignationSection
= (TypeDesignationSection
) formFactory
314 .createEntityDetailSection(EntityDetailType
.TYPEDESIGNATION
,
315 getConversationHolder(), parent
, Section
.TWISTIE
);
317 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
319 NameRelationshipDetailSection nameRelationshipSection
= (NameRelationshipDetailSection
) formFactory
320 .createEntityDetailSection(EntityDetailType
.NAME_RELATIONSHIP
,
321 getConversationHolder(), parent
, Section
.TWISTIE
);
323 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
325 ParsingMessagesSection parsingMessagesSection
= (ParsingMessagesSection
) formFactory
326 .createCdmDetailSection(DetailType
.PARSINGMESSAGE
,
327 getConversationHolder(), parent
, this, Section
.EXPANDED
);
329 addPart(taxonBaseDetailSection
);
330 addPart(nonViralNameSection
);
331 addPart(nomenclaturalStatusSection
);
332 addPart(protologSection
);
333 addPart(referenceDetailSection
);
334 addPart(typeDesignationSection
);
335 addPart(nameRelationshipSection
);
336 addPart(parsingMessagesSection
);
339 private void createNameSections(RootElement parent
) {
341 NonViralNameDetailSection nonViralNameSection
= (NonViralNameDetailSection
) formFactory
342 .createCdmDetailSection(DetailType
.NONVIRALNAME
,
343 getConversationHolder(), parent
, this, Section
.TWISTIE
346 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
348 NomenclaturalReferenceDetailSection referenceDetailSection
= (NomenclaturalReferenceDetailSection
) formFactory
349 .createCdmDetailSection(DetailType
.NOMENCLATURALREFERENCE
,
350 getConversationHolder(), parent
, this, Section
.TWISTIE
);
352 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
354 NomenclaturalStatusSection nomenclaturalStatusSection
= (NomenclaturalStatusSection
) formFactory
355 .createEntityDetailSection(
356 EntityDetailType
.NOMENCLATURALSTATUS
,
357 getConversationHolder(), parent
, Section
.TWISTIE
);
359 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
361 ProtologueSection protologSection
= (ProtologueSection
) formFactory
362 .createEntityDetailSection(EntityDetailType
.PROTOLOG
,
363 getConversationHolder(), parent
, Section
.TWISTIE
);
365 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
367 TypeDesignationSection typeDesignationSection
= (TypeDesignationSection
) formFactory
368 .createEntityDetailSection(EntityDetailType
.TYPEDESIGNATION
,
369 getConversationHolder(), parent
, Section
.TWISTIE
);
371 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
373 NameRelationshipDetailSection nameRelationshipSection
= (NameRelationshipDetailSection
) formFactory
374 .createEntityDetailSection(EntityDetailType
.NAME_RELATIONSHIP
,
375 getConversationHolder(), parent
, Section
.TWISTIE
);
377 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
379 addPart(nonViralNameSection
);
380 addPart(nomenclaturalStatusSection
);
381 addPart(protologSection
);
382 addPart(referenceDetailSection
);
383 addPart(typeDesignationSection
);
384 addPart(nameRelationshipSection
);
387 private void createReferenceSections(RootElement parent
) {
390 ReferenceDetailSection referenceDetailSection
= (ReferenceDetailSection
) formFactory
391 .createCdmDetailSection(DetailType
.REFERENCEBASE
,
392 getConversationHolder(), parent
, this, Section
.TWISTIE
395 addPart(referenceDetailSection
);
398 private void createTeamOrPersonBaseDetailSection(RootElement parent
) {
400 TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection
= (TeamOrPersonBaseDetailSection
) formFactory
401 .createCdmDetailSection(DetailType
.TEAMORPERSONBASE
,
402 getConversationHolder(), parent
, this, Section
.TWISTIE
405 addPart(teamOrPersonBaseDetailSection
);
408 private void createTeamDetailSection(RootElement parent
) {
410 TeamDetailSection teamDetailSection
= (TeamDetailSection
) formFactory
411 .createCdmDetailSection(DetailType
.TEAM
,
412 getConversationHolder(), parent
, this, Section
.TWISTIE
415 addPart(teamDetailSection
);
418 private void createPersonDetailSection(RootElement parent
) {
420 PersonDetailSection personDetailSection
= (PersonDetailSection
) formFactory
421 .createCdmDetailSection(DetailType
.PERSON
,
422 getConversationHolder(), parent
, this, Section
.TWISTIE
424 addPart(personDetailSection
);
427 private void createDescriptionElementSection(RootElement parent
) {
430 DescriptionElementDetailSection descriptionElementDetailSection
= (DescriptionElementDetailSection
) formFactory
431 .createCdmDetailSection(DetailType
.DESCRIPTIONELEMENT
,
432 getConversationHolder(), parent
, this, Section
.TWISTIE
435 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
437 DescriptionElementSourceSection descriptionElementSourceSection
= (DescriptionElementSourceSection
) formFactory
438 .createEntityDetailSection(
439 EntityDetailType
.DESCRIPTIONELEMENTSOURCE
,
440 getConversationHolder(), parent
, Section
.TWISTIE
);
442 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
444 DescriptionElementMediaSection descriptionElementMediaSection
= (DescriptionElementMediaSection
) formFactory
445 .createEntityDetailSection(
446 EntityDetailType
.DESCRIPTIONELEMENTMEDIA
,
447 getConversationHolder(), parent
, Section
.TWISTIE
);
449 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
451 addPart(descriptionElementDetailSection
);
452 addPart(descriptionElementSourceSection
);
453 addPart(descriptionElementMediaSection
);
456 private void createDescriptionSection(RootElement parent
) {
458 DescriptionDetailSection descriptionDetailSection
= (DescriptionDetailSection
) formFactory
459 .createCdmDetailSection(DetailType
.DESCRIPTION
,
460 getConversationHolder(), parent
, this, Section
.TWISTIE
463 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
465 NaturalLanguageSection naturalLanguageSection
= (NaturalLanguageSection
) formFactory
466 .createCdmDetailSection(DetailType
.NATURAL_LANGUAGE
,
467 getConversationHolder(), parent
, this, Section
.TWISTIE
470 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
472 DescribedSpecimenSection describedSpecimenSection
= (DescribedSpecimenSection
) formFactory
473 .createEntityDetailSection(EntityDetailType
.DESCRIBED_SPECIMEN
,
474 getConversationHolder(), parent
, Section
.TWISTIE
);
476 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
478 DescriptionSourceSection descriptionSourceSection
= (DescriptionSourceSection
) formFactory
479 .createEntityDetailSection(EntityDetailType
.DESCRIPTIONSOURCE
,
480 getConversationHolder(), parent
, Section
.TWISTIE
);
482 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
484 ScopeSection scopeSection
= (ScopeSection
) formFactory
485 .createEntityDetailSection(EntityDetailType
.SCOPE
,
486 getConversationHolder(), parent
, Section
.TWISTIE
);
488 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
490 addPart(descriptionDetailSection
);
491 addPart(naturalLanguageSection
);
492 addPart(describedSpecimenSection
);
493 addPart(descriptionSourceSection
);
494 addPart(scopeSection
);
500 private void createImageGallerySection(RootElement parent
) {
502 DescriptionDetailSection descriptionDetailSection
= (DescriptionDetailSection
) formFactory
503 .createCdmDetailSection(DetailType
.DESCRIPTION
,
504 getConversationHolder(), parent
, this, Section
.TWISTIE
507 addPart(descriptionDetailSection
);
510 private void createMediaElementSection(RootElement parent
) {
512 MediaDetailsSection mediaDetailSection
= (MediaDetailsSection
) formFactory
513 .createCdmDetailSection(DetailType
.MEDIA
,
514 getConversationHolder(), parent
, this, Section
.TWISTIE
517 addPart(mediaDetailSection
);
520 private void createDerivedUnitBaseElementSection(RootElement parent
) {
523 GeneralDetailSection generalDetailSection
= (GeneralDetailSection
) formFactory
524 .createCdmDetailSection(DetailType
.DERIVED_UNIT_GENERAL
,
525 getConversationHolder(), parent
, this, Section
.TWISTIE
528 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
530 GatheringEventDetailSection gatheringEventDetailSection
= (GatheringEventDetailSection
) formFactory
531 .createCdmDetailSection(DetailType
.GATHERING_EVENT
,
532 getConversationHolder(), parent
, this, Section
.TWISTIE
);
534 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
536 FieldObservationDetailSection fieldObservationDetailSection
= (FieldObservationDetailSection
) formFactory
537 .createCdmDetailSection(DetailType
.FIELD_OBSERVATION
,
538 getConversationHolder(), parent
, this, Section
.TWISTIE
);
540 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
542 DerivedUnitBaseDetailSection derivedUnitBaseDetailSection
= (DerivedUnitBaseDetailSection
) formFactory
543 .createCdmDetailSection(DetailType
.DERIVED_UNIT
,
544 getConversationHolder(), parent
, this, Section
.TWISTIE
);
547 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
549 DeterminationDetailSection determinationDetailSection
= (DeterminationDetailSection
) formFactory
550 .createCdmDetailSection(DetailType
.DETERMINATION
,
551 getConversationHolder(), parent
, this, Section
.TWISTIE
);
553 addPart(generalDetailSection
);
554 addPart(gatheringEventDetailSection
);
555 addPart(fieldObservationDetailSection
);
556 addPart(derivedUnitBaseDetailSection
);
557 addPart(determinationDetailSection
);
564 private void createFeatureDistributionSection(RootElement parent
) {
567 FeatureDistributionDetailSection featureDistributionSection
= (FeatureDistributionDetailSection
) formFactory
568 .createCdmDetailSection(DetailType
.FEATURE_DISTRIBUTION
,
569 getConversationHolder(), parent
, this, Section
.TWISTIE
572 addPart(featureDistributionSection
);
575 private void createPolytomousKeySection(RootElement parent
) {
578 PolytomousKeyDetailSection polytomousKeyDetailSection
= (PolytomousKeyDetailSection
) formFactory
579 .createCdmDetailSection(DetailType
.POLYTOMOUS_KEY
,
580 getConversationHolder(), parent
, this, Section
.TWISTIE
583 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
585 GeographicalScopeDetailSection geographicalScopeDetailSection
= (GeographicalScopeDetailSection
) formFactory
586 .createEntityDetailSection(EntityDetailType
.GEOGRAPHICAL_SCOPE
,
587 getConversationHolder(), parent
, Section
.TWISTIE
);
589 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
591 ScopeRestrictionSection scopeRestrictionSection
= (ScopeRestrictionSection
) formFactory
592 .createEntityDetailSection(EntityDetailType
.SCOPE_RESTRICTION
,
593 getConversationHolder(), parent
, Section
.TWISTIE
);
595 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
597 TaxonomicScopeSection taxonomicScopeSection
= (TaxonomicScopeSection
) formFactory
598 .createEntityDetailSection(EntityDetailType
.TAXONOMIC_SCOPE
,
599 getConversationHolder(), parent
, Section
.TWISTIE
);
601 addPart(polytomousKeyDetailSection
);
602 addPart(geographicalScopeDetailSection
);
603 addPart(scopeRestrictionSection
);
604 addPart(taxonomicScopeSection
);
607 private void createPolytomousKeyNodeSection(RootElement parent
) {
610 PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection
= (PolytomousKeyNodeDetailSection
) formFactory
611 .createCdmDetailSection(DetailType
.POLYTOMOUS_KEY_NODE
,
612 getConversationHolder(), parent
, this, Section
.TWISTIE
615 addPart(polytomousKeyNodeDetailSection
);
618 private void createUserSection(RootElement parent
) {
621 UserDetailSection userDetailSection
= (UserDetailSection
) formFactory
622 .createCdmDetailSection(DetailType
.USER
,
623 getConversationHolder(), parent
, this, Section
.TWISTIE
626 GroupsByUserDetailSection groupByUserDetailSection
= (GroupsByUserDetailSection
) formFactory
627 .createEntityDetailSection(EntityDetailType
.GROUPS_BY_USER
,
628 getConversationHolder(), parent
, Section
.TWISTIE
631 addPart(userDetailSection
);
632 addPart(groupByUserDetailSection
);
635 private void createTaxonRelationshipSection(RootElement parent
) {
638 TaxonRelationshipDetailSection taxonRelationshipDetailSection
= (TaxonRelationshipDetailSection
) formFactory
639 .createCdmDetailSection(DetailType
.TAXON_RELATIONSHIP
,
640 getConversationHolder(), parent
, this, Section
.TWISTIE
643 ReferencedEntityDetailSection referencedEntityBaseDetailSection
= (ReferencedEntityDetailSection
) formFactory
644 .createCdmDetailSection(DetailType
.REFERENCED_ENTITY
,
645 getConversationHolder(), parent
, this, Section
.TWISTIE
647 addPart(taxonRelationshipDetailSection
);
648 addPart(referencedEntityBaseDetailSection
);
654 private void createTermVocabularySection(RootElement parent
) {
657 TermVocabularyDetailSection termVocabularyDetailSection
= (TermVocabularyDetailSection
) formFactory
658 .createCdmDetailSection(DetailType
.TERM_VOCABULARY
,
659 getConversationHolder(), parent
, this, Section
.TWISTIE
661 addPart(termVocabularyDetailSection
);
664 private void createDefinedTermSection(RootElement parent
) {
667 AbstractFormSection definedTermDetailSection
= formFactory
668 .createDefinedTermDetailSection(getInput().getClass(),
669 getConversationHolder(), parent
, this, Section
.TWISTIE
671 addPart(definedTermDetailSection
);