3 * Copyright (C) 2011 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
;
15 import org
.eclipse
.jface
.viewers
.ISelection
;
16 import org
.eclipse
.jface
.viewers
.SelectionChangedEvent
;
17 import org
.eclipse
.swt
.SWT
;
18 import org
.eclipse
.swt
.widgets
.Composite
;
19 import org
.eclipse
.ui
.forms
.widgets
.ExpandableComposite
;
21 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
22 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacadeNotSupportedException
;
23 import eu
.etaxonomy
.cdm
.api
.service
.ITermService
;
24 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
25 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
26 import eu
.etaxonomy
.cdm
.model
.agent
.TeamOrPersonBase
;
27 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
28 import eu
.etaxonomy
.cdm
.model
.common
.Group
;
29 import eu
.etaxonomy
.cdm
.model
.common
.Marker
;
30 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
31 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
32 import eu
.etaxonomy
.cdm
.model
.common
.User
;
33 import eu
.etaxonomy
.cdm
.model
.description
.CategoricalData
;
34 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionBase
;
35 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
36 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
37 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKeyNode
;
38 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
39 import eu
.etaxonomy
.cdm
.model
.name
.NonViralName
;
40 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnitBase
;
41 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
42 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
43 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationship
;
44 import eu
.etaxonomy
.taxeditor
.editor
.UsageTermCollection
;
45 import eu
.etaxonomy
.taxeditor
.model
.AbstractUtility
;
46 import eu
.etaxonomy
.taxeditor
.model
.FeatureNodeContainer
;
47 import eu
.etaxonomy
.taxeditor
.model
.PolytomousKeyRelationship
;
48 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
49 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
50 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractFormSection
;
51 import eu
.etaxonomy
.taxeditor
.ui
.element
.RootElement
;
52 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
53 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
54 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
55 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
56 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
57 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
58 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
59 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
60 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
61 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
62 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
63 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
64 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
65 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
66 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
67 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
68 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
69 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
70 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
71 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
72 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
73 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
74 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
75 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
76 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
77 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
78 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
79 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldObservationDetailSection
;
80 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
81 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GeneralDetailSection
;
82 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
83 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
84 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
85 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
86 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
87 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
88 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
89 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
90 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
91 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmDataViewer
;
92 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmViewPart
;
96 * The DetailsViewer handles the content of the details view (
97 * {@link DetailsViewPart}).<br>
98 * Depending on the type of the selected element the section of the details view
102 * @created Feb 12, 2010
105 public class DetailsViewer
extends AbstractCdmDataViewer
{
107 private ISelection selection
;
111 * Constructor for DetailsViewer.
115 * a {@link org.eclipse.swt.widgets.Composite} object.
117 * a {@link eu.etaxonomy.taxeditor.view.AbstractCdmViewPart}
120 public DetailsViewer(Composite parent
, AbstractCdmViewPart viewPart
) {
121 super(parent
, viewPart
);
124 // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
125 // since we are getting implementations of DerivedUnitBase from the bulk
127 // and not derived unit facade objects,
133 * eu.etaxonomy.taxeditor.editor.view.AbstractCdmDataViewer#setInput(java
137 public void setInput(Object input
) {
138 if (input
instanceof DerivedUnitBase
) {
140 input
= DerivedUnitFacade
.NewInstance((DerivedUnitBase
) input
,
141 PreferencesUtil
.getDerivedUnitConfigurator());
142 } catch (DerivedUnitFacadeNotSupportedException e
) {
143 AbstractUtility
.error(getClass(), e
);
146 super.setInput(input
);
150 protected void markViewPartDirty() {
151 if (getInput() instanceof DerivedUnitFacade
) {
152 getViewPart().changed(((DerivedUnitFacade
) getInput()).innerDerivedUnit());
155 super.markViewPartDirty();
158 // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
163 * @see org.eclipse.jface.viewers.Viewer#refresh()
167 protected void showParts() {
168 // FIXME (CM) : Need to clean out this code.
169 // Too much type checking to decide which detail view to display.
170 // Need to build in a mechanism where navigators / editors are 'aware'
171 // of the corresponding detail viewer.
172 Object input
= getInput();
173 if (input
instanceof TaxonBase
) {
174 createTaxonSections(rootElement
);
176 } else if (input
instanceof NonViralName
) {
177 createNameSections(rootElement
);
179 } else if (input
instanceof Reference
) {
180 createReferenceSections(rootElement
);
182 } else if (input
instanceof Team
) {
183 createTeamDetailSection(rootElement
);
185 } else if (input
instanceof Person
) {
186 createPersonDetailSection(rootElement
);
188 } else if (input
instanceof TeamOrPersonBase
) {
189 createTeamOrPersonBaseDetailSection(rootElement
);
191 } else if (input
instanceof DescriptionBase
) {
192 Set
<Marker
> descriptionMarkers
= ((DescriptionBase
) input
).getMarkers();
193 MarkerType useMarkertype
= (MarkerType
) CdmStore
.getService(ITermService
.class).find(
194 UsageTermCollection
.uuidUseMarkerType
);
195 Boolean isUseDescription
= false;
196 for (Marker marker
: descriptionMarkers
) {
197 if (marker
.getMarkerType().equals(useMarkertype
)) {
198 isUseDescription
= true;
201 if (((DescriptionBase
) input
).isImageGallery()) {
202 createImageGallerySection(rootElement
);
204 } else if (isUseDescription
) {
205 createUseDescriptionSection(rootElement
);
207 createDescriptionSection(rootElement
);
210 } else if (input
instanceof DescriptionElementBase
) {
211 Set
<Marker
> descriptionMarkers
= ((DescriptionElementBase
) input
).getInDescription().getMarkers();
212 MarkerType useMarkertype
= (MarkerType
) CdmStore
.getService(ITermService
.class).find(
213 UsageTermCollection
.uuidUseMarkerType
);
214 Boolean isUseDescription
= false;
215 for (Marker marker
: descriptionMarkers
) {
216 if (marker
.getMarkerType().equals(useMarkertype
)) {
217 isUseDescription
= true;
221 if (isUseDescription
== true && input
instanceof CategoricalData
) {
222 createUseRecordSection(rootElement
);
224 createDescriptionElementSection(rootElement
);
227 } else if (input
instanceof Media
) {
228 createMediaElementSection(rootElement
);
230 } else if (input
instanceof DerivedUnitFacade
) {
231 createDerivedUnitBaseElementSection(rootElement
);
233 } else if (input
instanceof FeatureNodeContainer
) {
234 createFeatureDistributionSection(rootElement
);
236 } else if (input
instanceof PolytomousKey
) {
237 // createPolytomousKeySection(rootElement);
239 } else if ((input
instanceof PolytomousKeyNode
) || (input
instanceof PolytomousKeyRelationship
)) {
240 createPolytomousKeyNodeSection(rootElement
);
241 } else if (input
instanceof User
) {
242 createUserSection(rootElement
);
243 } else if (input
instanceof Group
) {
244 createGroupSection(rootElement
);
245 } else if (input
instanceof TaxonRelationship
) {
246 createTaxonRelationshipSection(rootElement
);
247 } else if (input
instanceof TermVocabulary
) {
248 createTermVocabularySection(rootElement
);
249 } else if (input
instanceof DefinedTermBase
) {
250 createDefinedTermSection(rootElement
);
260 private void createGroupSection(RootElement parent
) {
263 GroupDetailSection groupDetailSection
= formFactory
.createGroupDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
264 MemberDetailSection memberDetailSection
= formFactory
.createMemberDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
265 GrantedAuthorityDetailSection grantedAuthorityDetailSection
= formFactory
.createGrantedAuthorityDetailSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
267 addPart(groupDetailSection
);
268 addPart(memberDetailSection
);
269 addPart(grantedAuthorityDetailSection
);
275 * @see org.eclipse.jface.viewers.Viewer#getSelection()
279 public ISelection
getSelection() {
287 * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
288 * .ISelection, boolean)
292 public void setSelection(ISelection selection
, boolean reveal
) {
293 this.selection
= selection
;
294 SelectionChangedEvent selectionChangedEvent
= new SelectionChangedEvent(this, selection
);
295 fireSelectionChanged(selectionChangedEvent
);
299 * createTaxonSections(RootElement parent)
303 private void createTaxonSections(RootElement parent
) {
306 TaxonBaseDetailSection taxonBaseDetailSection
= formFactory
.createTaxonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
308 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
310 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
311 | ExpandableComposite
.EXPANDED
);
313 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
315 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
317 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
319 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
);
321 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
323 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
325 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
327 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
329 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
331 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
333 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
335 ParsingMessagesSection parsingMessagesSection
= formFactory
.createParsingMessagesSection(getConversationHolder(), parent
, this, ExpandableComposite
.EXPANDED
);
337 addPart(taxonBaseDetailSection
);
338 addPart(nonViralNameSection
);
339 addPart(nomenclaturalStatusSection
);
340 addPart(protologSection
);
341 addPart(referenceDetailSection
);
342 addPart(typeDesignationSection
);
343 addPart(nameRelationshipSection
);
344 addPart(parsingMessagesSection
);
352 private void createNameSections(RootElement parent
) {
354 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
356 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
358 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
360 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
362 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
364 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
366 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
368 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
370 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
372 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
374 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
376 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
378 addPart(nonViralNameSection
);
379 addPart(nomenclaturalStatusSection
);
380 addPart(protologSection
);
381 addPart(referenceDetailSection
);
382 addPart(typeDesignationSection
);
383 addPart(nameRelationshipSection
);
387 * createReferenceSections
391 private void createReferenceSections(RootElement parent
) {
394 ReferenceDetailSection referenceDetailSection
= formFactory
.createReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
396 addPart(referenceDetailSection
);
400 * createTeamOrPersonBaseDetailSection
404 private void createTeamOrPersonBaseDetailSection(RootElement parent
) {
406 TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection
= formFactory
.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
408 addPart(teamOrPersonBaseDetailSection
);
412 * createTeamDetailSection
416 private void createTeamDetailSection(RootElement parent
) {
418 TeamDetailSection teamDetailSection
= formFactory
.createTeamDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
420 addPart(teamDetailSection
);
424 * createPersonDetailSection
428 private void createPersonDetailSection(RootElement parent
) {
430 PersonDetailSection personDetailSection
= formFactory
.createPersonDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
431 addPart(personDetailSection
);
435 * createDescriptionElementSection
439 private void createDescriptionElementSection(RootElement parent
) {
442 DescriptionElementDetailSection descriptionElementDetailSection
= formFactory
.createDescriptionElementDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
444 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
446 DescriptionElementSourceSection descriptionElementSourceSection
= formFactory
.createDescriptionElementSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
448 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
450 DescriptionElementMediaSection descriptionElementMediaSection
= formFactory
.createDescriptionElementMediaSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
452 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
454 addPart(descriptionElementDetailSection
);
455 addPart(descriptionElementSourceSection
);
456 addPart(descriptionElementMediaSection
);
460 * createDescriptionSection
464 private void createDescriptionSection(RootElement parent
) {
466 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
468 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
470 NaturalLanguageSection naturalLanguageSection
= formFactory
.createNaturalLanguageSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
472 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
474 DescribedSpecimenSection describedSpecimenSection
= formFactory
.createDescribedSpecimenSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
476 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
478 DescriptionSourceSection descriptionSourceSection
= formFactory
.createDescriptionSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
480 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
482 ScopeSection scopeSection
= formFactory
.createScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
484 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
486 addPart(descriptionDetailSection
);
487 addPart(naturalLanguageSection
);
488 addPart(describedSpecimenSection
);
489 addPart(descriptionSourceSection
);
490 addPart(scopeSection
);
494 * Creates the use Description section
498 private void createUseDescriptionSection(RootElement parent
) {
500 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
502 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
504 DescriptionSourceSection descriptionSourceSection
= formFactory
.createDescriptionSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
506 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
508 addPart(descriptionDetailSection
);
509 addPart(descriptionSourceSection
);
516 private void createImageGallerySection(RootElement parent
) {
518 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
520 addPart(descriptionDetailSection
);
524 * createMediaElementSection
529 private void createMediaElementSection(RootElement parent
) {
531 MediaDetailsSection mediaDetailSection
= formFactory
.createMediaDetailsSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
533 addPart(mediaDetailSection
);
537 * createDerivedUnitBaseElementSection
541 private void createDerivedUnitBaseElementSection(RootElement parent
) {
544 GeneralDetailSection generalDetailSection
= formFactory
.createGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
546 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
548 GatheringEventDetailSection gatheringEventDetailSection
= formFactory
.createGatheringEventDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
550 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
552 FieldObservationDetailSection fieldObservationDetailSection
= formFactory
.createFieldObservationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
554 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
556 DerivedUnitBaseDetailSection derivedUnitBaseDetailSection
= formFactory
.createDerivedUnitBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
558 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
560 DeterminationDetailSection determinationDetailSection
= formFactory
.createDeterminationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
562 addPart(generalDetailSection
);
563 addPart(gatheringEventDetailSection
);
564 addPart(fieldObservationDetailSection
);
565 addPart(derivedUnitBaseDetailSection
);
566 addPart(determinationDetailSection
);
572 private void createFeatureDistributionSection(RootElement parent
) {
575 FeatureDistributionDetailSection featureDistributionSection
= formFactory
.createFeatureDistributionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
577 addPart(featureDistributionSection
);
581 * createPolytomousKeyNodeSection
585 private void createPolytomousKeyNodeSection(RootElement parent
) {
588 PolytomousKeyDetailSection polytomousKeyDetailSection
= formFactory
.createPolytomousKeyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
590 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
592 PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection
= formFactory
.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
594 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
596 TaxonomicScopeSection taxonomicScopeSection
= formFactory
.createTaxonomicScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
598 addPart(polytomousKeyDetailSection
);
599 addPart(polytomousKeyNodeDetailSection
);
600 addPart(taxonomicScopeSection
);
605 * create the UseRecordSection
609 private void createUseRecordSection(RootElement parent
) {
612 UseRecordDetailSection descriptionUseRecordSection
= formFactory
.createUseRecordDetailSection(getConversationHolder(), parent
, this,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
614 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
616 addPart(descriptionUseRecordSection
);
625 private void createUserSection(RootElement parent
) {
628 UserDetailSection userDetailSection
= formFactory
.createUserDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
630 GroupsByUserDetailSection groupByUserDetailSection
= formFactory
.createGroupsByUserDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
632 addPart(userDetailSection
);
633 addPart(groupByUserDetailSection
);
637 * createTaxonRelationshipSection
641 private void createTaxonRelationshipSection(RootElement parent
) {
644 TaxonRelationshipDetailSection taxonRelationshipDetailSection
= formFactory
.createTaxonRelationshipDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
646 ReferencedEntityDetailSection referencedEntityBaseDetailSection
= formFactory
.createReferencedEntityDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
647 addPart(taxonRelationshipDetailSection
);
648 addPart(referencedEntityBaseDetailSection
);
654 private void createTermVocabularySection(RootElement parent
) {
657 TermVocabularyDetailSection termVocabularyDetailSection
= formFactory
.createTermVocabularyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
658 addPart(termVocabularyDetailSection
);
662 * createDefinedTermSection
666 private void createDefinedTermSection(RootElement parent
) {
669 AbstractFormSection definedTermDetailSection
= formFactory
.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
670 addPart(definedTermDetailSection
);
673 private void createFODetailsView(RootElement parent
) {
676 GeneralDetailSection generalDetailSection
= formFactory
.createFOSection(getConversationHolder(), parent
, this,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
678 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
680 GatheringEventDetailSection gatheringEventDetailSection
= formFactory
.createGatheringSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
682 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
684 FieldObservationDetailSection fieldObservationDetailSection
= formFactory
.createFODetailsSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
686 addPart(generalDetailSection
);
687 addPart(gatheringEventDetailSection
);
688 addPart(fieldObservationDetailSection
);