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 DerivedUnitFacade facade
= (DerivedUnitFacade
) getInput();
160 if(facade
.innerDerivedUnit()!=null){
161 getViewPart().changed(facade
.innerDerivedUnit());
163 else if(facade
.innerFieldUnit()!=null){
164 getViewPart().changed(facade
.innerFieldUnit());
168 super.markViewPartDirty();
171 // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
176 * @see org.eclipse.jface.viewers.Viewer#refresh()
180 protected void showParts() {
181 // FIXME (CM) : Need to clean out this code.
182 // Too much type checking to decide which detail view to display.
183 // Need to build in a mechanism where navigators / editors are 'aware'
184 // of the corresponding detail viewer.
185 Object input
= getInput();
186 if (input
instanceof TaxonBase
) {
187 createTaxonSections(rootElement
);
189 } else if (input
instanceof NonViralName
) {
190 createNameSections(rootElement
);
192 } else if (input
instanceof Reference
) {
193 createReferenceSections(rootElement
);
195 } else if (input
instanceof Team
) {
196 createTeamDetailSection(rootElement
);
198 } else if (input
instanceof Person
) {
199 createPersonDetailSection(rootElement
);
201 } else if (input
instanceof TeamOrPersonBase
) {
202 createTeamOrPersonBaseDetailSection(rootElement
);
204 } else if (input
instanceof DescriptionBase
) {
205 Set
<Marker
> descriptionMarkers
= ((DescriptionBase
) input
).getMarkers();
206 MarkerType useMarkertype
= (MarkerType
) CdmStore
.getService(ITermService
.class).find(
207 UsageTermCollection
.uuidUseMarkerType
);
208 Boolean isUseDescription
= false;
209 for (Marker marker
: descriptionMarkers
) {
210 if (marker
.getMarkerType().equals(useMarkertype
)) {
211 isUseDescription
= true;
214 if (((DescriptionBase
) input
).isImageGallery()) {
215 createImageGallerySection(rootElement
);
217 } else if (isUseDescription
) {
218 createUseDescriptionSection(rootElement
);
220 createDescriptionSection(rootElement
);
223 } else if (input
instanceof DescriptionElementBase
) {
224 Set
<Marker
> descriptionMarkers
= ((DescriptionElementBase
) input
).getInDescription().getMarkers();
225 MarkerType useMarkertype
= (MarkerType
) CdmStore
.getService(ITermService
.class).find(
226 UsageTermCollection
.uuidUseMarkerType
);
227 Boolean isUseDescription
= false;
228 for (Marker marker
: descriptionMarkers
) {
229 if (marker
.getMarkerType().equals(useMarkertype
)) {
230 isUseDescription
= true;
234 if (isUseDescription
== true && input
instanceof CategoricalData
) {
235 createUseRecordSection(rootElement
);
237 createDescriptionElementSection(rootElement
);
240 } else if (input
instanceof Media
) {
241 createMediaElementSection(rootElement
);
243 } else if (input
instanceof DerivedUnitFacade
) {
244 if(((DerivedUnitFacade
) input
).getType()==SpecimenOrObservationType
.FieldUnit
){
245 createFieldUnitSection(rootElement
);
248 createDerivedUnitBaseElementSection(rootElement
);
251 } else if (input
instanceof FieldUnit
) {
252 createFieldUnitSection(rootElement
);
254 } else if (input
instanceof FeatureNodeContainer
) {
255 createFeatureDistributionSection(rootElement
);
257 } else if (input
instanceof PolytomousKey
) {
258 //createPolytomousKeySection(rootElement);
260 } else if ((input
instanceof PolytomousKeyNode
) || (input
instanceof PolytomousKeyRelationship
)) {
261 createPolytomousKeyNodeSection(rootElement
);
262 } else if (input
instanceof User
) {
263 createUserSection(rootElement
);
264 } else if (input
instanceof Group
) {
265 createGroupSection(rootElement
);
266 } else if (input
instanceof TaxonRelationship
) {
267 createTaxonRelationshipSection(rootElement
);
268 } else if (input
instanceof TermVocabulary
) {
269 createTermVocabularySection(rootElement
);
270 } else if (input
instanceof DefinedTermBase
) {
271 createDefinedTermSection(rootElement
);
282 private void createGroupSection(RootElement parent
) {
285 GroupDetailSection groupDetailSection
= formFactory
.createGroupDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
286 MemberDetailSection memberDetailSection
= formFactory
.createMemberDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
287 GrantedAuthorityDetailSection grantedAuthorityDetailSection
= formFactory
.createGrantedAuthorityDetailSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
289 addPart(groupDetailSection
);
290 addPart(memberDetailSection
);
291 addPart(grantedAuthorityDetailSection
);
297 * @see org.eclipse.jface.viewers.Viewer#getSelection()
301 public ISelection
getSelection() {
309 * org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers
310 * .ISelection, boolean)
314 public void setSelection(ISelection selection
, boolean reveal
) {
315 this.selection
= selection
;
316 SelectionChangedEvent selectionChangedEvent
= new SelectionChangedEvent(this, selection
);
317 fireSelectionChanged(selectionChangedEvent
);
321 * createTaxonSections(RootElement parent)
325 private void createTaxonSections(RootElement parent
) {
328 TaxonBaseDetailSection taxonBaseDetailSection
= formFactory
.createTaxonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
330 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
332 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
333 | ExpandableComposite
.EXPANDED
);
335 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
337 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
339 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
341 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
);
343 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
345 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
347 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
349 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
351 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
353 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
355 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
357 ParsingMessagesSection parsingMessagesSection
= formFactory
.createParsingMessagesSection(getConversationHolder(), parent
, this, ExpandableComposite
.EXPANDED
);
359 addPart(taxonBaseDetailSection
);
360 addPart(nonViralNameSection
);
361 addPart(nomenclaturalStatusSection
);
362 addPart(protologSection
);
363 addPart(referenceDetailSection
);
364 addPart(typeDesignationSection
);
365 addPart(nameRelationshipSection
);
366 addPart(parsingMessagesSection
);
374 private void createNameSections(RootElement parent
) {
376 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
378 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
380 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
382 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
384 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
386 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
388 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
390 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
392 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
394 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
396 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
398 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
400 addPart(nonViralNameSection
);
401 addPart(nomenclaturalStatusSection
);
402 addPart(protologSection
);
403 addPart(referenceDetailSection
);
404 addPart(typeDesignationSection
);
405 addPart(nameRelationshipSection
);
409 * createReferenceSections
413 private void createReferenceSections(RootElement parent
) {
416 ReferenceDetailSection referenceDetailSection
= formFactory
.createReferenceDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
418 addPart(referenceDetailSection
);
422 * createTeamOrPersonBaseDetailSection
426 private void createTeamOrPersonBaseDetailSection(RootElement parent
) {
428 TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection
= formFactory
.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
430 addPart(teamOrPersonBaseDetailSection
);
434 * createTeamDetailSection
438 private void createTeamDetailSection(RootElement parent
) {
440 TeamDetailSection teamDetailSection
= formFactory
.createTeamDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
442 addPart(teamDetailSection
);
446 * createPersonDetailSection
450 private void createPersonDetailSection(RootElement parent
) {
452 PersonDetailSection personDetailSection
= formFactory
.createPersonDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
453 addPart(personDetailSection
);
457 * createDescriptionElementSection
461 private void createDescriptionElementSection(RootElement parent
) {
464 DescriptionElementDetailSection descriptionElementDetailSection
= formFactory
.createDescriptionElementDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
466 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
468 DescriptionElementSourceSection descriptionElementSourceSection
= formFactory
.createDescriptionElementSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
470 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
472 DescriptionElementMediaSection descriptionElementMediaSection
= formFactory
.createDescriptionElementMediaSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
474 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
476 addPart(descriptionElementDetailSection
);
477 addPart(descriptionElementSourceSection
);
478 addPart(descriptionElementMediaSection
);
482 * createDescriptionSection
486 private void createDescriptionSection(RootElement parent
) {
488 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
490 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
492 NaturalLanguageSection naturalLanguageSection
= formFactory
.createNaturalLanguageSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
494 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
496 DescribedSpecimenSection describedSpecimenSection
= formFactory
.createDescribedSpecimenSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
498 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
500 // DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
501 // .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
502 // getConversationHolder(), parent, Section.TWISTIE);
504 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
506 ScopeSection scopeSection
= formFactory
.createScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
508 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
510 addPart(descriptionDetailSection
);
511 addPart(naturalLanguageSection
);
512 addPart(describedSpecimenSection
);
513 // addPart(descriptionSourceSection);
514 addPart(scopeSection
);
518 * Creates the use Description section
522 private void createUseDescriptionSection(RootElement parent
) {
524 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
526 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
528 DescriptionSourceSection descriptionSourceSection
= formFactory
.createDescriptionSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
530 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
532 addPart(descriptionDetailSection
);
533 addPart(descriptionSourceSection
);
541 private void createImageGallerySection(RootElement parent
) {
543 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
545 addPart(descriptionDetailSection
);
549 * createMediaElementSection
554 private void createMediaElementSection(RootElement parent
) {
556 MediaDetailsSection mediaDetailSection
= formFactory
.createMediaDetailsSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
558 addPart(mediaDetailSection
);
562 * createDerivedUnitBaseElementSection
566 private void createDerivedUnitBaseElementSection(RootElement parent
) {
569 DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection
= formFactory
.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
571 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
573 GatheringEventDetailSection gatheringEventDetailSection
= formFactory
.createGatheringEventDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
575 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
577 FieldUnitDetailSection fieldUnitDetailSection
= formFactory
.createFieldUnitDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
579 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
581 DerivedUnitBaseDetailSection derivedUnitBaseDetailSection
= formFactory
.createDerivedUnitBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
583 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
585 DeterminationDetailSection determinationDetailSection
= formFactory
.createDeterminationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
587 addPart(derivedUnitGeneralDetailSection
);
588 addPart(gatheringEventDetailSection
);
589 addPart(fieldUnitDetailSection
);
590 addPart(derivedUnitBaseDetailSection
);
591 addPart(determinationDetailSection
);
596 * createDerivedUnitBaseElementSection
600 private void createFieldUnitSection(RootElement parent
) {
603 FieldUnitGeneralDetailSection fielUnitGeneralDetailSection
= formFactory
.createFieldUnitGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
605 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
607 GatheringEventDetailSection gatheringEventDetailSection
= formFactory
.createGatheringEventDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
609 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
611 FieldUnitDetailSection fieldUnitDetailSection
= formFactory
.createFieldUnitDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
613 addPart(fielUnitGeneralDetailSection
);
614 addPart(gatheringEventDetailSection
);
615 addPart(fieldUnitDetailSection
);
621 private void createFeatureDistributionSection(RootElement parent
) {
624 FeatureDistributionDetailSection featureDistributionSection
= formFactory
.createFeatureDistributionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
626 addPart(featureDistributionSection
);
630 * createPolytomousKeyNodeSection
634 private void createPolytomousKeyNodeSection(RootElement parent
) {
637 PolytomousKeyDetailSection polytomousKeyDetailSection
= formFactory
.createPolytomousKeyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
639 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
641 PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection
= formFactory
.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
643 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
645 TaxonomicScopeSection taxonomicScopeSection
= formFactory
.createTaxonomicScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.COMPACT
);
647 addPart(polytomousKeyDetailSection
);
648 addPart(polytomousKeyNodeDetailSection
);
649 addPart(taxonomicScopeSection
);
654 * create the UseRecordSection
658 private void createUseRecordSection(RootElement parent
) {
661 UseRecordDetailSection descriptionUseRecordSection
= formFactory
.createUseRecordDetailSection(getConversationHolder(), parent
, this,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
663 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
665 addPart(descriptionUseRecordSection
);
675 private void createUserSection(RootElement parent
) {
678 UserDetailSection userDetailSection
= formFactory
.createUserDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
680 GroupsByUserDetailSection groupByUserDetailSection
= formFactory
.createGroupsByUserDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
682 addPart(userDetailSection
);
683 addPart(groupByUserDetailSection
);
687 * createTaxonRelationshipSection
691 private void createTaxonRelationshipSection(RootElement parent
) {
694 TaxonRelationshipDetailSection taxonRelationshipDetailSection
= formFactory
.createTaxonRelationshipDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
696 ReferencedEntityDetailSection referencedEntityBaseDetailSection
= formFactory
.createReferencedEntityDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
697 addPart(taxonRelationshipDetailSection
);
698 addPart(referencedEntityBaseDetailSection
);
704 private void createTermVocabularySection(RootElement parent
) {
707 TermVocabularyDetailSection termVocabularyDetailSection
= formFactory
.createTermVocabularyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
708 addPart(termVocabularyDetailSection
);
712 * createDefinedTermSection
716 private void createDefinedTermSection(RootElement parent
) {
719 AbstractFormSection definedTermDetailSection
= formFactory
.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
720 addPart(definedTermDetailSection
);