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
.DerivedUnit
;
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
.campanula
.detailViews
.fieldObservation
.FieldObservationSection
;
51 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.detailViews
.specimen
.SpecimenSection
;
52 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractFormSection
;
53 import eu
.etaxonomy
.taxeditor
.ui
.element
.RootElement
;
54 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
55 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
56 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
57 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
58 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
59 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
60 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
61 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
62 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
63 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
64 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
65 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
66 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
67 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
68 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
69 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
70 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
71 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
72 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
73 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
74 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
75 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
76 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
77 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
78 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
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
.reference
.NomenclaturalReferenceDetailSection
;
82 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
83 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
84 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
85 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
86 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
87 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
88 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
89 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
90 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmDataViewer
;
91 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmViewPart
;
95 * The DetailsViewer handles the content of the details view (
96 * {@link DetailsViewPart}).<br>
97 * Depending on the type of the selected element the section of the details view
101 * @created Feb 12, 2010
104 public class DetailsViewer
extends AbstractCdmDataViewer
{
106 private ISelection selection
;
110 * Constructor for DetailsViewer.
114 * a {@link org.eclipse.swt.widgets.Composite} object.
116 * a {@link eu.etaxonomy.taxeditor.view.AbstractCdmViewPart}
119 public DetailsViewer(Composite parent
, AbstractCdmViewPart viewPart
) {
120 super(parent
, viewPart
);
123 // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
124 // since we are getting implementations of DerivedUnitBase from the bulk
126 // and not derived unit facade objects,
132 * eu.etaxonomy.taxeditor.editor.view.AbstractCdmDataViewer#setInput(java
136 public void setInput(Object input
) {
137 if (input
instanceof DerivedUnit
) {
139 input
= DerivedUnitFacade
.NewInstance((DerivedUnit
) input
,
140 PreferencesUtil
.getDerivedUnitConfigurator());
141 } catch (DerivedUnitFacadeNotSupportedException e
) {
142 AbstractUtility
.error(getClass(), e
);
145 super.setInput(input
);
149 protected void markViewPartDirty() {
150 if (getInput() instanceof DerivedUnitFacade
) {
151 getViewPart().changed(((DerivedUnitFacade
) getInput()).innerDerivedUnit());
154 super.markViewPartDirty();
157 // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
162 * @see org.eclipse.jface.viewers.Viewer#refresh()
166 protected void showParts() {
167 // FIXME (CM) : Need to clean out this code.
168 // Too much type checking to decide which detail view to display.
169 // Need to build in a mechanism where navigators / editors are 'aware'
170 // of the corresponding detail viewer.
171 Object input
= getInput();
172 if (input
instanceof TaxonBase
) {
173 createTaxonSections(rootElement
);
175 } else if (input
instanceof NonViralName
) {
176 createNameSections(rootElement
);
178 } else if (input
instanceof Reference
) {
179 createReferenceSections(rootElement
);
181 } else if (input
instanceof Team
) {
182 createTeamDetailSection(rootElement
);
184 } else if (input
instanceof Person
) {
185 createPersonDetailSection(rootElement
);
187 } else if (input
instanceof TeamOrPersonBase
) {
188 createTeamOrPersonBaseDetailSection(rootElement
);
190 } else if (input
instanceof DescriptionBase
) {
191 Set
<Marker
> descriptionMarkers
= ((DescriptionBase
) input
).getMarkers();
192 MarkerType useMarkertype
= (MarkerType
) CdmStore
.getService(ITermService
.class).find(
193 UsageTermCollection
.uuidUseMarkerType
);
194 Boolean isUseDescription
= false;
195 for (Marker marker
: descriptionMarkers
) {
196 if (marker
.getMarkerType().equals(useMarkertype
)) {
197 isUseDescription
= true;
200 if (((DescriptionBase
) input
).isImageGallery()) {
201 createImageGallerySection(rootElement
);
203 } else if (isUseDescription
) {
204 createUseDescriptionSection(rootElement
);
206 createDescriptionSection(rootElement
);
209 } else if (input
instanceof DescriptionElementBase
) {
210 Set
<Marker
> descriptionMarkers
= ((DescriptionElementBase
) input
).getInDescription().getMarkers();
211 MarkerType useMarkertype
= (MarkerType
) CdmStore
.getService(ITermService
.class).find(
212 UsageTermCollection
.uuidUseMarkerType
);
213 Boolean isUseDescription
= false;
214 for (Marker marker
: descriptionMarkers
) {
215 if (marker
.getMarkerType().equals(useMarkertype
)) {
216 isUseDescription
= true;
220 if (isUseDescription
== true && input
instanceof CategoricalData
) {
221 createUseRecordSection(rootElement
);
223 createDescriptionElementSection(rootElement
);
226 } else if (input
instanceof Media
) {
227 createMediaElementSection(rootElement
);
229 } else if (input
instanceof DerivedUnitFacade
) {
230 createDerivedUnitBaseElementSection(rootElement
);
232 } else if (input
instanceof FeatureNodeContainer
) {
233 createFeatureDistributionSection(rootElement
);
235 } else if (input
instanceof PolytomousKey
) {
236 // createPolytomousKeySection(rootElement);
238 } else if ((input
instanceof PolytomousKeyNode
) || (input
instanceof PolytomousKeyRelationship
)) {
239 createPolytomousKeyNodeSection(rootElement
);
240 } else if (input
instanceof User
) {
241 createUserSection(rootElement
);
242 } else if (input
instanceof Group
) {
243 createGroupSection(rootElement
);
244 } else if (input
instanceof TaxonRelationship
) {
245 createTaxonRelationshipSection(rootElement
);
246 } else if (input
instanceof TermVocabulary
) {
247 createTermVocabularySection(rootElement
);
248 } else if (input
instanceof DefinedTermBase
) {
249 createDefinedTermSection(rootElement
);
259 private void createGroupSection(RootElement parent
) {
262 GroupDetailSection groupDetailSection
= formFactory
.createGroupDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
263 MemberDetailSection memberDetailSection
= formFactory
.createMemberDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
264 GrantedAuthorityDetailSection grantedAuthorityDetailSection
= formFactory
.createGrantedAuthorityDetailSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
266 addPart(groupDetailSection
);
267 addPart(memberDetailSection
);
268 addPart(grantedAuthorityDetailSection
);
274 * @see org.eclipse.jface.viewers.Viewer#getSelection()
278 public ISelection
getSelection() {
286 * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
287 * .ISelection, boolean)
291 public void setSelection(ISelection selection
, boolean reveal
) {
292 this.selection
= selection
;
293 SelectionChangedEvent selectionChangedEvent
= new SelectionChangedEvent(this, selection
);
294 fireSelectionChanged(selectionChangedEvent
);
298 * createTaxonSections(RootElement parent)
302 private void createTaxonSections(RootElement parent
) {
305 TaxonBaseDetailSection taxonBaseDetailSection
= formFactory
.createTaxonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
307 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
309 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
310 | ExpandableComposite
.EXPANDED
);
312 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
314 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
316 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
318 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
);
320 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
322 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
324 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
326 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
328 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
330 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
332 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
334 ParsingMessagesSection parsingMessagesSection
= formFactory
.createParsingMessagesSection(getConversationHolder(), parent
, this, ExpandableComposite
.EXPANDED
);
336 addPart(taxonBaseDetailSection
);
337 addPart(nonViralNameSection
);
338 addPart(nomenclaturalStatusSection
);
339 addPart(protologSection
);
340 addPart(referenceDetailSection
);
341 addPart(typeDesignationSection
);
342 addPart(nameRelationshipSection
);
343 addPart(parsingMessagesSection
);
351 private void createNameSections(RootElement parent
) {
353 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
355 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
357 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
359 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
361 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
363 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
365 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
367 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
369 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
371 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
373 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
375 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
377 addPart(nonViralNameSection
);
378 addPart(nomenclaturalStatusSection
);
379 addPart(protologSection
);
380 addPart(referenceDetailSection
);
381 addPart(typeDesignationSection
);
382 addPart(nameRelationshipSection
);
386 * createReferenceSections
390 private void createReferenceSections(RootElement parent
) {
393 ReferenceDetailSection referenceDetailSection
= formFactory
.createReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
395 addPart(referenceDetailSection
);
399 * createTeamOrPersonBaseDetailSection
403 private void createTeamOrPersonBaseDetailSection(RootElement parent
) {
405 TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection
= formFactory
.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
407 addPart(teamOrPersonBaseDetailSection
);
411 * createTeamDetailSection
415 private void createTeamDetailSection(RootElement parent
) {
417 TeamDetailSection teamDetailSection
= formFactory
.createTeamDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
419 addPart(teamDetailSection
);
423 * createPersonDetailSection
427 private void createPersonDetailSection(RootElement parent
) {
429 PersonDetailSection personDetailSection
= formFactory
.createPersonDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
430 addPart(personDetailSection
);
434 * createDescriptionElementSection
438 private void createDescriptionElementSection(RootElement parent
) {
441 DescriptionElementDetailSection descriptionElementDetailSection
= formFactory
.createDescriptionElementDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
443 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
445 DescriptionElementSourceSection descriptionElementSourceSection
= formFactory
.createDescriptionElementSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
447 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
449 DescriptionElementMediaSection descriptionElementMediaSection
= formFactory
.createDescriptionElementMediaSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
451 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
453 addPart(descriptionElementDetailSection
);
454 addPart(descriptionElementSourceSection
);
455 addPart(descriptionElementMediaSection
);
459 * createDescriptionSection
463 private void createDescriptionSection(RootElement parent
) {
465 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
467 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
469 NaturalLanguageSection naturalLanguageSection
= formFactory
.createNaturalLanguageSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
471 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
473 DescribedSpecimenSection describedSpecimenSection
= formFactory
.createDescribedSpecimenSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
475 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
477 // DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
479 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
481 ScopeSection scopeSection
= formFactory
.createScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
483 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
485 addPart(descriptionDetailSection
);
486 addPart(naturalLanguageSection
);
487 addPart(describedSpecimenSection
);
488 // addPart(descriptionSourceSection);
489 addPart(scopeSection
);
493 * Creates the use Description section
497 private void createUseDescriptionSection(RootElement parent
) {
499 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
501 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
503 DescriptionSourceSection descriptionSourceSection
= formFactory
.createDescriptionSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
505 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
507 addPart(descriptionDetailSection
);
508 addPart(descriptionSourceSection
);
515 private void createImageGallerySection(RootElement parent
) {
517 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
519 addPart(descriptionDetailSection
);
523 * createMediaElementSection
528 private void createMediaElementSection(RootElement parent
) {
530 MediaDetailsSection mediaDetailSection
= formFactory
.createMediaDetailsSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
532 addPart(mediaDetailSection
);
536 * createDerivedUnitBaseElementSection
540 private void createDerivedUnitBaseElementSection(RootElement parent
) {
543 FieldObservationSection fieldObservationSection
= formFactory
.createFieldObservationSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
545 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
547 GatheringEventDetailSection gatheringEventDetailSection
= formFactory
.createGatheringEventDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
549 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
551 FieldObservationDetailSection fieldObservationDetailSection
= formFactory
.createFieldObservationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
553 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
555 SpecimenSection specimenSection
= formFactory
.createSpecimenSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
557 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
560 // DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
562 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
564 // DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
566 addPart(fieldObservationSection
);
567 addPart(gatheringEventDetailSection
);
568 addPart(fieldObservationDetailSection
);
569 addPart(specimenSection
);
570 // addPart(derivedUnitBaseDetailSection);
571 // addPart(determinationDetailSection);
577 private void createFeatureDistributionSection(RootElement parent
) {
580 FeatureDistributionDetailSection featureDistributionSection
= formFactory
.createFeatureDistributionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
582 addPart(featureDistributionSection
);
586 * createPolytomousKeyNodeSection
590 private void createPolytomousKeyNodeSection(RootElement parent
) {
593 PolytomousKeyDetailSection polytomousKeyDetailSection
= formFactory
.createPolytomousKeyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
595 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
597 PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection
= formFactory
.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
599 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
601 TaxonomicScopeSection taxonomicScopeSection
= formFactory
.createTaxonomicScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
603 addPart(polytomousKeyDetailSection
);
604 addPart(polytomousKeyNodeDetailSection
);
605 addPart(taxonomicScopeSection
);
610 * create the UseRecordSection
614 private void createUseRecordSection(RootElement parent
) {
617 UseRecordDetailSection descriptionUseRecordSection
= formFactory
.createUseRecordDetailSection(getConversationHolder(), parent
, this,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
619 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
621 addPart(descriptionUseRecordSection
);
630 private void createUserSection(RootElement parent
) {
633 UserDetailSection userDetailSection
= formFactory
.createUserDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
635 GroupsByUserDetailSection groupByUserDetailSection
= formFactory
.createGroupsByUserDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
637 addPart(userDetailSection
);
638 addPart(groupByUserDetailSection
);
642 * createTaxonRelationshipSection
646 private void createTaxonRelationshipSection(RootElement parent
) {
649 TaxonRelationshipDetailSection taxonRelationshipDetailSection
= formFactory
.createTaxonRelationshipDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
651 ReferencedEntityDetailSection referencedEntityBaseDetailSection
= formFactory
.createReferencedEntityDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
652 addPart(taxonRelationshipDetailSection
);
653 addPart(referencedEntityBaseDetailSection
);
659 private void createTermVocabularySection(RootElement parent
) {
662 TermVocabularyDetailSection termVocabularyDetailSection
= formFactory
.createTermVocabularyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
663 addPart(termVocabularyDetailSection
);
667 * createDefinedTermSection
671 private void createDefinedTermSection(RootElement parent
) {
674 AbstractFormSection definedTermDetailSection
= formFactory
.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
675 addPart(definedTermDetailSection
);