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
.occurrence
.FieldUnit
;
42 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
43 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
44 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationship
;
45 import eu
.etaxonomy
.taxeditor
.editor
.UsageTermCollection
;
46 import eu
.etaxonomy
.taxeditor
.model
.AbstractUtility
;
47 import eu
.etaxonomy
.taxeditor
.model
.FeatureNodeContainer
;
48 import eu
.etaxonomy
.taxeditor
.model
.PolytomousKeyRelationship
;
49 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
50 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
51 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.detailViews
.fieldObservation
.FieldObservationDetailsSection
;
52 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.detailViews
.fieldObservation
.FieldObservationGeneralSection
;
53 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.detailViews
.fieldObservation
.GatheringEventSection
;
54 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.detailViews
.specimen
.SpecimenSection
;
55 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractFormSection
;
56 import eu
.etaxonomy
.taxeditor
.ui
.element
.RootElement
;
57 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
58 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
59 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
60 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
61 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescribedSpecimenSection
;
62 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
63 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
64 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
65 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
66 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
67 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
68 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
69 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
70 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
71 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
72 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
73 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
74 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
75 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
76 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.TaxonomicScopeSection
;
77 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
78 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
79 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
80 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
81 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
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 DerivedUnit
) {
140 input
= DerivedUnitFacade
.NewInstance((DerivedUnit
) input
,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 createSpecimenDetailsView(rootElement
);
232 } else if (input
instanceof FieldUnit
) {
233 createDerivedUnitBaseElementSection(rootElement
);
235 } else if (input
instanceof FeatureNodeContainer
) {
236 createFeatureDistributionSection(rootElement
);
238 } else if (input
instanceof PolytomousKey
) {
239 // createPolytomousKeySection(rootElement);
241 } else if ((input
instanceof PolytomousKeyNode
) || (input
instanceof PolytomousKeyRelationship
)) {
242 createPolytomousKeyNodeSection(rootElement
);
243 } else if (input
instanceof User
) {
244 createUserSection(rootElement
);
245 } else if (input
instanceof Group
) {
246 createGroupSection(rootElement
);
247 } else if (input
instanceof TaxonRelationship
) {
248 createTaxonRelationshipSection(rootElement
);
249 } else if (input
instanceof TermVocabulary
) {
250 createTermVocabularySection(rootElement
);
251 } else if (input
instanceof DefinedTermBase
) {
252 createDefinedTermSection(rootElement
);
262 private void createGroupSection(RootElement parent
) {
265 GroupDetailSection groupDetailSection
= formFactory
.createGroupDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
266 MemberDetailSection memberDetailSection
= formFactory
.createMemberDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
267 GrantedAuthorityDetailSection grantedAuthorityDetailSection
= formFactory
.createGrantedAuthorityDetailSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
269 addPart(groupDetailSection
);
270 addPart(memberDetailSection
);
271 addPart(grantedAuthorityDetailSection
);
277 * @see org.eclipse.jface.viewers.Viewer#getSelection()
281 public ISelection
getSelection() {
289 * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
290 * .ISelection, boolean)
294 public void setSelection(ISelection selection
, boolean reveal
) {
295 this.selection
= selection
;
296 SelectionChangedEvent selectionChangedEvent
= new SelectionChangedEvent(this, selection
);
297 fireSelectionChanged(selectionChangedEvent
);
301 * createTaxonSections(RootElement parent)
305 private void createTaxonSections(RootElement parent
) {
308 TaxonBaseDetailSection taxonBaseDetailSection
= formFactory
.createTaxonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
310 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
312 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
313 | ExpandableComposite
.EXPANDED
);
315 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
317 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
319 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
321 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
);
323 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
325 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
327 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
329 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
331 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
333 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
335 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
337 ParsingMessagesSection parsingMessagesSection
= formFactory
.createParsingMessagesSection(getConversationHolder(), parent
, this, ExpandableComposite
.EXPANDED
);
339 addPart(taxonBaseDetailSection
);
340 addPart(nonViralNameSection
);
341 addPart(nomenclaturalStatusSection
);
342 addPart(protologSection
);
343 addPart(referenceDetailSection
);
344 addPart(typeDesignationSection
);
345 addPart(nameRelationshipSection
);
346 addPart(parsingMessagesSection
);
354 private void createNameSections(RootElement parent
) {
356 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
358 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
360 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
362 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
364 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
366 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
368 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
370 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
372 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
374 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
376 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
378 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
380 addPart(nonViralNameSection
);
381 addPart(nomenclaturalStatusSection
);
382 addPart(protologSection
);
383 addPart(referenceDetailSection
);
384 addPart(typeDesignationSection
);
385 addPart(nameRelationshipSection
);
389 * createReferenceSections
393 private void createReferenceSections(RootElement parent
) {
396 ReferenceDetailSection referenceDetailSection
= formFactory
.createReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
398 addPart(referenceDetailSection
);
402 * createTeamOrPersonBaseDetailSection
406 private void createTeamOrPersonBaseDetailSection(RootElement parent
) {
408 TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection
= formFactory
.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
410 addPart(teamOrPersonBaseDetailSection
);
414 * createTeamDetailSection
418 private void createTeamDetailSection(RootElement parent
) {
420 TeamDetailSection teamDetailSection
= formFactory
.createTeamDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
422 addPart(teamDetailSection
);
426 * createPersonDetailSection
430 private void createPersonDetailSection(RootElement parent
) {
432 PersonDetailSection personDetailSection
= formFactory
.createPersonDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
433 addPart(personDetailSection
);
437 * createDescriptionElementSection
441 private void createDescriptionElementSection(RootElement parent
) {
444 DescriptionElementDetailSection descriptionElementDetailSection
= formFactory
.createDescriptionElementDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
446 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
448 DescriptionElementSourceSection descriptionElementSourceSection
= formFactory
.createDescriptionElementSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
450 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
452 DescriptionElementMediaSection descriptionElementMediaSection
= formFactory
.createDescriptionElementMediaSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
454 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
456 addPart(descriptionElementDetailSection
);
457 addPart(descriptionElementSourceSection
);
458 addPart(descriptionElementMediaSection
);
462 * createDescriptionSection
466 private void createDescriptionSection(RootElement parent
) {
468 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
470 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
472 NaturalLanguageSection naturalLanguageSection
= formFactory
.createNaturalLanguageSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
474 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
476 DescribedSpecimenSection describedSpecimenSection
= formFactory
.createDescribedSpecimenSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
478 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
480 // DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
482 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
484 ScopeSection scopeSection
= formFactory
.createScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
486 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
488 addPart(descriptionDetailSection
);
489 addPart(naturalLanguageSection
);
490 addPart(describedSpecimenSection
);
491 // addPart(descriptionSourceSection);
492 addPart(scopeSection
);
496 * Creates the use Description section
500 private void createUseDescriptionSection(RootElement parent
) {
502 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
504 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
506 DescriptionSourceSection descriptionSourceSection
= formFactory
.createDescriptionSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
508 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
510 addPart(descriptionDetailSection
);
511 addPart(descriptionSourceSection
);
518 private void createImageGallerySection(RootElement parent
) {
520 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
522 addPart(descriptionDetailSection
);
526 * createMediaElementSection
531 private void createMediaElementSection(RootElement parent
) {
533 MediaDetailsSection mediaDetailSection
= formFactory
.createMediaDetailsSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
535 addPart(mediaDetailSection
);
539 * createDerivedUnitBaseElementSection
543 private void createDerivedUnitBaseElementSection(RootElement parent
) {
546 FieldObservationGeneralSection fieldObservationSection
= formFactory
.createFieldObservationGeneralSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
548 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
550 GatheringEventSection gatheringEventDetailSection
= formFactory
.createGatheringEventSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
552 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
554 FieldObservationDetailsSection fieldObservationDetailSection
= formFactory
.createFieldObservationDetailsSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
556 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
558 // DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
560 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
562 // DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
564 addPart(fieldObservationSection
);
565 addPart(gatheringEventDetailSection
);
566 addPart(fieldObservationDetailSection
);
567 // addPart(derivedUnitBaseDetailSection);
568 // addPart(determinationDetailSection);
572 * createDerivedUnitBaseElementSection
576 private void createSpecimenDetailsView(RootElement parent
) {
579 SpecimenSection specimenSection
= formFactory
.createSpecimenSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
581 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
583 addPart(specimenSection
);
589 private void createFeatureDistributionSection(RootElement parent
) {
592 FeatureDistributionDetailSection featureDistributionSection
= formFactory
.createFeatureDistributionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
594 addPart(featureDistributionSection
);
598 * createPolytomousKeyNodeSection
602 private void createPolytomousKeyNodeSection(RootElement parent
) {
605 PolytomousKeyDetailSection polytomousKeyDetailSection
= formFactory
.createPolytomousKeyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
607 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
609 PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection
= formFactory
.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
611 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
613 TaxonomicScopeSection taxonomicScopeSection
= formFactory
.createTaxonomicScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
615 addPart(polytomousKeyDetailSection
);
616 addPart(polytomousKeyNodeDetailSection
);
617 addPart(taxonomicScopeSection
);
622 * create the UseRecordSection
626 private void createUseRecordSection(RootElement parent
) {
629 UseRecordDetailSection descriptionUseRecordSection
= formFactory
.createUseRecordDetailSection(getConversationHolder(), parent
, this,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
631 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
633 addPart(descriptionUseRecordSection
);
642 private void createUserSection(RootElement parent
) {
645 UserDetailSection userDetailSection
= formFactory
.createUserDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
647 GroupsByUserDetailSection groupByUserDetailSection
= formFactory
.createGroupsByUserDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
649 addPart(userDetailSection
);
650 addPart(groupByUserDetailSection
);
654 * createTaxonRelationshipSection
658 private void createTaxonRelationshipSection(RootElement parent
) {
661 TaxonRelationshipDetailSection taxonRelationshipDetailSection
= formFactory
.createTaxonRelationshipDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
663 ReferencedEntityDetailSection referencedEntityBaseDetailSection
= formFactory
.createReferencedEntityDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
664 addPart(taxonRelationshipDetailSection
);
665 addPart(referencedEntityBaseDetailSection
);
671 private void createTermVocabularySection(RootElement parent
) {
674 TermVocabularyDetailSection termVocabularyDetailSection
= formFactory
.createTermVocabularyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
675 addPart(termVocabularyDetailSection
);
679 * createDefinedTermSection
683 private void createDefinedTermSection(RootElement parent
) {
686 AbstractFormSection definedTermDetailSection
= formFactory
.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
687 addPart(definedTermDetailSection
);