Merge branch 'release/4.9.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / view / detail / DetailsViewer.java
1 /**
2 * Copyright (C) 2011 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.taxeditor.view.detail;
11
12 import java.util.Set;
13
14 import org.eclipse.jface.viewers.ISelection;
15 import org.eclipse.jface.viewers.SelectionChangedEvent;
16 import org.eclipse.jface.viewers.TreeNode;
17 import org.eclipse.swt.SWT;
18 import org.eclipse.swt.widgets.Composite;
19 import org.eclipse.ui.forms.widgets.ExpandableComposite;
20
21 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
22 import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
23 import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
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.TermVocabulary;
31 import eu.etaxonomy.cdm.model.common.User;
32 import eu.etaxonomy.cdm.model.description.CategoricalData;
33 import eu.etaxonomy.cdm.model.description.DescriptionBase;
34 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
35 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
36 import eu.etaxonomy.cdm.model.description.SpecimenDescription;
37 import eu.etaxonomy.cdm.model.media.Media;
38 import eu.etaxonomy.cdm.model.molecular.DnaSample;
39 import eu.etaxonomy.cdm.model.molecular.Sequence;
40 import eu.etaxonomy.cdm.model.molecular.SingleRead;
41 import eu.etaxonomy.cdm.model.name.TaxonName;
42 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
43 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
44 import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
45 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
46 import eu.etaxonomy.cdm.model.reference.Reference;
47 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
48 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
49 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
50 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
51 import eu.etaxonomy.taxeditor.model.AbstractUtility;
52 import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
53 import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
54 import eu.etaxonomy.taxeditor.model.MessagingUtils;
55 import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
56 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
57 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
58 import eu.etaxonomy.taxeditor.store.UsageTermCollection;
59 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
60 import eu.etaxonomy.taxeditor.ui.element.RootElement;
61 import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
62 import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailSection;
63 import eu.etaxonomy.taxeditor.ui.section.agent.TeamOrPersonBaseDetailSection;
64 import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
65 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailSection;
66 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailSection;
67 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementMediaSection;
68 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceSection;
69 import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceSection;
70
71 import eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection;
72 import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageSection;
73 import eu.etaxonomy.taxeditor.ui.section.description.ScopeSection;
74 import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSection;
75 import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
76 import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
77 import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
78 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
79 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
80 import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
81 import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
82 import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
83 import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
84 import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
85 import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
86 import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
87 import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
88 import eu.etaxonomy.taxeditor.ui.section.occurrence.EmptySection;
89 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
90 import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
91 import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
92 import eu.etaxonomy.taxeditor.ui.section.occurrence.association.DerivedUnitTypeDesignationSection;
93 import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailSection;
94 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
95 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
96 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSamplePreparationPreservationSection;
97 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailSection;
98 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceContigFileCollectionDetailSection;
99 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailSection;
100 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceReferenceCollectionDetailSection;
101 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadGeneralDetailSection;
102 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadPherogramCollectionDetailSection;
103 import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailSection;
104 import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailSection;
105 import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
106 import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
107 import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
108 import eu.etaxonomy.taxeditor.ui.section.supplemental.identifier.DerivedUnitFacadeIdentifierSection;
109 import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
110 import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
111 import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
112 import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
113 import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
114 import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
115 import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
116 import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer;
117 import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
118
119 /**
120 *
121 * The DetailsViewer handles the content of the details view (
122 * {@link DetailsViewPart}).<br>
123 * Depending on the type of the selected element the section of the details view
124 * are created.
125 *
126 * @author n.hoffmann
127 * @created Feb 12, 2010
128 * @version 1.0
129 */
130 public class DetailsViewer extends AbstractCdmDataViewer {
131
132 private ISelection selection;
133
134 public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
135 super(parent, viewPart);
136 }
137
138 // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
139 // since we are getting implementations of DerivedUnitBase from the bulk
140 // editor
141 // and not derived unit facade objects,
142
143 @Override
144 public void setInput(Object input) {
145
146 if(input instanceof TreeNode){
147 input = ((TreeNode) input).getValue();
148 }
149 if(input instanceof GbifResponse){
150 input = ((GbifResponse) input).getDerivedUnitFacade();
151 }
152 if (input.getClass().equals(DerivedUnit.class)) {
153 DerivedUnit derivedUnit = (DerivedUnit)input;
154 try {
155 input = DerivedUnitFacade.NewInstance(derivedUnit,
156 PreferencesUtil.getDerivedUnitConfigurator());
157 } catch (DerivedUnitFacadeNotSupportedException e) {
158 // MessagingUtils.error(getClass(), e); //nothing should happen, later on the Details View will show an according information that it is not possible to open this data
159 }
160 }
161 else if(input instanceof FieldUnit){
162 input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
163 }
164 super.setInput(input);
165 }
166
167 @Override
168 protected void markViewPartDirty() {
169 if (getInput() instanceof DerivedUnitFacade) {
170 DerivedUnitFacade facade = (DerivedUnitFacade) getInput();
171 if(facade.innerDerivedUnit()!=null){
172 getViewPart().changed(facade.innerDerivedUnit());
173 }
174 else if(facade.innerFieldUnit()!=null){
175 getViewPart().changed(facade.innerFieldUnit());
176 }
177 }
178 else{
179 super.markViewPartDirty();
180 }
181 }
182
183 // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
184
185
186 /** {@inheritDoc} */
187 @Override
188 protected void showParts() {
189 // FIXME (CM) : Need to clean out this code.
190 // Too much type checking to decide which detail view to display.
191 // Need to build in a mechanism where navigators / editors are 'aware'
192 // of the corresponding detail viewer.
193
194 Object input = getInput();
195
196 destroySections();
197 if (input instanceof TaxonBase) {
198 if(((TaxonBase) input).getName()==null){
199 createEmptySection(rootElement);
200 }
201 else{
202 createTaxonSections(rootElement);
203 }
204
205 } else if (input instanceof TaxonName) {
206 createNameSections(rootElement);
207
208 } else if (input instanceof Reference) {
209 createReferenceSections(rootElement);
210
211 } else if (input instanceof Team) {
212 createTeamDetailSection(rootElement);
213
214 } else if (input instanceof Person) {
215 createPersonDetailSection(rootElement);
216
217 } else if (input instanceof TeamOrPersonBase) {
218 createTeamOrPersonBaseDetailSection(rootElement);
219
220 } else if (input instanceof DescriptionBase) {
221 if(input instanceof SpecimenDescription){
222 //TODO: add more sections to DetailsView for SpecimenDescription
223 createSpecimenDescriptionSection(rootElement);
224 }
225 else{
226 Set<Marker> descriptionMarkers = ((DescriptionBase<?>) input).getMarkers();
227
228 Boolean isUseDescription = false;
229 for (Marker marker : descriptionMarkers) {
230 if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
231 isUseDescription = true;
232 }
233 }
234 if (((DescriptionBase<?>) input).isImageGallery()) {
235 createImageGallerySection(rootElement);
236
237 } else if (isUseDescription) {
238 createUseDescriptionSection(rootElement);
239 } else {
240 createDescriptionSection(rootElement);
241
242 }
243 }
244 } else if (input instanceof DescriptionElementBase) {
245 Set<Marker> descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
246
247 Boolean isUseDescription = false;
248 for (Marker marker : descriptionMarkers) {
249 if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
250 isUseDescription = true;
251 }
252 }
253
254 if (isUseDescription == true && input instanceof CategoricalData) {
255 createUseRecordSection(rootElement);
256 } else {
257 createDescriptionElementSection(rootElement);
258 }
259
260 } else if (input instanceof Media) {
261 createMediaElementSection(rootElement);
262
263 } else if (input instanceof DerivedUnitFacade) {
264 if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
265 if(((DerivedUnitFacade) input).innerFieldUnit()==null){
266 MessagingUtils.error(DetailsViewer.class, "FieldUnit of facade is null", null);
267 }
268 else{
269 createFieldUnitSection(rootElement);
270 }
271 }
272 else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.PreservedSpecimen){
273 if(((DerivedUnitFacade) input).innerDerivedUnit()==null){
274 MessagingUtils.error(DetailsViewer.class, "DerivedUnit of facade is null", null);
275 }
276 else{
277 createDerivedUnitBaseElementSection(rootElement);
278 }
279 }
280 else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){
281 //TissueSample should only be created by using it's own class
282 //in future using only one class with different SpecimenOrObservationTypes is desired
283 createTissueSampleSection(rootElement);
284 }
285 else{
286 createDerivedUnitBaseElementSection(rootElement);
287 }
288 } else if (input instanceof DnaSample){
289 DnaSample dnaSample = (DnaSample)input;
290 if(dnaSample.getRecordBasis()==SpecimenOrObservationType.TissueSample){
291 createTissueSampleSection(rootElement);
292 }
293 else if(dnaSample.getRecordBasis()==SpecimenOrObservationType.DnaSample){
294 createDnaSampleSection(rootElement);
295 }
296 } else if (input instanceof MediaSpecimen){
297 createMediaSpecimenSection(rootElement);
298 }
299 else if(input instanceof Sequence){
300 createSequenceSection(rootElement);
301 }
302 else if(input instanceof SingleRead){
303 createSingleReadSection(rootElement);
304 }
305 else if (input instanceof FeatureNodeContainer) {
306 createFeatureDistributionSection(rootElement);
307
308 }else if ((input instanceof PolytomousKeyNode) || (input instanceof PolytomousKeyRelationship)) {
309 createPolytomousKeyNodeSection(rootElement);
310 } else if (input instanceof User) {
311 createUserSection(rootElement);
312 } else if (input instanceof Group) {
313 createGroupSection(rootElement);
314 } else if (input instanceof TaxonRelationship && ((TaxonRelationship)input).getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())) {
315 createMisappliedNameSection(rootElement);
316 }else if (input instanceof TaxonRelationship ) {
317 createTaxonRelationshipSection(rootElement);
318 } else if (input instanceof TermVocabulary) {
319 createTermVocabularySection(rootElement);
320 } else if (input instanceof DefinedTermBase) {
321 createDefinedTermSection(rootElement);
322 }
323 else {
324 createEmptySection(rootElement);
325 }
326 layout();
327
328 }
329
330
331 private void createEmptySection(RootElement parent) {
332 destroySections();
333
334 EmptySection emptySection = formFactory.createEmptySection(formFactory, parent, SWT.NONE);
335
336 addPart(emptySection);
337 }
338
339 private void createGroupSection(RootElement parent) {
340 destroySections();
341
342 GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
343 MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
344 GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
345
346 addPart(groupDetailSection);
347 addPart(memberDetailSection);
348 addPart(grantedAuthorityDetailSection);
349 }
350
351 /** {@inheritDoc} */
352 @Override
353 public ISelection getSelection() {
354 return selection;
355 }
356
357 /** {@inheritDoc} */
358 @Override
359 public void setSelection(ISelection selection, boolean reveal) {
360
361 this.selection = selection;
362
363 if(this.selection!=null){
364 SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
365 fireSelectionChanged(selectionChangedEvent);
366 }
367
368 }
369
370 private void createTaxonSections(RootElement parent) {
371 destroySections();
372
373 ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
374 ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
375 if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
376 TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
377 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
378 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
379 addPart(taxonBaseDetailSection);
380 }else{
381 if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
382 TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
383 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
384 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
385
386 addPart(taxonBaseDetailSection);
387 }
388 }
389 NonViralNameDetailSection nonViralNameSection = formFactory
390 .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
391 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
392 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
393 if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
394 NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
395 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
396 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
397 addPart(referenceDetailSection);
398
399 }
400 if ( !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
401 NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
402 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
403 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
404 addPart(nomenclaturalStatusSection);
405 }
406
407 if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
408 ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
409 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
410 addPart(protologSection);
411 }
412
413 if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
414 TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
415 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
416 addPart(typeDesignationSection);
417 }
418
419 if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
420 NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
421 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
422 addPart(nameRelationshipSection);
423 }
424
425
426 addPart(parsingMessagesSection);
427
428 addPart(nonViralNameSection);
429
430 }
431
432 private void createNameSections(RootElement parent) {
433 destroySections();
434 NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
435 getConversationHolder(), parent, this, false, ExpandableComposite.TWISTIE
436 | ExpandableComposite.EXPANDED);
437 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
438
439 NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
440 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
441 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
442
443 NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
444 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
445 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
446
447 addPart(nonViralNameSection);
448 addPart(nomenclaturalStatusSection);
449 addPart(referenceDetailSection);
450
451 ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
452 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
453
454 TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
455 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
456
457 NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
458 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
459 addPart(protologSection);
460 addPart(typeDesignationSection);
461 addPart(nameRelationshipSection);
462
463 }
464
465 private void createReferenceSections(RootElement parent) {
466 destroySections();
467
468 ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
469 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
470
471 addPart(referenceDetailSection);
472 }
473
474 private void createTeamOrPersonBaseDetailSection(RootElement parent) {
475 destroySections();
476 TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
477
478 addPart(teamOrPersonBaseDetailSection);
479 }
480
481 private void createTeamDetailSection(RootElement parent) {
482 destroySections();
483 TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
484
485 addPart(teamDetailSection);
486 }
487
488 private void createPersonDetailSection(RootElement parent) {
489 destroySections();
490 PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
491 addPart(personDetailSection);
492 }
493
494 private void createDescriptionElementSection(RootElement parent) {
495 destroySections();
496
497 DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
498
499 // IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
500
501 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
502
503 DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
504
505 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
506
507 DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
508
509 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
510
511 addPart(descriptionElementDetailSection);
512 addPart(descriptionElementSourceSection);
513 addPart(descriptionElementMediaSection);
514 }
515
516 private void createDescriptionSection(RootElement parent) {
517 destroySections();
518 DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
519
520 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
521
522 NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
523
524 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
525
526 // DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
527 //
528 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
529
530 // DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
531 // .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
532 // getConversationHolder(), parent, Section.TWISTIE);
533 //
534 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
535
536 ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
537
538 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
539
540 addPart(descriptionDetailSection);
541 addPart(naturalLanguageSection);
542 // addPart(describedSpecimenSection);
543 // addPart(descriptionSourceSection);
544 addPart(scopeSection);
545 }
546
547 private void createSpecimenDescriptionSection(RootElement parent) {
548 destroySections();
549 DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
550 addPart(descriptionDetailSection);
551 }
552
553 private void createUseDescriptionSection(RootElement parent) {
554 destroySections();
555 DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
556
557 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
558
559 DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
560
561 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
562
563 addPart(descriptionDetailSection);
564 addPart(descriptionSourceSection);
565
566 }
567
568 private void createImageGallerySection(RootElement parent) {
569 destroySections();
570 DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
571
572 addPart(descriptionDetailSection);
573 }
574
575 private void createMediaElementSection(RootElement parent) {
576 destroySections();
577
578 MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
579
580 addPart(mediaDetailSection);
581 }
582
583 private void createDerivedUnitBaseElementSection(RootElement parent) {
584 destroySections();
585
586 DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
587 //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
588 if(!(AbstractUtility.getActiveE4Part() instanceof IDerivedUnitFacadePart)){
589 derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
590 }
591 addPart(derivedUnitGeneralDetailSection);
592
593 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
594
595 DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
596 addPart(derivedUnitBaseDetailSection);
597
598 //for editors working with facades
599 if(AbstractUtility.getActiveE4Part() instanceof IDerivedUnitFacadePart){
600 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
601 GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
602 addPart(gatheringEventDetailSection);
603
604 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
605 FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
606 addPart(fieldUnitDetailSection);
607 }
608 else{
609
610 if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
611 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
612 TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
613 addPart(taxonAssociationDetailSection);
614 }
615 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
616 DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
617 addPart(identifierDetailSection);
618 }
619 if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
620 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
621 DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
622 addPart(determinationDetailSection);
623 }
624
625 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
626 DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
627 addPart(derivedUnitTypeDesignationSection);
628
629 }
630
631 private void createFieldUnitSection(RootElement parent) {
632 destroySections();
633
634 FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
635
636 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
637
638 GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
639
640 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
641
642 FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
643
644 addPart(fielUnitGeneralDetailSection);
645 addPart(gatheringEventDetailSection);
646 addPart(fieldUnitDetailSection);
647
648 if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
649 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
650 DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
651 addPart(determinationDetailSection);
652 }
653 }
654
655 private void createTissueSampleSection(RootElement parent) {
656 destroySections();
657
658 TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
659
660 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
661
662 SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
663
664 addPart(section);
665 addPart(sampleDesignationDetailSection);
666 }
667
668 private void createDnaSampleSection(RootElement parent) {
669 destroySections();
670
671 DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
672
673 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
674
675 DnaSamplePreparationPreservationSection preparationPreservationSection = formFactory.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
676
677 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
678
679 DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
680
681 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
682
683 SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
684
685 addPart(section);
686 addPart(preparationPreservationSection);
687 addPart(qualitySection);
688 addPart(sampleDesignationDetailSection);
689 }
690
691 private void createSequenceSection(RootElement parent) {
692 destroySections();
693
694 SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
695
696 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
697
698 SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
699
700 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
701
702 SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
703
704
705 addPart(section);
706 addPart(referenceSection);
707 addPart(contigFileSection);
708 }
709
710 private void createSingleReadSection(RootElement parent) {
711 destroySections();
712
713 SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
714 addPart(section);
715
716 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
717
718 SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
719 addPart(pherogramSection);
720
721 }
722
723 private void createMediaSpecimenSection(RootElement parent) {
724 destroySections();
725
726 MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
727 addPart(generalSection);
728
729 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
730
731 RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
732 addPart(rightsSection);
733
734 }
735
736 private void createFeatureDistributionSection(RootElement parent) {
737 destroySections();
738
739 FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
740
741 addPart(featureDistributionSection);
742 }
743
744 private void createPolytomousKeyNodeSection(RootElement parent) {
745 destroySections();
746
747 PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
748
749 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
750
751 PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
752
753 addPart(polytomousKeyDetailSection);
754 addPart(polytomousKeyNodeDetailSection);
755
756 }
757
758 private void createUseRecordSection(RootElement parent) {
759 destroySections();
760
761 UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
762
763 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
764
765 addPart(descriptionUseRecordSection);
766
767
768 }
769
770 private void createUserSection(RootElement parent) {
771 destroySections();
772
773 UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
774
775 GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
776
777 addPart(userDetailSection);
778 addPart(groupByUserDetailSection);
779 }
780
781 private void createMisappliedNameSection(RootElement parent) {
782 destroySections();
783
784 TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
785
786 // ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
787 addPart(taxonRelationshipDetailSection);
788 //addPart(referencedEntityBaseDetailSection);
789
790 NonViralNameDetailSection nonViralNameSection = formFactory
791 .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
792 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
793 addPart(nonViralNameSection);
794 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
795 //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
796 NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
797 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
798 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
799 addPart(referenceDetailSection);
800
801 //if ( !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
802 NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
803 ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
804 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
805 addPart(nomenclaturalStatusSection);
806 //}
807
808 //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
809 ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
810 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
811 addPart(protologSection);
812 //}
813
814 //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
815 TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
816 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
817 addPart(typeDesignationSection);
818 //}
819
820 //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
821 NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
822 formFactory.createHorizontalSeparator(parent, SWT.BORDER);
823 addPart(nameRelationshipSection);
824 //}
825
826
827 //}
828 }
829
830 private void createTaxonRelationshipSection(RootElement parent) {
831 destroySections();
832
833 TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
834
835 ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
836 addPart(taxonRelationshipDetailSection);
837 addPart(referencedEntityBaseDetailSection);
838 }
839 private void createTermVocabularySection(RootElement parent) {
840 destroySections();
841
842 TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
843 addPart(termVocabularyDetailSection);
844 }
845
846 private void createDefinedTermSection(RootElement parent) {
847 destroySections();
848
849 AbstractFormSection<?> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
850 addPart(definedTermDetailSection);
851 }
852
853 @Override
854 public void update(CdmDataChangeMap arg0) {
855
856 }
857
858 }