Project

General

Profile

Download (47.3 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 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.editor;
11

    
12
import java.util.Arrays;
13
import java.util.HashSet;
14
import java.util.List;
15
import java.util.Set;
16
import java.util.UUID;
17

    
18
import org.eclipse.jface.resource.ImageDescriptor;
19
import org.eclipse.ui.IEditorInput;
20
import org.eclipse.ui.IMemento;
21
import org.eclipse.ui.IPersistableElement;
22

    
23
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
24
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
25
import eu.etaxonomy.cdm.api.service.IClassificationService;
26
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
27
import eu.etaxonomy.cdm.api.service.ITaxonService;
28
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
29
import eu.etaxonomy.cdm.model.taxon.ITreeNode;
30
import eu.etaxonomy.cdm.model.taxon.Synonym;
31
import eu.etaxonomy.cdm.model.taxon.Taxon;
32
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
33
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
34
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
35
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
36
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
37
import eu.etaxonomy.taxeditor.model.DataChangeBridge;
38
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
39
import eu.etaxonomy.taxeditor.store.CdmStore;
40

    
41
/**
42
 * <p>TaxonEditorInput class.</p>
43
 *
44
 * @author n.hoffmann
45
 * @created 19.03.2009
46
 * @version 1.0
47
 */
48
public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPersistableElement {
49
	
50
	private ConversationHolder conversation;
51
	
52
	private TaxonNode taxonNode;
53

    
54
	private TaxonEditorInputDataChangeBehaviour dataChangeBehavior;
55
	
56
	private TaxonBase initiallySelectedTaxonBase;
57

    
58
	private Taxon taxon;
59
	
60
	private TaxonEditorInput(TaxonNode taxonNode, ConversationHolder conversation){
61
		this.conversation = conversation;
62
		this.taxonNode = taxonNode;
63
	}
64
	
65

    
66
	
67
	/**
68
	 * <p>NewInstance</p>
69
	 *
70
	 * @param taxonNodeUuid a {@link java.util.UUID} object.
71
	 * @return a {@link eu.etaxonomy.taxeditor.editor.TaxonEditorInput} object.
72
	 * @throws java.lang.Exception if any.
73
	 */
74
	public static TaxonEditorInput NewInstance(UUID taxonNodeUuid) throws Exception{
75
		try{
76
			ConversationHolder conversation = CdmStore.createConversation();
77
			return NewInstance(taxonNodeUuid, conversation);
78
		}catch(Exception e){
79
			throw e;
80
		}
81
	}
82
	
83
    /**
84
     * 
85
     * @param taxonNodeUuid
86
     * @param conversation
87
     * @return
88
     */
89
    private static TaxonEditorInput NewInstance(UUID taxonNodeUuid, ConversationHolder conversation){
90
 	
91
    	TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid);
92
		
93
		if(taxonNode == null){
94
			EditorUtil.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not type TaxonBase.");
95
			return null;
96
		}	
97
		
98
    	return new TaxonEditorInput(taxonNode, conversation);
99
    }
100
    
101
    /**
102
     * <p>NewInstanceFromTaxonBase</p>
103
     *
104
     * @param taxonBaseUuid a {@link java.util.UUID} object.
105
     * @return a {@link eu.etaxonomy.taxeditor.editor.TaxonEditorInput} object.
106
     */
107
    public static TaxonEditorInput NewInstanceFromTaxonBase(UUID taxonBaseUuid){
108
    	ConversationHolder conversation = CdmStore.createConversation();
109
    	
110
    	TaxonEditorInput input = null;
111
    	
112
    	TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).find(taxonBaseUuid);
113
    	
114
    	if(taxonBase instanceof Taxon){
115
    		Taxon taxon = (Taxon) taxonBase;
116
    		
117
    		if (taxon.isMisapplication()){
118
    			// TODO get accepted taxon
119
    			EditorUtil.info("trying to open Mispplied Name ");
120
    			
121
    			Set<Taxon> acceptedTaxa = new HashSet<Taxon>();
122
    			Set<TaxonRelationship> relations = taxon.getRelationsFromThisTaxon();
123
    			for(TaxonRelationship relation : relations){
124
    				if(relation.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())){
125
    					acceptedTaxa.add(relation.getToTaxon());
126
    				}
127
    			}
128
    			input =  getInputForMultipleTaxa(conversation, acceptedTaxa);
129
    			
130
    		}else{
131
    			input = getInputForMultipleNodes(conversation, taxon.getTaxonNodes());
132
    		}
133
    	}else if(taxonBase instanceof Synonym){
134
    		Synonym synonym = (Synonym) taxonBase;
135
    		
136
    		Set<Taxon> taxa = synonym.getAcceptedTaxa();
137
    		input = getInputForMultipleTaxa(conversation, taxa);
138
    	}
139
    	
140
    	input.setInitiallySelectedTaxonBase(taxonBase);
141
    	
142
    	return input;
143
    }
144
    
145
	private static TaxonEditorInput getInputForMultipleNodes(ConversationHolder conversation, Set<TaxonNode> taxonNodes){
146
    	if(taxonNodes.size() == 1){
147
    		TaxonNode taxonNode = taxonNodes.iterator().next();
148
    		return NewInstance(taxonNode.getUuid(), conversation);
149
    	}else if(taxonNodes.size() > 1){
150
			TaxonNode taxonNode = ChooseFromMultipleTaxonNodesDialog.choose(taxonNodes);
151
			if(taxonNode != null){
152
				return NewInstance(taxonNode.getUuid(), conversation);			
153
			}
154
		}else if(taxonNodes.size() == 0){
155
			// this is an undesired state
156
			EditorUtil.warningDialog("Incorrect state", TaxonEditorInput.class, "The accepted taxon is not part of any classification. This should not have happened.");
157
		}
158
    	return null;
159
    }
160
    
161
    private static TaxonEditorInput getInputForMultipleTaxa(ConversationHolder conversation, Set<Taxon> taxa){
162
    	if(taxa.size() == 1){
163
    		Taxon taxon = taxa.iterator().next();
164
    		Set<TaxonNode> nodes = taxon.getTaxonNodes();
165
    		return getInputForMultipleNodes(conversation, nodes);
166
    	}else if(taxa.size() > 1){
167
			// FIXME implement a dialog that shows all possible taxa and let the user choose which he wants to open.
168
			EditorUtil.warningDialog("Not implemented yet", TaxonEditorInput.class, "There are multiple accepted taxa for the current selection. We currently do not know which one you want to open." +
169
					" This case is not handled yet by the software.");
170
		}else if(taxa.size() == 0){
171
			// this is an undesired state
172
			EditorUtil.warningDialog("Incorrect state", TaxonEditorInput.class, "Trying to open accepted taxon for a synonym or misapplication but" +
173
					" no accepted taxa are present. This should not have happened.");
174
		}
175
    	return null;
176
    }
177
    
178
    /**
179
     * <p>NewEmptyInstance</p>
180
     *
181
     * @param parentNodeUuid a {@link java.util.UUID} object.
182
     * @return a {@link eu.etaxonomy.taxeditor.editor.TaxonEditorInput} object.
183
     */
184
    public static TaxonEditorInput NewEmptyInstance(UUID parentNodeUuid){
185
    	ConversationHolder conversation = CdmStore.createConversation();
186
		
187
		TaxonNameBase<?, ?> name = PreferencesUtil.getPreferredNomenclaturalCode().getNewTaxonNameInstance(null);
188
		ITreeNode parentNode = CdmStore.getService(IClassificationService.class).getTreeNodeByUuid(parentNodeUuid);
189
		
190
		Taxon newTaxon = Taxon.NewInstance(name, parentNode.getReference());
191
		TaxonNode newTaxonNode = parentNode.addChildTaxon(newTaxon, parentNode.getReference(), parentNode.getMicroReference(), null);
192
		
193
		// add the new taxon to the editors persistence context
194
		UUID newTaxonNodeUuid = CdmStore.getService(ITaxonNodeService.class).save(newTaxonNode);
195
		
196
		return new TaxonEditorInput(newTaxonNode, conversation);
197
    }
198
	
199
	/* (non-Javadoc)
200
	 * @see org.eclipse.ui.IEditorInput#exists()
201
	 */
202
	/**
203
	 * <p>exists</p>
204
	 *
205
	 * @return a boolean.
206
	 */
207
	public boolean exists() {
208
		return taxonNode != null;
209
	}
210

    
211
	/* (non-Javadoc)
212
	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
213
	 */
214
	/**
215
	 * <p>getImageDescriptor</p>
216
	 *
217
	 * @return a {@link org.eclipse.jface.resource.ImageDescriptor} object.
218
	 */
219
	public ImageDescriptor getImageDescriptor() {
220
		return null;
221
	}
222

    
223
	/* (non-Javadoc)
224
	 * @see org.eclipse.ui.IEditorInput#getName()
225
	 */
226
	/**
227
	 * <p>getName</p>
228
	 *
229
	 * @return a {@link java.lang.String} object.
230
	 */
231
	public String getName() {
232
		if(getTaxon() == null){
233
			return null;
234
		}
235
		TaxonNameBase<?, ?> name = getTaxon().getName();
236
		if (name == null || name.getTitleCache() == null) {
237
			return "New taxon";
238
		} else {
239
			return name.getTitleCache();
240
		}	
241
	}
242

    
243
	/* (non-Javadoc)
244
	 * @see org.eclipse.ui.IEditorInput#getPersistable()
245
	 */
246
	/**
247
	 * <p>getPersistable</p>
248
	 *
249
	 * @return a {@link org.eclipse.ui.IPersistableElement} object.
250
	 */
251
	public IPersistableElement getPersistable() {
252
//		if(CdmStore.isActive()){
253
//			TaxonNode test = CdmStore.getTaxonTreeService().getTaxonNodeByUuid(taxonNode.getUuid());
254
//			boolean isPersistable = CdmStore.getTaxonTreeService().getTaxonNodeByUuid(taxonNode.getUuid()) != null;
255
//			if (isPersistable) {
256
//				return this;
257
//			}
258
//		}
259
		return null;
260
	}
261

    
262
	/* (non-Javadoc)
263
	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
264
	 */
265
	/**
266
	 * <p>getToolTipText</p>
267
	 *
268
	 * @return a {@link java.lang.String} object.
269
	 */
270
	public String getToolTipText() {
271
		return getName();
272
	}
273

    
274
	/* (non-Javadoc)
275
	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
276
	 */
277
	/** {@inheritDoc} */
278
	public Object getAdapter(Class adapter) {
279

    
280
		if (adapter == Taxon.class) {
281
			return getTaxon();
282
		}
283
		
284
		if (adapter == TaxonNode.class) {
285
			return taxonNode;
286
		}
287
		
288
		return null;
289
	}
290
	
291
	/**
292
	 * {@inheritDoc}
293
	 *
294
	 * Overrides equals to ensure that a taxon can only be edited by
295
	 * one editor at a time.
296
	 */
297
	public boolean equals(Object obj) {
298
		if (TaxonEditorInput.class.equals(obj.getClass()) 
299
				&& getTaxon() != null
300
				&& getTaxon().equals(((TaxonEditorInput) obj).getTaxon())){
301
			if(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase() != null){
302
				setInitiallySelectedTaxonBase(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase());
303
			}
304
			return true;
305
		}
306
		return false;
307
	}
308

    
309
	/**
310
	 * <p>getTaxon</p>
311
	 *
312
	 * @return the taxon
313
	 */
314
	public Taxon getTaxon(){
315
		if(taxon == null){
316
			List<String> TAXON_INIT_STRATEGY = Arrays.asList(new String []{
317
					// CdmBase 					: toOne-> "created, createdBy, uuid"
318
					// VersionableEntity 		: toOne-> "updated, updatedBy"
319
					// AnnotatableEntity 		: toMany-> "annotations, markers"
320
					// IdentifiableEntity		: toMany-> "credits, extensions, rights, sources" 
321
					//							: toOne-> "lsid"
322
					// TaxonBase				: toOne-> "homotypicgroup, name, sec"
323
					// Taxon					: toMany-> "descriptions, heterotypicSynonymyGroups, homotypicSynonymsByHomotypicGroup, homotypicSynonymsByHomotypicRelationship, homotypicSynonymyGroups, misappliedNames, relationsFromThisTaxon, relationsToThisTaxon, synonymNames, synonymRelations, synonyms, synonymsSortedByType, taxonNodes, taxonRelations"
324
					// 							: toOne-> "imageGallery"
325
					"*",
326

    
327
					// CdmBase 					: toOne-> "created, createdBy, uuid"
328
					// VersionableEntity 		: toOne-> "updated, updatedBy"
329
					// AnnotatableEntity 		: toMany-> "" (available: "annotations, markers")
330
					// LanguageStringBase		: toOne-> "language"
331
					// Annotation				: toOne-> "annotatedObj, annotationType, commentator, linkbackUrl
332
					"annotations.$",
333

    
334
					// CdmBase 					: toOne-> "created, createdBy, uuid"
335
					// VersionableEntity 		: toOne-> "updated, updatedBy"
336
					// Marker					: toOne-> "markedObj, markerType"	
337
					"markers.$",
338
					"markers.markerType.$",
339

    
340
					// CdmBase 					: toOne-> "created, createdBy, uuid"
341
					// AnnotatableEntity 		: toMany-> "" (available: "annotations, markers")
342
					// LanguageStringBase		: toOne-> "language"
343
					// Annotation				: toOne-> "annotatedObj, annotationType, commentator, linkbackUrl
344
					// Credit					: toOne-> "agent"	
345
					"credits.$",
346

    
347
					// CdmBase 					: toOne-> "created, createdBy, uuid"
348
					// VersionableEntity 		: toOne-> "updated, updatedBy"
349
					// Extension				: toOne-> "extendedObj, type"	
350
					"extensions.$",
351
					"extensions.type.$",
352

    
353
					// CdmBase 					: toOne-> "created, createdBy, uuid"
354
					// VersionableEntity 		: toOne-> "updated, updatedBy"
355
					// AnnotatableEntity 		: toMany-> "" (available: "annotations, markers")
356
					// LanguageStringBase		: toOne-> "language"
357
					// Rights					: toOne-> "agent, type, uri"	
358
					"rights.$",
359

    
360
					// CdmBase 					: toOne-> "created, createdBy, uuid"
361
					// VersionableEntity 		: toOne-> "updated, updatedBy"
362
					// AnnotatableEntity 		: toMany-> "" (available: "annotations, markers")
363
					// ReferencedEntityBase		: toOne-> "citation" 	
364
					// OriginalSourceBase		: 	
365
					// IdentifiableSource		: toOne-> "sourcedObj"	
366
					"sources.$",
367

    
368
					// CdmBase 					: toOne-> "created, createdBy, uuid"
369
					// AnnotatableEntity 		: toMany-> "" (available: "annotations, markers")
370
					// HomotypicalGroup			: toMany-> "" (available: "basionymAndReplacedSynonymRelations, basionyms, basionymsOrReplacedSynonyms, nameTypeDesignations, newCombinations, replacedSynonym, specimenTypeDesignations, synonymsInGroup, typeDesignations, typifiedNames, unrelatedNames" )  
371
					"homotypicGroup.$",
372

    
373
					// CdmBase 					: toOne-> "created, createdBy, uuid"
374
					// AnnotatableEntity 		: toMany-> "" (available: "annotations, markers")
375
					// TaxonNameBase			: toMany-> "" (available: "basionyms, descriptions, nameRelations, nameTypeDesignations, relationsFromThisName, relationsToThisName, specimenTypeDesignations, specimenTypeDesignationsOfHomotypicalGroup, status, synonyms, taggedName, taxa, taxonBases, typeDesignations" ) 
376
					//							: toOne-> "basionym, citation, homotypicalGroup, nomenclaturalCode, nomenclaturalReference, rank"
377
					// ViralName 
378
					// NonViralName				: toMany->"" (available: "childRelationships, hybridChildRelations, hybridParentRelations, orderedChildRelationships, parentRelationships") 
379
					//							: toOne-> "basionymAuthorTeam, combinationAuthorTeam, exBasionymAuthorTeam, exCombinationAuthorTeam"
380
					"name.$",
381

    
382
					// CdmBase 					: toOne-> "created, createdBy, uuid"
383
					// VersionableEntity 		: toOne-> "updated, updatedBy"
384
					// AnnotatableEntity 		: toMany-> "annotations, markers"
385
					// IdentifiableEntity		: toMany-> "credits, extensions, rights, sources" 
386
					//							: toOne-> "lsid"
387
					// IdentifiableMediaEntity	: toMany->"" (available: "media") 
388
					// Reference				: toOne->"authorTeam, datePublished, inBook, inJournal, inProceedings, inReference, inSeries, institution, school, type, uri" 
389
					"sec.$",
390
					
391
					// CdmBase 					: toOne-> "created, createdBy, uuid"
392
					// AnnotatableEntity 		: toMany-> "annotations, markers"
393
					// IdentifiableEntity		: toMany-> "credits, extensions, rights, sources" 
394
					//							: toOne-> "lsid"
395
					// DescriptionBase			: toMany->"" (available: "describedSpecimenOrObservations, descriptiveSystem, elements, workingSets" )
396
					// TaxonDescription			: toMany->"" (available: "geoScopes, scopes" )
397
					//							: toOne-> "taxon"
398
					"descriptions.$",
399

    
400
					
401
					// CdmBase 					: toOne-> "created, createdBy, uuid"
402
					// VersionableEntity 		: toOne-> "updated, updatedBy"
403
					// AnnotatableEntity 		: toMany-> "annotations, markers"
404
					// ReferencedEntityBase		: toOne-> "citation" 	
405
					// RelationshipBase			: 
406
					// TaxonRelationship		: toOne->"fromTaxon, relatedFrom, relatedTo, toTaxon, type"
407
					"relationsFromThisTaxon.$",
408

    
409
					// CdmBase 					: toOne-> "created, createdBy, uuid"
410
					// VersionableEntity 		: toOne-> "updated, updatedBy"
411
					// AnnotatableEntity 		: toMany-> "annotations, markers"
412
					// ReferencedEntityBase		: toOne-> "citation" 	
413
					// RelationshipBase			: 
414
					// TaxonRelationship		: toOne->"fromTaxon, relatedFrom, relatedTo, toTaxon, type"
415
					"relationsToThisTaxon.$",
416

    
417
					// CdmBase 					: toOne-> "created, createdBy, uuid"
418
					// VersionableEntity 		: toOne-> "updated, updatedBy"
419
					// AnnotatableEntity 		: toMany-> "annotations, markers"
420
					// ReferencedEntityBase		: toOne-> "citation" 	
421
					// RelationshipBase			: 
422
					// SynonymRelationship		: toOne->"acceptedTaxon, relatedFrom, relatedTo, synonym, type"
423
					"synonymRelations.$",
424

    
425
					// CdmBase 					: toOne-> "created, createdBy, uuid"
426
					// VersionableEntity 		: toOne-> "updated, updatedBy"
427
					// AnnotatableEntity 		: toMany-> "annotations, markers"
428
					// IdentifiableEntity		: toMany-> "credits, extensions, rights, sources" 
429
					//							: toOne-> "lsid"
430
					// TaxonBase				: toOne-> "homotypicgroup, name, sec"
431
					// Synonym					: toMany-> "" (available: "acceptedTaxa, relationType, synonymRelations" )
432
					"synonyms.$",
433

    
434

    
435
					"misappliedNames.$",
436
					"misappliedNames.name.extensions.type.$",
437
					"misappliedNames.name.status.$",
438
					"misappliedNames.name.status.type.$",
439
					"misappliedNames.name.descriptions.elements.$",
440
					"misappliedNames.name.typeDesignations.$",
441
					"misappliedNames.name.typeDesignations.typeStatus.$",
442

    
443
//					"relationsFromThisTaxon.fromTaxon.$",
444
//					"relationsFromThisTaxon.fromTaxon.name.status.$",
445
//					"relationsFromThisTaxon.fromTaxon.name.status.type.$",
446
//					"relationsFromThisTaxon.fromTaxon.name.descriptions.elements.$",
447
//					"relationsFromThisTaxon.fromTaxon.name.typeDesignations.typeStatus.$",
448
//					"relationsFromThisTaxon.toTaxon.$",
449
////					"relationsFromThisTaxon.toTaxon.name.extensions.type.$",
450
//					"relationsFromThisTaxon.toTaxon.name.status.$",
451
//					"relationsFromThisTaxon.toTaxon.name.status.type.$",
452
//					"relationsFromThisTaxon.toTaxon.name.descriptions.elements.$",
453
//					"relationsFromThisTaxon.toTaxon.name.typeDesignations.typeStatus.$",
454

    
455
//					"relationsToThisTaxon.fromTaxon.$",
456
//					"relationsToThisTaxon.fromTaxon.name.extensions.type.$",
457
//					"relationsToThisTaxon.fromTaxon.name.status.type.$",
458
//					"relationsToThisTaxon.fromTaxon.name.descriptions.elements.$",
459
//					"relationsToThisTaxon.fromTaxon.name.typeDesignations.typeStatus.$",
460
//					"relationsToThisTaxon.toTaxon.$",
461
//					"relationsToThisTaxon.toTaxon.name.status.type.$",
462
//					"relationsToThisTaxon.toTaxon.name.descriptions.elements.$",
463
//					"relationsToThisTaxon.toTaxon.name.typeDesignations.typeStatus.$",
464

    
465
					// TaxonNameEditor.createOrUpdateNameComposites()
466
					// ContainerFactory.createOrUpdateAcceptedTaxonsHomotypicGroup()
467
					"name.homotypicalGroup.typifiedNames.$",
468
					"name.homotypicalGroup.synonymsInGroup",
469
					"name.synonymRelations",
470
					"name.descriptions.elements.$",
471
					
472
//					"name.descriptions.scopes.$",
473
//					"name.descriptions.scopes.terms.$",
474
					"name.descriptions.geoscopes.$",
475
					"name.descriptions.geoscopes.vocabulary.$",
476
					"name.descriptions.geoscopes.vocabulary.terms.$",
477
					
478
					// ContainerFactory.createOrUpdateAcceptedTaxonsHomotypicGroup()
479
					"name.homotypicalGroup.$",
480
					"name.homotypicalGroup.typifiedNames:$",					
481

    
482
					"synonymRelations.synonym.name.$",
483
					"synonymRelations.synonym.name.descriptions.elements.$",
484
					"synonymRelations.synonym.name.homotypicalGroup.$",
485
					"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.$",
486
					"synonymRelations.synonym.name.status.$",
487

    
488
					"synonymRelations.synonym.name.typeDesignations.$",
489
					"synonymRelations.synonym.name.typeDesignations.typifiedNames.$",
490
					"synonymRelations.synonym.name.typeDesignations.typeStatus.$",
491
					"synonymRelations.synonym.name.typeDesignations.typeName.$",
492
					"synonymRelations.synonym.name.typeDesignations.typeSpecimen.$",
493

    
494
					
495
					// CdmBase 					: toOne-> "created, createdBy, uuid"
496
					// VersionableEntity 		: toOne-> "updated, updatedBy"
497
					// AnnotatableEntity 		: toMany-> "annotations, markers"
498
					// DescriptionElementBase	: toMany->"" (available: "media, modifiers, modifyingText, sources" )
499
					//							: toOne-> "feature, inDescription"
500
					// CategoricalData			: toMany->"" (available: "states" )
501
					// CommonTaxaName			: toOne->"area, language"
502
					// Distribution				: toOne->"area, status"
503
					// IndividualsAssociation	: toMany->"" (available: "description" )
504
					//							: toOne-> "associatedSpecimenOrObserviation"
505
					// QuantitativeData			: toMany->"" (available: "statisticalValues" )
506
					//							: toOne-> "unit"
507
					// TaxonInteraction			: toMany->"" (available: "descriptions" )
508
					//							: toOne-> "taxon2"
509
					// TextData					: toMany->"" (available: "multilanguageText" )
510
					//							: toOne-> "format, languageText, preferredLanguageString"
511
					"descriptions.elements.$",
512

    
513
					"descriptions.elements.annotations.$",
514
					"descriptions.elements.markers.markerType.$",
515

    
516
					"descriptions.elements.modifiers.$",
517
					"descriptions.elements.modifyingText.$",
518
					
519
					"descriptions.elements.description.$",
520

    
521
					"descriptions.elements.associatedSpecimenOrObservation.$",
522
					"descriptions.elements.associatedSpecimenOrObservation.annotations.$",
523
					"descriptions.elements.associatedSpecimenOrObservation.annotations.annotationType.$",
524
					"descriptions.elements.associatedSpecimenOrObservation.markers.markerType.$",
525
					"descriptions.elements.associatedSpecimenOrObservation.credits.$",
526
					"descriptions.elements.associatedSpecimenOrObservation.extensions.type.$",
527
					"descriptions.elements.associatedSpecimenOrObservation.rights.$",
528
					"descriptions.elements.associatedSpecimenOrObservation.sources.$",
529
					"descriptions.elements.associatedSpecimenOrObservation.media.$",
530
					"descriptions.elements.associatedSpecimenOrObservation.media.representations.parts.$",
531
					
532
					"descriptions.elements.descriptions.$",
533

    
534
					"descriptions.elements.multilanguageText.$",
535
					
536
					// CdmBase 					: toOne-> "created, createdBy, uuid"
537
					// VersionableEntity 		: toOne-> "updated, updatedBy"
538
					// AnnotatableEntity 		: toMany-> "annotations, markers"
539
					// IdentifiableEntity		: toMany-> "credits, extensions, rights, sources" 
540
					//							: toOne-> "lsid"
541
					// Media					: toMany->"allDescriptions, allTitles, representations"
542
					//							: toOne-> "artist, description, mediaCreated, title"
543
		            "descriptions.elements.media.$",
544
//		            "descriptions.elements.media.allDescriptions.$",
545
					// CdmBase 					: toOne-> "created, createdBy, uuid"
546
					// VersionableEntity 		: toOne-> "updated, updatedBy"
547
		            // MediaRepresentation		: toMany-> "parts"
548
					//							: toOne-> "media"
549
		            // MediaRepresentationPart	: toOne-> "mediaRepresentation, size, uri"
550
		            "descriptions.elements.media.representations.parts.$",
551

    
552
		            "descriptions.elements.media.annotations.$",
553
		            "descriptions.elements.media.annotations.annotationType.$",
554
		            "descriptions.elements.media.credits.$",
555
		            "descriptions.elements.media.extensions.$",
556
		            "descriptions.elements.media.extensions.type.$",
557
		            "descriptions.elements.media.markers.$",
558
		            "descriptions.elements.media.markers.marker.Type.$",
559
		            "descriptions.elements.media.rights.$",
560
		            "descriptions.elements.media.sources.$",
561

    
562
					"descriptions.elements.states.$",
563
					"descriptions.elements.statisticalValues.$",
564
		            
565
		            
566
		            // DescriptiveContentProvider.getContainerTreeForDesription()
567
		            // FeatureNodeContainerTree.getDescriptionsElementsForFeature()		            
568
		            // DescriptionHelper.getElementText()
569

    
570
		            // CdmBase 					: toOne-> "created, createdBy, uuid"
571
					// VersionableEntity 		: toOne-> "updated, updatedBy"
572
					// AnnotatableEntity 		: toMany-> "annotations, markers"
573
					// ReferencedEntityBase		: toOne-> "citation" 	
574
					// DescriptionElementSource	: toOne-> "nameUsedInSource, sourcedObj"
575
					"descriptions.elements.sources.$",
576

    
577
					// NamedArea.labelWithLevel()
578

    
579
		            // CdmBase 					: toOne-> "created, createdBy, uuid"
580
					// VersionableEntity 		: toOne-> "updated, updatedBy"
581
					// AnnotatableEntity 		: toMany-> "annotations, markers"
582
					// ReferencedEntityBase		: toOne-> "citation" 	
583
					// NamedArea				: toMany->"" (available: "allLevelList, generalizationOf, includes, waterbodiesOrCountries" )
584
					//							: toOne-> "hierarchieList, kindOf, level, partOf, pointApproximation, shape, type, validPeriod"
585
					"descriptions.elements.area.$",
586
					"descriptions.elements.area.allLevelList.$",
587
					"descriptions.elements.area.allLevelList.vocabulary.$",
588
					"descriptions.elements.area.allLevelList.vocabulary.terms.$",
589
					"descriptions.elements.area.vocabulary.$",
590
					"descriptions.elements.area.vocabulary.terms.$",
591
					"descriptions.elements.vocabulary.$",
592
					"descriptions.elements.vocabulary.terms.$",
593
					
594
					
595
//					"descriptions.scopes.$",
596
//					"descriptions.scopes.terms.$",
597
//					"descriptions.geoscopes.$",
598
//					"descriptions.geoscopes.vocabulary.$",
599
//					"descriptions.geoscopes.vocabulary.terms.$",
600
					
601
					// NameRelationshipDetailSection.createElementComposite()
602
					// NameRelationshipDetailElement.setEntity()
603
					"name.nameRelations.$",
604

    
605
					
606
					"name.extensions.$",
607
					"name.extensions.type.$",
608
					
609
					"name.basionymAuthorTeam.$",					
610
					"name.basionymAuthorTeam.annotations.$",
611
					"name.basionymAuthorTeam.annotations.annotationType.$",
612
					"name.basionymAuthorTeam.markers.markerType.$",
613
					"name.basionymAuthorTeam.credits.$",
614
					"name.basionymAuthorTeam.extensions.type.$",
615
					"name.basionymAuthorTeam.rights.$",
616
					"name.basionymAuthorTeam.sources.$",
617
					"name.basionymAuthorTeam.media.$",
618
					"name.basionymAuthorTeam.media.representations.parts.$",
619
					"name.basionymAuthorTeam.teamMembers.$",
620
					"name.basionymAuthorTeam.teamMembers.annotations.$",
621
					"name.basionymAuthorTeam.teamMembers.annotations.annotationType.$",
622
					"name.basionymAuthorTeam.teamMembers.markers.markerType.$",
623
					"name.basionymAuthorTeam.teamMembers.credits.$",
624
					"name.basionymAuthorTeam.teamMembers.extensions.type.$",
625
					"name.basionymAuthorTeam.teamMembers.rights.$",
626
					"name.basionymAuthorTeam.teamMembers.sources.$",
627
					"name.basionymAuthorTeam.teamMembers.media.$",
628
					"name.basionymAuthorTeam.teamMembers.media.representations.parts.$",
629

    
630
					"name.combinationAuthorTeam.$",					
631
					"name.combinationAuthorTeam.annotations.$",
632
					"name.combinationAuthorTeam.annotations.annotationType.$",
633
					"name.combinationAuthorTeam.markers.markerType.$",
634
					"name.combinationAuthorTeam.credits.$",
635
					"name.combinationAuthorTeam.extensions.type.$",
636
					"name.combinationAuthorTeam.rights.$",
637
					"name.combinationAuthorTeam.sources.$",
638
					"name.combinationAuthorTeam.media.$",
639
					"name.combinationAuthorTeam.media.representations.parts.$",
640
					"name.combinationAuthorTeam.teamMembers.$",
641
					"name.combinationAuthorTeam.teamMembers.annotations.$",
642
					"name.combinationAuthorTeam.teamMembers.annotations.annotationType.$",
643
					"name.combinationAuthorTeam.teamMembers.markers.markerType.$",
644
					"name.combinationAuthorTeam.teamMembers.credits.$",
645
					"name.combinationAuthorTeam.teamMembers.extensions.type.$",
646
					"name.combinationAuthorTeam.teamMembers.rights.$",
647
					"name.combinationAuthorTeam.teamMembers.sources.$",
648
					"name.combinationAuthorTeam.teamMembers.media.$",
649
					"name.combinationAuthorTeam.teamMembers.media.representations.parts.$",
650

    
651
					"name.exBasionymAuthorTeam.$",					
652
					"name.exBasionymAuthorTeam.annotations.$",
653
					"name.exBasionymAuthorTeam.annotations.annotationType.$",
654
					"name.exBasionymAuthorTeam.markers.markerType.$",
655
					"name.exBasionymAuthorTeam.credits.$",
656
					"name.exBasionymAuthorTeam.extensions.type.$",
657
					"name.exBasionymAuthorTeam.rights.$",
658
					"name.exBasionymAuthorTeam.sources.$",
659
					"name.exBasionymAuthorTeam.media.$",
660
					"name.exBasionymAuthorTeam.media.representations.parts.$",
661
					"name.exBasionymAuthorTeam.teamMembers.$",
662
					"name.exBasionymAuthorTeam.teamMembers.annotations.$",
663
					"name.exBasionymAuthorTeam.teamMembers.annotations.annotationType.$",
664
					"name.exBasionymAuthorTeam.teamMembers.markers.markerType.$",
665
					"name.exBasionymAuthorTeam.teamMembers.credits.$",
666
					"name.exBasionymAuthorTeam.teamMembers.extensions.type.$",
667
					"name.exBasionymAuthorTeam.teamMembers.rights.$",
668
					"name.exBasionymAuthorTeam.teamMembers.sources.$",
669
					"name.exBasionymAuthorTeam.teamMembers.media.$",
670
					"name.exBasionymAuthorTeam.teamMembers.media.representations.parts.$",
671

    
672
					"name.exCombinationAuthorTeam.$",					
673
					"name.exCombinationAuthorTeam.annotations.$",
674
					"name.exCombinationAuthorTeam.annotations.annotationType.$",
675
					"name.exCombinationAuthorTeam.markers.markerType.$",
676
					"name.exCombinationAuthorTeam.credits.$",
677
					"name.exCombinationAuthorTeam.extensions.type.$",
678
					"name.exCombinationAuthorTeam.rights.$",
679
					"name.exCombinationAuthorTeam.sources.$",
680
					"name.exCombinationAuthorTeam.media.$",
681
					"name.exCombinationAuthorTeam.media.representations.parts.$",
682
					"name.exCombinationAuthorTeam.teamMembers.$",
683
					"name.exCombinationAuthorTeam.teamMembers.annotations.$",
684
					"name.exCombinationAuthorTeam.teamMembers.annotations.annotationType.$",
685
					"name.exCombinationAuthorTeam.teamMembers.markers.markerType.$",
686
					"name.exCombinationAuthorTeam.teamMembers.credits.$",
687
					"name.exCombinationAuthorTeam.teamMembers.extensions.type.$",
688
					"name.exCombinationAuthorTeam.teamMembers.rights.$",
689
					"name.exCombinationAuthorTeam.teamMembers.sources.$",
690
					"name.exCombinationAuthorTeam.teamMembers.media.$",
691
					"name.exCombinationAuthorTeam.teamMembers.media.representations.parts.$",
692
					
693
					"name.nomenclaturalReference.annotations.$",
694
					"name.nomenclaturalReference.annotations.annotationType.$",
695
					"name.nomenclaturalReference.authorTeam.$",
696
					"name.nomenclaturalReference.authorTeam.media.$",
697
					"name.nomenclaturalReference.authorTeam.media.representations.parts.$",
698
					"name.nomenclaturalReference.markers.markerType.$",
699
					"name.nomenclaturalReference.credits.$",
700
					"name.nomenclaturalReference.extensions.type.$",
701
					"name.nomenclaturalReference.rights.$",
702
					"name.nomenclaturalReference.rights.type.$",
703
					"name.nomenclaturalReference.sources.$",
704
					"name.nomenclaturalReference.media.$",
705
					"name.nomenclaturalReference.media.representations.parts.$",
706
					"name.nomenclaturalReference.inReference.$",
707
					"name.nomenclaturalReference.inReference.annotations.$",
708
					"name.nomenclaturalReference.inReference.annotations.annotationType.$",
709
					"name.nomenclaturalReference.inReference.markers.markerType.$",					
710

    
711
					"name.nomenclaturalReference.inReference.credits.$",
712
					"name.nomenclaturalReference.inReference.extensions.type.$",
713
					"name.nomenclaturalReference.inReference.rights.$",
714
					"name.nomenclaturalReference.inReference.rights.type.$",
715
					"name.nomenclaturalReference.inReference.sources.$",
716
					"name.nomenclaturalReference.inReference.media.$",
717
					"name.nomenclaturalReference.inReference.media.representations.parts.$",
718

    
719
					"name.status.$",
720
					"name.status.annotations.$",
721
					"name.status.annotations.annotationType.$",
722
					"name.status.markers.markerType.$",
723
					"name.status.type.$",
724

    
725
					"name.typeDesignations.$",
726
					"name.typeDesignations.typifiedNames.$",
727
					"name.typeDesignations.typeStatus.$",
728
					"name.typeDesignations.typeName.$",
729
					"name.typeDesignations.typeSpecimen.$",
730

    
731
			});
732
			
733
			taxon = (Taxon) CdmStore.getService(ITaxonService.class).load(taxonNode.getTaxon().getUuid(), TAXON_INIT_STRATEGY);
734
		}
735
		
736
		return taxon;
737
	}
738

    
739
//	public Taxon getTaxon(){
740
//		if(taxon == null){
741
//			List<String> TAXON_INIT_STRATEGY = AbasionymAuthorTeam.$",					
742
//					"*",
743
//					// synonyms
744
//					"synonymRelations.synonym.name.homotypicalGroup.typifiedNames",
745
//					"synonymRelations.synonym.name.status",
746
//					"synonymRelations.synonym.name.relationsToThisName.fromTaxon.name",
747
//					// synonym name
748
//					"synonymRelations.synonym.name.descriptions.elements",
749
//					"synonymRelations.synonym.name.typeDesignations", 
750
//					"synonymRelations.synonym.name.relationsToThisName",
751
//					"synonymRelations.synonym.name.relationsFromThisName",
752
//					"synonymRelations.synonym.name.homotypicalGroup.typifiedNames",
753
//					"synonymRelations.synonym.name.rank.representations",
754
//					"synonymRelations.synonym.name.status.type.representations",
755
//					// snonym name supplemental
756
//					"synonymRelations.synonym.name.annotations",
757
//					"synonymRelations.synonym.name.annotations.annotationType",
758
//					"synonymRelations.synonym.name.annotations.commentator",
759
//					"synonymRelations.synonym.name.markers",
760
//					"synonymRelations.synonym.name.markers.markerType",
761
//					"synonymRelations.synonym.name.credits",
762
//					"synonymRelations.synonym.name.extensions",
763
//					"synonymRelations.synonym.name.rights",
764
//					"synonymRelations.synonym.name.rights.agent",
765
//					"synonymRelations.synonym.name.rights.type",
766
//					"synonymRelations.synonym.name.sources",
767
//					"synonymRelations.synonym.name.sources.citation",
768
//					"synonymRelations.synonym.name.combinationAuthor",
769
//					"synonymRelations.synonym.name.combinationAuthor.contact.addresses",
770
//					"synonymRelations.synonym.name.combinationAuthor.contact.emailAddresses",
771
//					"synonymRelations.synonym.name.combinationAuthor.contact.faxNumbers",
772
//					"synonymRelations.synonym.name.combinationAuthor.contact.phoneNumbers",
773
//					"synonymRelations.synonym.name.combinationAuthor.contact.urls",
774
//					"synonymRelations.synonym.name.combinationAuthor.institutionalMembership",
775
//					"synonymRelations.synonym.name.combinationAuthor.institutionalMembership.types",
776
//					"synonymRelations.synonym.name.exCombinationAuthor",
777
//					"synonymRelations.synonym.name.exCombinationAuthor.contact.addresses",
778
//					"synonymRelations.synonym.name.exCombinationAuthor.contact.emailAddresses",
779
//					"synonymRelations.synonym.name.exCombinationAuthor.contact.faxNumbers",
780
//					"synonymRelations.synonym.name.exCombinationAuthor.contact.phoneNumbers",
781
//					"synonymRelations.synonym.name.exCombinationAuthor.contact.urls",
782
//					"synonymRelations.synonym.name.exCombinationAuthor.institutionalMembership",
783
//					"synonymRelations.synonym.name.exCombinationAuthor.institutionalMembership.types",
784
//					"synonymRelations.synonym.name.basionymAuthor",
785
//					"synonymRelations.synonym.name.basionymAuthor.contact.addresses",
786
//					"synonymRelations.synonym.name.basionymAuthor.contact.emailAddresses",
787
//					"synonymRelations.synonym.name.basionymAuthor.contact.faxNumbers",
788
//					"synonymRelations.synonym.name.basionymAuthor.contact.phoneNumbers",
789
//					"synonymRelations.synonym.name.basionymAuthor.contact.urls",
790
//					"synonymRelations.synonym.name.basionymAuthor.institutionalMembership",
791
//					"synonymRelations.synonym.name.basionymAuthor.institutionalMembership.types",
792
//					"synonymRelations.synonym.name.exBasionymAuthor",
793
//					"synonymRelations.synonym.name.exBasionymAuthor.contact.addresses",
794
//					"synonymRelations.synonym.name.exBasionymAuthor.contact.emailAddresses",
795
//					"synonymRelations.synonym.name.exBasionymAuthor.contact.faxNumbers",
796
//					"synonymRelations.synonym.name.exBasionymAuthor.contact.phoneNumbers",
797
//					"synonymRelations.synonym.name.exBasionymAuthor.contact.urls",
798
//					"synonymRelations.synonym.name.exBasionymAuthor.institutionalMembership",
799
//					"synonymRelations.synonym.name.exBasionymAuthor.institutionalMembership.types",
800
//					"synonymRelations.synonym.name.nomenclaturalReference",
801
//					"synonymRelations.synonym.name.sec",
802
//					"synonymRelations.synonym.sec",
803
//					"synonymRelations.synonym.annotations",
804
//					"synonymRelations.synonym.annotations.annotationType",
805
//					"synonymRelations.synonym.annotations.commentator",
806
//					"synonymRelations.synonym.markers",
807
//					"synonymRelations.synonym.markers.markerType",
808
//					"synonymRelations.synonym.credits",
809
//					"synonymRelations.synonym.extensions",
810
//					"synonymRelations.synonym.rights",
811
//					"synonymRelations.synonym.rights.agent",
812
//					"synonymRelations.synonym.rights.type",
813
//					"synonymRelations.synonym.sources",
814
//					"synonymRelations.synonym.sources.citation",
815
//					//
816
//					"relationsToThisTaxon",
817
//					"relationsFromThisTaxon",
818
//					// taxon relations 
819
//					"relationsToThisName.fromTaxon.name",
820
//					// the name
821
//					"name.nomenclaturalReference",
822
//					"name.descriptions.elements",
823
//					"name.typeDesignations", 
824
//					"name.nameRelations.type",
825
//					"name.homotypicalGroup.typifiedNames",
826
//					"homotypicGroup.synonymsInGroup.synonym.sec",
827
//					"homotypicGroup.synonymsInGroup.synonym.name.nomenclaturalReference",
828
//					"homotypicGroup.synonymsInGroup.synonym.name.annotations",
829
//					"homotypicGroup.synonymsInGroup.synonym.name.annotations.annotationType",
830
//					"homotypicGroup.synonymsInGroup.synonym.name.annotations.commentator",
831
//					"homotypicGroup.synonymsInGroup.synonym.name.combinationAuthor",
832
//					"homotypicGroup.synonymsInGroup.synonym.name.combinationAuthor.contact.addresses",
833
//					"homotypicGroup.synonymsInGroup.synonym.name.combinationAuthor.contact.emailAddresses",
834
//					"homotypicGroup.synonymsInGroup.synonym.name.combinationAuthor.contact.faxNumbers",
835
//					"homotypicGroup.synonymsInGroup.synonym.name.combinationAuthor.contact.phoneNumbers",
836
//					"homotypicGroup.synonymsInGroup.synonym.name.combinationAuthor.contact.urls",
837
//					"homotypicGroup.synonymsInGroup.synonym.name.combinationAuthor.institutionalMembership",
838
//					"homotypicGroup.synonymsInGroup.synonym.name.combinationAuthor.institutionalMembership.types",
839
//					"homotypicGroup.synonymsInGroup.synonym.name.exCombinationAuthor",
840
//					"homotypicGroup.synonymsInGroup.synonym.name.exCombinationAuthor.contact.addresses",
841
//					"homotypicGroup.synonymsInGroup.synonym.name.exCombinationAuthor.contact.emailAddresses",
842
//					"homotypicGroup.synonymsInGroup.synonym.name.exCombinationAuthor.contact.faxNumbers",
843
//					"homotypicGroup.synonymsInGroup.synonym.name.exCombinationAuthor.contact.phoneNumbers",
844
//					"homotypicGroup.synonymsInGroup.synonym.name.exCombinationAuthor.contact.urls",
845
//					"homotypicGroup.synonymsInGroup.synonym.name.exCombinationAuthor.institutionalMembership",
846
//					"homotypicGroup.synonymsInGroup.synonym.name.exCombinationAuthor.institutionalMembership.types",
847
//					"homotypicGroup.synonymsInGroup.synonym.name.basionymAuthor",
848
//					"homotypicGroup.synonymsInGroup.synonym.name.basionymAuthor.contact.addresses",
849
//					"homotypicGroup.synonymsInGroup.synonym.name.basionymAuthor.contact.emailAddresses",
850
//					"homotypicGroup.synonymsInGroup.synonym.name.basionymAuthor.contact.faxNumbers",
851
//					"homotypicGroup.synonymsInGroup.synonym.name.basionymAuthor.contact.phoneNumbers",
852
//					"homotypicGroup.synonymsInGroup.synonym.name.basionymAuthor.contact.urls",
853
//					"homotypicGroup.synonymsInGroup.synonym.name.basionymAuthor.institutionalMembership",
854
//					"homotypicGroup.synonymsInGroup.synonym.name.basionymAuthor.institutionalMembership.types",
855
//					"homotypicGroup.synonymsInGroup.synonym.name.exBasionymAuthor",
856
//					"homotypicGroup.synonymsInGroup.synonym.name.exBasionymAuthor.contact.addresses",
857
//					"homotypicGroup.synonymsInGroup.synonym.name.exBasionymAuthor.contact.emailAddresses",
858
//					"homotypicGroup.synonymsInGroup.synonym.name.exBasionymAuthor.contact.faxNumbers",
859
//					"homotypicGroup.synonymsInGroup.synonym.name.exBasionymAuthor.contact.phoneNumbers",
860
//					"homotypicGroup.synonymsInGroup.synonym.name.exBasionymAuthor.contact.urls",
861
//					"homotypicGroup.synonymsInGroup.synonym.name.exBasionymAuthor.institutionalMembership",
862
//					"homotypicGroup.synonymsInGroup.synonym.name.exBasionymAuthor.institutionalMembership.types",
863
//					"homotypicGroup.synonymsInGroup.synonym.name.rights",
864
//					"homotypicGroup.synonymsInGroup.synonym.name.rights.agent",
865
//					"homotypicGroup.synonymsInGroup.synonym.name.rights.type",
866
//					"homotypicGroup.synonymsInGroup.synonym.annotations.annotationType",
867
//					"homotypicGroup.synonymsInGroup.synonym.annotations.commentator",
868
//					"name.rank.representations",
869
//					"name.status.type.representations",
870
//					// name supplemental
871
//					"name.combinationAuthor",
872
//					"name.combinationAuthor.contact.addresses",
873
//					"name.combinationAuthor.contact.emailAddresses",
874
//					"name.combinationAuthor.contact.faxNumbers",
875
//					"name.combinationAuthor.contact.phoneNumbers",
876
//					"name.combinationAuthor.contact.urls",
877
//					"name.combinationAuthor.institutionalMembership",
878
//					"name.combinationAuthor.institutionalMembership.types",
879
//					"name.exCombinationAuthor",
880
//					"name.exCombinationAuthor.contact.addresses",
881
//					"name.exCombinationAuthor.contact.emailAddresses",
882
//					"name.exCombinationAuthor.contact.faxNumbers",
883
//					"name.exCombinationAuthor.contact.phoneNumbers",
884
//					"name.exCombinationAuthor.contact.urls",
885
//					"name.exCombinationAuthor.institutionalMembership",
886
//					"name.exCombinationAuthor.institutionalMembership.types",
887
//					"name.basionymAuthor",
888
//					"name.basionymAuthor.contact.addresses",
889
//					"name.basionymAuthor.contact.emailAddresses",
890
//					"name.basionymAuthor.contact.faxNumbers",
891
//					"name.basionymAuthor.contact.phoneNumbers",
892
//					"name.basionymAuthor.contact.urls",
893
//					"name.basionymAuthor.institutionalMembership",
894
//					"name.basionymAuthor.institutionalMembership.types",
895
//					"name.exBasionymAuthor",
896
//					"name.exBasionymAuthor.contact.addresses",
897
//					"name.exBasionymAuthor.contact.emailAddresses",
898
//					"name.exBasionymAuthor.contact.faxNumbers",
899
//					"name.exBasionymAuthor.contact.phoneNumbers",
900
//					"name.exBasionymAuthor.contact.urls",
901
//					"name.exBasionymAuthor.institutionalMembership",
902
//					"name.exBasionymAuthor.institutionalMembership.types",
903
//					"name.nomenclaturalReference",
904
//					"name.annotations",
905
//					"name.annotations.annotationType",
906
//					"name.annotations.commentator",
907
//					"name.markers",
908
//					"name.markers.markerType",
909
//					"name.credits",
910
//					"name.extensions",
911
//					"name.rights",
912
//					"name.rights.agent",
913
//					"name.rights.type",
914
//					"name.sources",
915
//					"name.sources.citation",
916
//					"media.annotations",
917
//					"media.annotations.annotationType",
918
//					"media.annotations.commentator",
919
//					"media.markers",
920
//					"media.markers.markerType",
921
//					"media.credits",
922
//					"media.extensions",
923
//					"media.rights",
924
//					"media.rights.type",
925
//					"media.rights.agent",
926
//					"media.sources",
927
//					"media.sources.citation",
928
//					"media.representations",
929
//					"media.representations.parts",
930
//					"media.title",
931
//					"media.allDescriptions",
932
////					"media.representations.mediaRepresentationParts.mediaRepresentation",
933
//					"rights.type",
934
//					"rights.agent",
935
//					// taxon descriptions
936
//					"descriptions.describedSpecimenOrObservations",
937
//					"descriptions.sources",
938
//					"descriptions.sources.citation",
939
//					"descriptions.scopes",
940
//					// taxon description supplemental
941
//					"descriptions.annotations",
942
//					"descriptions.annotations.annotationType",
943
//					"descriptions.annotations.commentator",
944
//					"descriptions.markers",
945
//					"descriptions.markers.markerType",
946
//					"descriptions.credits",
947
//					"descriptions.extensions",
948
//					"descriptions.rights",
949
//					// description elements
950
//					"descriptions.elements.*",
951
//					"descriptions.elements.media",
952
//					"descriptions.elements.media.title",
953
//					"descriptions.elements.media.allDescriptions",
954
//					"descriptions.elements.media.representations",
955
//					"descriptions.elements.media.representations.parts",
956
////					"descriptions.elements.media.representations.mediaRepresentationParts.mediaRepresentation",
957
//					"descriptions.elements.modifiers",
958
//					"descriptions.elements.modifyingText",
959
//					"descriptions.elements.sources",
960
//					"descriptions.elements.sources.citation",
961
//					"descriptions.elements.sources.nameUsedInSource",
962
//					"descriptions.elements.area.$",
963
//					"descriptions.elements.multilanguageText",
964
//					"descriptions.elements.media",
965
//					"descriptions.elements.media.annotations",
966
//					"descriptions.elements.media.annotations.annotationType",
967
//					"descriptions.elements.media.annotations.commentator",
968
//					"descriptions.elements.media.markers",
969
//					"descriptions.elements.media.markers.markerType",
970
//					"descriptions.elements.media.credits",
971
//					"descriptions.elements.media.extensions",
972
//					"descriptions.elements.media.rights",
973
//					"descriptions.elements.media.rights.type",
974
//					"descriptions.elements.media.rights.agent",
975
//					"descriptions.elements.media.sources",
976
//					"descriptions.elements.media.sources.citation",
977
//					// descriptin element supplemental
978
//					"descriptions.elements.annotations",
979
//					"descriptions.elements.annotations.annotationType",
980
//					"descriptions.elements.annotations.commentator",
981
//					"descriptions.elements.markers",
982
//					"descriptions.elements.markers.markerType",
983
//					"descriptions.elements.credits",
984
//					"descriptions.elements.extensions",
985
//					"descriptions.elements.rights",
986
//					"descriptions.elements.sources",
987
//					"descriptions.elements.sources.citation",
988
//					"descriptions.elements.sources.annotations",
989
//					"descriptions.elements.sources.annotations.annotationType",
990
//					"descriptions.elements.sources.markers",
991
//					"descriptions.elements.sources.markers.markerType",
992
//					// supplemental
993
//					"annotations.annotationType",
994
//					"annotations.commentator",
995
//					"markers",
996
//					"markers.markerType",
997
//					"credits",
998
//					"extensions",
999
//					"rights",
1000
//					"sources",
1001
//					"sources.citation",
1002
//					"sec",
1003
//					"authorTeam",
1004
//					"authorTeam.contact.addresses",
1005
//					"authorTeam.contact.emailAddresses",
1006
//					"authorTeam.contact.faxNumbers",
1007
//					"authorTeam.contact.phoneNumbers",
1008
//					"authorTeam.contact.urls",
1009
//					"authorTeam.institutionalMembership",
1010
//					"authorTeam.institutionalMembership.types",
1011
//					"authorTeam.teamMembers",
1012
//					"authorTeam.teamMembers.institutionalMembership",
1013
//					"authorTeam.teamMembers.institutionalMembership.types",
1014
//					"agent",
1015
//					"agent.contact.addresses",
1016
//					"agent.contact.emailAddresses",
1017
//					"agent.contact.faxNumbers",
1018
//					"agent.contact.phoneNumbers",
1019
//					"agent.contact.urls",
1020
//					"agent.institutionalMembership",
1021
//					"agent.institutionalMembership.types",
1022
//					"agent.teamMembers",
1023
//					"agent.teamMembers.institutionalMembership",
1024
//					"agent.teamMembers.institutionalMembership.types"
1025
//					});
1026
//			
1027
//			taxon = (Taxon) CdmStore.getService(ITaxonService.class).load(taxonNode.getTaxon().getUuid(), TAXON_INIT_STRATEGY);
1028
//		}
1029
//		
1030
//		return taxon;
1031
//	}
1032
	
1033
	/**
1034
	 * <p>Getter for the field <code>taxonNode</code>.</p>
1035
	 *
1036
	 * @return the taxonNode
1037
	 */
1038
	public TaxonNode getTaxonNode() {
1039
		return taxonNode;
1040
	}
1041
	
1042
	/*
1043
	 * (non-Javadoc)
1044
	 * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
1045
	 */
1046
	/**
1047
	 * <p>getConversationHolder</p>
1048
	 *
1049
	 * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
1050
	 */
1051
	public ConversationHolder getConversationHolder() {
1052
		return conversation;
1053
	}
1054

    
1055
	/*
1056
	 * (non-Javadoc)
1057
	 * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostCrudObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmCrudEvent)
1058
	 */
1059
	/** {@inheritDoc} */
1060
	public void update(CdmDataChangeMap events) {
1061
		if(dataChangeBehavior == null){
1062
			dataChangeBehavior = new TaxonEditorInputDataChangeBehaviour(this);
1063
		}
1064
		
1065
		DataChangeBridge.handleDataChange(events, dataChangeBehavior);
1066
	}
1067

    
1068
	/* (non-Javadoc)
1069
	 * @see org.eclipse.ui.IPersistableElement#getFactoryId()
1070
	 */
1071
	/**
1072
	 * <p>getFactoryId</p>
1073
	 *
1074
	 * @return a {@link java.lang.String} object.
1075
	 */
1076
	public String getFactoryId() {
1077
		return TaxonEditorInputFactory.getFactoryId();
1078
	}
1079

    
1080
	/* (non-Javadoc)
1081
	 * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
1082
	 */
1083
	/** {@inheritDoc} */
1084
	public void saveState(IMemento memento) {
1085
		TaxonEditorInputFactory.saveState(memento, this);
1086
	}
1087

    
1088
    
1089
    /**
1090
     * <p>Setter for the field <code>initiallySelectedTaxonBase</code>.</p>
1091
     *
1092
     * @param taxonBase a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
1093
     */
1094
    public void setInitiallySelectedTaxonBase(TaxonBase taxonBase) {
1095
		this.initiallySelectedTaxonBase = taxonBase;
1096
	}
1097

    
1098
	/**
1099
	 * <p>Getter for the field <code>initiallySelectedTaxonBase</code>.</p>
1100
	 *
1101
	 * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
1102
	 */
1103
	public TaxonBase getInitiallySelectedTaxonBase() {
1104
		return initiallySelectedTaxonBase;
1105
	}
1106
}
(13-13/16)