4 * Copyright (C) 2011 EDIT
5 * European Distributed Institute of Taxonomy
6 * http://www.e-taxonomy.eu
8 * The contents of this file are subject to the Mozilla Public License Version 1.1
9 * See LICENSE.TXT at the top of this package for the full license terms.
12 package eu
.etaxonomy
.taxeditor
.view
.detail
;
16 import org
.eclipse
.jface
.viewers
.ISelection
;
17 import org
.eclipse
.jface
.viewers
.SelectionChangedEvent
;
18 import org
.eclipse
.swt
.SWT
;
19 import org
.eclipse
.swt
.widgets
.Composite
;
20 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
22 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
23 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacadeNotSupportedException
;
24 import eu
.etaxonomy
.cdm
.api
.service
.ITermService
;
25 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
26 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
27 import eu
.etaxonomy
.cdm
.model
.agent
.TeamOrPersonBase
;
28 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
29 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
30 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
31 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
32 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
33 import eu
.etaxonomy
.cdm
.model
.common
.User
;
34 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
35 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionBase
;
36 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
37 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
38 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKeyNode
;
39 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
40 import eu
.etaxonomy
.cdm
.model
.name
.NonViralName
;
41 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
42 import eu
.etaxonomy
.cdm
.model
.occurrence
.FieldUnit
;
43 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationType
;
44 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
45 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
46 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationship
;
47 import eu
.etaxonomy
.taxeditor
.editor
.UsageTermCollection
;
48 import eu
.etaxonomy
.taxeditor
.model
.AbstractUtility
;
49 import eu
.etaxonomy
.taxeditor
.model
.FeatureNodeContainer
;
50 import eu
.etaxonomy
.taxeditor
.model
.PolytomousKeyRelationship
;
51 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
52 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
53 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractFormSection
;
54 import eu
.etaxonomy
.taxeditor
.ui
.element
.RootElement
;
55 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
56 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
57 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
58 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
59 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
60 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
61 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
62 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
63 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
64 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
65 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
66 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
67 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
68 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
69 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
70 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
71 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
72 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
73 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
74 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
75 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
76 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
77 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
78 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
79 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
80 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
81 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
82 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
83 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
84 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
85 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
86 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
87 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
88 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
89 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
90 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
91 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
92 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
93 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
94 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
95 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmDataViewer
;
96 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmViewPart
;
100 * The DetailsViewer handles the content of the details view (
101 * {@link DetailsViewPart}).<br>
102 * Depending on the type of the selected element the section of the details view
106 * @created Feb 12, 2010
109 public class DetailsViewer
extends AbstractCdmDataViewer
{
111 private ISelection selection
;
115 * Constructor for DetailsViewer.
119 * a {@link org.eclipse.swt.widgets.Composite} object.
121 * a {@link eu.etaxonomy.taxeditor.view.AbstractCdmViewPart}
124 public DetailsViewer(Composite parent
, AbstractCdmViewPart viewPart
) {
125 super(parent
, viewPart
);
128 // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
129 // since we are getting implementations of DerivedUnitBase from the bulk
131 // and not derived unit facade objects,
137 * eu.etaxonomy.taxeditor.editor.view.AbstractCdmDataViewer#setInput(java
141 public void setInput(Object input
) {
142 if (input
instanceof DerivedUnit
) {
144 input
= DerivedUnitFacade
.NewInstance((DerivedUnit
) input
,
145 PreferencesUtil
.getDerivedUnitConfigurator());
146 } catch (DerivedUnitFacadeNotSupportedException e
) {
147 AbstractUtility
.error(getClass(), e
);
150 else if(input
instanceof FieldUnit
){
151 input
= DerivedUnitFacade
.NewInstance(SpecimenOrObservationType
.FieldUnit
, (FieldUnit
) input
);
153 super.setInput(input
);
157 protected void markViewPartDirty() {
158 if (getInput() instanceof DerivedUnitFacade
) {
159 getViewPart().changed(((DerivedUnitFacade
) getInput()).innerDerivedUnit());
162 super.markViewPartDirty();
165 // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
170 * @see org.eclipse.jface.viewers.Viewer#refresh()
174 protected void showParts() {
175 // FIXME (CM) : Need to clean out this code.
176 // Too much type checking to decide which detail view to display.
177 // Need to build in a mechanism where navigators / editors are 'aware'
178 // of the corresponding detail viewer.
179 Object input
= getInput();
180 if (input
instanceof TaxonBase
) {
181 createTaxonSections(rootElement
);
183 } else if (input
instanceof NonViralName
) {
184 createNameSections(rootElement
);
186 } else if (input
instanceof Reference
) {
187 createReferenceSections(rootElement
);
189 } else if (input
instanceof Team
) {
190 createTeamDetailSection(rootElement
);
192 } else if (input
instanceof Person
) {
193 createPersonDetailSection(rootElement
);
195 } else if (input
instanceof TeamOrPersonBase
) {
196 createTeamOrPersonBaseDetailSection(rootElement
);
198 } else if (input
instanceof DescriptionBase
) {
199 Set
<Marker
> descriptionMarkers
= ((DescriptionBase
) input
).getMarkers();
200 MarkerType useMarkertype
= (MarkerType
) CdmStore
.getService(ITermService
.class).find(
201 UsageTermCollection
.uuidUseMarkerType
);
202 Boolean isUseDescription
= false;
203 for (Marker marker
: descriptionMarkers
) {
204 if (marker
.getMarkerType().equals(useMarkertype
)) {
205 isUseDescription
= true;
208 if (((DescriptionBase
) input
).isImageGallery()) {
209 createImageGallerySection(rootElement
);
211 } else if (isUseDescription
) {
212 createUseDescriptionSection(rootElement
);
214 createDescriptionSection(rootElement
);
217 } else if (input
instanceof DescriptionElementBase
) {
218 Set
<Marker
> descriptionMarkers
= ((DescriptionElementBase
) input
).getInDescription().getMarkers();
219 MarkerType useMarkertype
= (MarkerType
) CdmStore
.getService(ITermService
.class).find(
220 UsageTermCollection
.uuidUseMarkerType
);
221 Boolean isUseDescription
= false;
222 for (Marker marker
: descriptionMarkers
) {
223 if (marker
.getMarkerType().equals(useMarkertype
)) {
224 isUseDescription
= true;
228 if (isUseDescription
== true && input
instanceof CategoricalData
) {
229 createUseRecordSection(rootElement
);
231 createDescriptionElementSection(rootElement
);
234 } else if (input
instanceof Media
) {
235 createMediaElementSection(rootElement
);
237 } else if (input
instanceof DerivedUnitFacade
) {
238 if(((DerivedUnitFacade
) input
).getType()==SpecimenOrObservationType
.FieldUnit
){
239 createFieldUnitSection(rootElement
);
242 createDerivedUnitBaseElementSection(rootElement
);
245 } else if (input
instanceof FieldUnit
) {
246 createFieldUnitSection(rootElement
);
248 } else if (input
instanceof FeatureNodeContainer
) {
249 createFeatureDistributionSection(rootElement
);
251 } else if (input
instanceof PolytomousKey
) {
252 //createPolytomousKeySection(rootElement);
254 } else if ((input
instanceof PolytomousKeyNode
) || (input
instanceof PolytomousKeyRelationship
)) {
255 createPolytomousKeyNodeSection(rootElement
);
256 } else if (input
instanceof User
) {
257 createUserSection(rootElement
);
258 } else if (input
instanceof Group
) {
259 createGroupSection(rootElement
);
260 } else if (input
instanceof TaxonRelationship
) {
261 createTaxonRelationshipSection(rootElement
);
262 } else if (input
instanceof TermVocabulary
) {
263 createTermVocabularySection(rootElement
);
264 } else if (input
instanceof DefinedTermBase
) {
265 createDefinedTermSection(rootElement
);
276 private void createGroupSection(RootElement parent
) {
279 GroupDetailSection groupDetailSection
= formFactory
.createGroupDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
280 MemberDetailSection memberDetailSection
= formFactory
.createMemberDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
281 GrantedAuthorityDetailSection grantedAuthorityDetailSection
= formFactory
.createGrantedAuthorityDetailSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
283 addPart(groupDetailSection
);
284 addPart(memberDetailSection
);
285 addPart(grantedAuthorityDetailSection
);
291 * @see org.eclipse.jface.viewers.Viewer#getSelection()
295 public ISelection
getSelection() {
303 * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
304 * .ISelection, boolean)
308 public void setSelection(ISelection selection
, boolean reveal
) {
309 this.selection
= selection
;
310 SelectionChangedEvent selectionChangedEvent
= new SelectionChangedEvent(this, selection
);
311 fireSelectionChanged(selectionChangedEvent
);
315 * createTaxonSections(RootElement parent)
319 private void createTaxonSections(RootElement parent
) {
322 TaxonBaseDetailSection taxonBaseDetailSection
= formFactory
.createTaxonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
324 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
326 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
327 | ExpandableComposite
.EXPANDED
);
329 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
331 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
333 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
335 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
);
337 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
339 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
341 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
343 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
345 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
347 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
349 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
351 ParsingMessagesSection parsingMessagesSection
= formFactory
.createParsingMessagesSection(getConversationHolder(), parent
, this, ExpandableComposite
.EXPANDED
);
353 addPart(taxonBaseDetailSection
);
354 addPart(nonViralNameSection
);
355 addPart(nomenclaturalStatusSection
);
356 addPart(protologSection
);
357 addPart(referenceDetailSection
);
358 addPart(typeDesignationSection
);
359 addPart(nameRelationshipSection
);
360 addPart(parsingMessagesSection
);
368 private void createNameSections(RootElement parent
) {
370 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
372 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
374 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
376 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
378 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
380 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
382 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
384 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
386 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
388 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
390 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
392 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
394 addPart(nonViralNameSection
);
395 addPart(nomenclaturalStatusSection
);
396 addPart(protologSection
);
397 addPart(referenceDetailSection
);
398 addPart(typeDesignationSection
);
399 addPart(nameRelationshipSection
);
403 * createReferenceSections
407 private void createReferenceSections(RootElement parent
) {
410 ReferenceDetailSection referenceDetailSection
= formFactory
.createReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
412 addPart(referenceDetailSection
);
416 * createTeamOrPersonBaseDetailSection
420 private void createTeamOrPersonBaseDetailSection(RootElement parent
) {
422 TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection
= formFactory
.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
424 addPart(teamOrPersonBaseDetailSection
);
428 * createTeamDetailSection
432 private void createTeamDetailSection(RootElement parent
) {
434 TeamDetailSection teamDetailSection
= formFactory
.createTeamDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
436 addPart(teamDetailSection
);
440 * createPersonDetailSection
444 private void createPersonDetailSection(RootElement parent
) {
446 PersonDetailSection personDetailSection
= formFactory
.createPersonDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
447 addPart(personDetailSection
);
451 * createDescriptionElementSection
455 private void createDescriptionElementSection(RootElement parent
) {
458 DescriptionElementDetailSection descriptionElementDetailSection
= formFactory
.createDescriptionElementDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
460 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
462 DescriptionElementSourceSection descriptionElementSourceSection
= formFactory
.createDescriptionElementSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
464 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
466 DescriptionElementMediaSection descriptionElementMediaSection
= formFactory
.createDescriptionElementMediaSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
468 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
470 addPart(descriptionElementDetailSection
);
471 addPart(descriptionElementSourceSection
);
472 addPart(descriptionElementMediaSection
);
476 * createDescriptionSection
480 private void createDescriptionSection(RootElement parent
) {
482 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
484 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
486 NaturalLanguageSection naturalLanguageSection
= formFactory
.createNaturalLanguageSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
488 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
490 DescribedSpecimenSection describedSpecimenSection
= formFactory
.createDescribedSpecimenSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
492 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
494 // DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
495 // .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
496 // getConversationHolder(), parent, Section.TWISTIE);
498 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
500 ScopeSection scopeSection
= formFactory
.createScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
502 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
504 addPart(descriptionDetailSection
);
505 addPart(naturalLanguageSection
);
506 addPart(describedSpecimenSection
);
507 // addPart(descriptionSourceSection);
508 addPart(scopeSection
);
512 * Creates the use Description section
516 private void createUseDescriptionSection(RootElement parent
) {
518 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
520 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
522 DescriptionSourceSection descriptionSourceSection
= formFactory
.createDescriptionSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
524 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
526 addPart(descriptionDetailSection
);
527 addPart(descriptionSourceSection
);
535 private void createImageGallerySection(RootElement parent
) {
537 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
539 addPart(descriptionDetailSection
);
543 * createMediaElementSection
548 private void createMediaElementSection(RootElement parent
) {
550 MediaDetailsSection mediaDetailSection
= formFactory
.createMediaDetailsSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
552 addPart(mediaDetailSection
);
556 * createDerivedUnitBaseElementSection
560 private void createDerivedUnitBaseElementSection(RootElement parent
) {
563 DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection
= formFactory
.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
565 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
567 GatheringEventDetailSection gatheringEventDetailSection
= formFactory
.createGatheringEventDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
569 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
571 FieldUnitDetailSection fieldUnitDetailSection
= formFactory
.createFieldUnitDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
573 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
575 DerivedUnitBaseDetailSection derivedUnitBaseDetailSection
= formFactory
.createDerivedUnitBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
577 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
579 DeterminationDetailSection determinationDetailSection
= formFactory
.createDeterminationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
581 addPart(derivedUnitGeneralDetailSection
);
582 addPart(gatheringEventDetailSection
);
583 addPart(fieldUnitDetailSection
);
584 addPart(derivedUnitBaseDetailSection
);
585 addPart(determinationDetailSection
);
590 * createDerivedUnitBaseElementSection
594 private void createFieldUnitSection(RootElement parent
) {
597 FieldUnitGeneralDetailSection fielUnitGeneralDetailSection
= formFactory
.createFieldUnitGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
599 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
601 GatheringEventDetailSection gatheringEventDetailSection
= formFactory
.createGatheringEventDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
603 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
605 FieldUnitDetailSection fieldUnitDetailSection
= formFactory
.createFieldUnitDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
607 addPart(fielUnitGeneralDetailSection
);
608 addPart(gatheringEventDetailSection
);
609 addPart(fieldUnitDetailSection
);
615 private void createFeatureDistributionSection(RootElement parent
) {
618 FeatureDistributionDetailSection featureDistributionSection
= formFactory
.createFeatureDistributionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
620 addPart(featureDistributionSection
);
624 * createPolytomousKeyNodeSection
628 private void createPolytomousKeyNodeSection(RootElement parent
) {
631 PolytomousKeyDetailSection polytomousKeyDetailSection
= formFactory
.createPolytomousKeyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
633 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
635 PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection
= formFactory
.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
637 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
639 TaxonomicScopeSection taxonomicScopeSection
= formFactory
.createTaxonomicScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
641 addPart(polytomousKeyDetailSection
);
642 addPart(polytomousKeyNodeDetailSection
);
643 addPart(taxonomicScopeSection
);
648 * create the UseRecordSection
652 private void createUseRecordSection(RootElement parent
) {
655 UseRecordDetailSection descriptionUseRecordSection
= formFactory
.createUseRecordDetailSection(getConversationHolder(), parent
, this,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
657 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
659 addPart(descriptionUseRecordSection
);
669 private void createUserSection(RootElement parent
) {
672 UserDetailSection userDetailSection
= formFactory
.createUserDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
674 GroupsByUserDetailSection groupByUserDetailSection
= formFactory
.createGroupsByUserDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
676 addPart(userDetailSection
);
677 addPart(groupByUserDetailSection
);
681 * createTaxonRelationshipSection
685 private void createTaxonRelationshipSection(RootElement parent
) {
688 TaxonRelationshipDetailSection taxonRelationshipDetailSection
= formFactory
.createTaxonRelationshipDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
690 ReferencedEntityDetailSection referencedEntityBaseDetailSection
= formFactory
.createReferencedEntityDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
691 addPart(taxonRelationshipDetailSection
);
692 addPart(referencedEntityBaseDetailSection
);
698 private void createTermVocabularySection(RootElement parent
) {
701 TermVocabularyDetailSection termVocabularyDetailSection
= formFactory
.createTermVocabularyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
702 addPart(termVocabularyDetailSection
);
706 * createDefinedTermSection
710 private void createDefinedTermSection(RootElement parent
) {
713 AbstractFormSection definedTermDetailSection
= formFactory
.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
714 addPart(definedTermDetailSection
);