ref #9537: new label for ratio to
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / e4 / TaxonEditorInputE4.java
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 package eu.etaxonomy.taxeditor.editor.e4;
10
11 import java.util.ArrayList;
12 import java.util.Arrays;
13 import java.util.HashMap;
14 import java.util.HashSet;
15 import java.util.Iterator;
16 import java.util.List;
17 import java.util.Map;
18 import java.util.Map.Entry;
19 import java.util.Set;
20 import java.util.UUID;
21
22 import org.eclipse.core.commands.ExecutionException;
23 import org.eclipse.core.commands.operations.IOperationHistory;
24 import org.eclipse.core.runtime.IAdaptable;
25 import org.eclipse.core.runtime.IStatus;
26 import org.eclipse.core.runtime.NullProgressMonitor;
27 import org.eclipse.core.runtime.Status;
28 import org.eclipse.e4.ui.di.UISynchronize;
29 import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
30
31 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
32 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
33 import eu.etaxonomy.cdm.api.service.IClassificationService;
34 import eu.etaxonomy.cdm.api.service.INameService;
35 import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
36 import eu.etaxonomy.cdm.api.service.ITaxonService;
37 import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
38 import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;
39 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
40 import eu.etaxonomy.cdm.model.common.CdmBase;
41 import eu.etaxonomy.cdm.model.name.HybridRelationship;
42 import eu.etaxonomy.cdm.model.name.TaxonName;
43 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
44 import eu.etaxonomy.cdm.model.taxon.Synonym;
45 import eu.etaxonomy.cdm.model.taxon.Taxon;
46 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
47 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
48 import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
49 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
50 import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
51 import eu.etaxonomy.taxeditor.editor.ChooseFromMultipleAcceptedTaxaDialog;
52 import eu.etaxonomy.taxeditor.editor.ChooseFromMultipleTaxonNodesDialog;
53 import eu.etaxonomy.taxeditor.editor.l10n.Messages;
54 import eu.etaxonomy.taxeditor.model.AbstractUtility;
55 import eu.etaxonomy.taxeditor.model.DataChangeBridge;
56 import eu.etaxonomy.taxeditor.model.MessagingUtils;
57 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
58 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
59 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
60 import eu.etaxonomy.taxeditor.store.CdmStore;
61 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
62
63 /**
64 * @author pplitzner
65 * @date Aug 24, 2017
66 */
67 public class TaxonEditorInputE4 extends CdmEntitySessionInput<TaxonNode>
68 implements IConversationEnabled {
69
70 private static final String INCORRECT_STATE = Messages.TaxonEditorInput_INCORRECT_STATE;
71
72 private final ConversationHolder conversation;
73
74 private TaxonNode taxonNode;
75
76 private Map<TaxonBase, TaxonBaseDeletionConfigurator> toDeletes = new HashMap<>();
77 private Set<Synonym> toSaveNewSynonyms = new HashSet<>();
78 private List<TaxonBase> toSaveConcepts = new ArrayList<>();
79 private List<TaxonName> toSaveNewNames = new ArrayList<>();
80
81 private Set<AbstractPostOperation> operations = new HashSet<>();
82
83 private TaxonEditorInputDataChangeBehaviourE4 dataChangeBehavior;
84
85 private TaxonBase<?> initiallySelectedTaxonBase;
86
87 private UISynchronize sync;
88
89
90 public void setSync(UISynchronize sync) {
91 this.sync = sync;
92 }
93
94 private enum CdmType {
95 TAXON_NODE,
96 TAXON_BASE,
97 PARENT_TAXON_NODE
98 }
99
100 private TaxonEditorInputE4(UUID uuid, CdmType type) {
101 super(true);
102 this.conversation = CdmStore.createConversation();
103 switch(type) {
104 case PARENT_TAXON_NODE:
105 initForParentTaxonNode(uuid);
106 break;
107 case TAXON_BASE:
108 initForTaxonBase(uuid);
109 break;
110 case TAXON_NODE:
111 initForTaxonNode(uuid);
112 break;
113 }
114 }
115
116 private void init(TaxonNode taxonNode) {
117 this.taxonNode = taxonNode;
118 }
119
120 private void initForTaxonNode(UUID taxonNodeUuid) {
121 this.getCdmEntitySession().bind();
122 TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, getTaxonNodePropertyPaths());
123 // TaxonNode taxonNode = getCdmEntitySession().remoteLoad(CdmStore.getService(ITaxonNodeService.class), taxonNodeUuid, getTaxonNodePropertyPaths());
124 if(taxonNode == null){
125 MessagingUtils.warningDialog(Messages.TaxonEditorInput_NOT_IMPLEMENTED, TaxonEditorInputE4.class, Messages.TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE);
126 }
127 init(taxonNode);
128 setInitiallySelectedTaxonBase(getTaxon());
129
130 }
131
132 private void initForTaxonBase(UUID taxonBaseUuid) {
133 this.getCdmEntitySession().bind();
134 // TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).load(taxonBaseUuid, getTaxonBasePropertyPaths());
135 TaxonBase<?> taxonBase = getCdmEntitySession().remoteLoad(CdmStore.getService(ITaxonService.class), taxonBaseUuid, getTaxonBasePropertyPaths());
136 if (taxonBase != null){
137 if(taxonBase.isInstanceOf(Taxon.class)){
138 Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
139 setInitiallySelectedTaxonBase(taxon);
140
141 if ( taxon.isMisapplication() || taxon.isProparteSynonym()){
142 // TODO get accepted taxon
143 MessagingUtils.info(Messages.TaxonEditorInput_OPEN_MISSAPPLIED_NAME);
144
145 Set<Taxon> acceptedTaxa = new HashSet<Taxon>();
146 Set<TaxonRelationship> relations = taxon.getRelationsFromThisTaxon();
147 for(TaxonRelationship relation : relations){
148 if(relation.getType().isAnyMisappliedName() || relation.getType().isAnySynonym()){
149 acceptedTaxa.add(relation.getToTaxon());
150 }
151 }
152 if (taxon.getTaxonNodes().size() > 0){
153 acceptedTaxa.add(taxon);
154 }
155 setInputForRelatedTaxa(conversation, acceptedTaxa);
156
157 }else{
158 setInputForMultipleNodes(conversation, taxon.getTaxonNodes());
159 }
160 }else if(taxonBase instanceof Synonym){
161 Synonym synonym = (Synonym) taxonBase;
162
163 Set<Taxon> taxa = new HashSet<>();
164 Taxon taxon = synonym.getAcceptedTaxon();
165 if (taxon != null){
166 taxa.add(taxon);
167 }
168 setInputForMultipleTaxa(conversation, taxa);
169 setInitiallySelectedTaxonBase(synonym);
170 }
171 }
172 }
173
174
175 private void initForParentTaxonNode(UUID parentNodeUuid){
176 this.getCdmEntitySession().bind();
177 TaxonName name = PreferencesUtil.getPreferredNomenclaturalCode().getNewTaxonNameInstance(null);
178 ITaxonTreeNode parentNode = CdmStore.getService(IClassificationService.class).getTreeNodeByUuid(parentNodeUuid);
179
180 Taxon newTaxon = Taxon.NewInstance(name, parentNode.getReference());
181 TaxonNode newTaxonNode = parentNode.addChildTaxon(newTaxon, parentNode.getReference(), parentNode.getMicroReference());
182
183 // add the new taxon to the editors persistence context
184 UUID newTaxonNodeUuid = CdmStore.getService(ITaxonNodeService.class).save(newTaxonNode).getUuid();
185
186 initForTaxonNode(newTaxonNodeUuid);
187 }
188
189 private void setInputForMultipleNodes(ConversationHolder conversation, Set<TaxonNode> taxonNodes){
190 if(taxonNodes.size() == 1){
191 TaxonNode taxonNode = taxonNodes.iterator().next();
192 taxonNode = getCdmEntitySession().remoteLoad(CdmStore.getService(ITaxonNodeService.class), taxonNode.getUuid(), getTaxonNodePropertyPaths());
193 init(taxonNode);
194 }else if(taxonNodes.size() > 1){
195
196 TaxonNode taxonNode = ChooseFromMultipleTaxonNodesDialog.choose(taxonNodes);
197 if(taxonNode != null){
198 taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid(), getTaxonNodePropertyPaths());
199 }
200 if(taxonNode != null){
201 init(taxonNode);
202 }
203 } else if (taxonNodes.size() == 0) {
204 // this is an undesired state
205 MessagingUtils.warningDialog(INCORRECT_STATE,TaxonEditorInputE4.class,Messages.TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION);
206 }
207 }
208
209 private void setInputForMultipleTaxa(ConversationHolder conversation, Set<Taxon> taxa){
210 if(taxa.size() == 1){
211 Taxon taxon = taxa.iterator().next();
212 Set<TaxonNode> nodes = taxon.getTaxonNodes();
213 setInputForMultipleNodes(conversation, nodes);
214 }else if(taxa.size() > 1){
215 Set<TaxonNode> taxonNodes = new HashSet<TaxonNode>();
216 for ( Taxon taxon : taxa ){
217 taxonNodes.addAll(taxon.getTaxonNodes());
218 }
219 setInputForMultipleNodes(conversation, taxonNodes);
220 }else if(taxa.size() == 0){
221 // this is an undesired state
222 MessagingUtils.warningDialog(INCORRECT_STATE, TaxonEditorInputE4.class, Messages.TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT);
223 }
224 }
225
226 private void setInputForRelatedTaxa(ConversationHolder conversation, Set<Taxon> taxa){
227 if(taxa.size() == 1){
228 Taxon taxon = taxa.iterator().next();
229 Set<TaxonNode> nodes = taxon.getTaxonNodes();
230 TaxonNode taxonNode = null;
231 if (nodes.size()>1){
232 taxonNode = ChooseFromMultipleTaxonNodesDialog.choose(nodes);
233 }else if (nodes.size()==1){
234 taxonNode = nodes.iterator().next();
235 }else{
236 MessagingUtils.warningDialog(INCORRECT_STATE,TaxonEditorInputE4.class,Messages.TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION);
237 }
238 init(taxonNode);
239 }else if(taxa.size() > 1){
240 Iterator<Taxon> taxonIterator = taxa.iterator();
241 Set<TaxonNode> nodes = new HashSet<>();
242 while (taxonIterator.hasNext()){
243
244 nodes.addAll(taxonIterator.next().getTaxonNodes());
245 }
246 TaxonNode taxonNode = ChooseFromMultipleAcceptedTaxaDialog.choose(nodes);
247 if(taxonNode != null){
248 taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid(), getTaxonNodePropertyPaths());
249 }
250 if(taxonNode != null){
251 init(taxonNode);
252 }
253 } else if (taxa.size() == 0) {
254 // this is an undesired state
255 MessagingUtils.warningDialog(INCORRECT_STATE,TaxonEditorInputE4.class,Messages.TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION);
256 }
257 }
258
259 public static TaxonEditorInputE4 NewInstance(UUID taxonNodeUuid) {
260 return new TaxonEditorInputE4(taxonNodeUuid, CdmType.TAXON_NODE);
261
262 }
263
264 public static TaxonEditorInputE4 NewInstanceFromTaxonBase(UUID taxonBaseUuid){
265 return new TaxonEditorInputE4(taxonBaseUuid, CdmType.TAXON_BASE);
266 }
267
268
269 public static TaxonEditorInputE4 NewEmptyInstance(UUID parentNodeUuid){
270 return new TaxonEditorInputE4(parentNodeUuid, CdmType.PARENT_TAXON_NODE);
271 }
272
273 public Object getAdapter(Class adapter) {
274
275 if (adapter == Taxon.class) {
276 return getTaxon();
277 }
278
279 if (adapter == TaxonNode.class) {
280 return taxonNode;
281 }
282
283 return null;
284 }
285
286 /**
287 * {@inheritDoc}
288 *
289 * Overrides equals to ensure that a taxon can only be edited by
290 * one editor at a time.
291 */
292 @Override
293 public boolean equals(Object obj) {
294 if (TaxonEditorInputE4.class.equals(obj.getClass())
295 && getTaxon() != null
296 && getTaxon().equals(((TaxonEditorInputE4) obj).getTaxon())) {
297 if (((TaxonEditorInputE4) obj).getInitiallySelectedTaxonBase() != null){
298 setInitiallySelectedTaxonBase(((TaxonEditorInputE4) obj).getInitiallySelectedTaxonBase());
299 }
300 return true;
301 }
302 return false;
303 }
304
305 public Taxon getTaxon(){
306 if(taxonNode!=null){
307 Taxon taxon = CdmBase.deproxy(taxonNode.getTaxon(), Taxon.class);
308 return taxon;
309 }
310 return null;
311 }
312
313 public TaxonNode getTaxonNode() {
314 return taxonNode;
315 }
316
317 @Override
318 public ConversationHolder getConversationHolder() {
319 return conversation;
320 }
321
322 @Override
323 public void update(CdmDataChangeMap events) {
324 if(dataChangeBehavior == null){
325 dataChangeBehavior = new TaxonEditorInputDataChangeBehaviourE4(this);
326 }
327
328 DataChangeBridge.handleDataChange(events, dataChangeBehavior);
329 }
330
331 public void setInitiallySelectedTaxonBase(TaxonBase taxonBase) {
332 this.initiallySelectedTaxonBase = taxonBase;
333 }
334
335 public TaxonBase getInitiallySelectedTaxonBase() {
336 return initiallySelectedTaxonBase;
337 }
338
339 public void addOperation(AbstractPostOperation operation) {
340 this.operations.add(operation);
341 }
342
343 public void addToSaveNewSynonym(Synonym toSaveNew) {
344 this.toSaveNewSynonyms.add(toSaveNew);
345 }
346 public void addToSaveConcept(Taxon toSaveNew) {
347 this.toSaveConcepts.add(toSaveNew);
348 }
349
350 @Override
351 public List<TaxonNode> getRootEntities() {
352 return Arrays.asList(taxonNode);
353 }
354
355 @Override
356 public void merge() {
357 if (!this.getCdmEntitySession().isActive()){
358 this.getCdmEntitySession().bind();
359 }
360 for(Entry<TaxonBase, TaxonBaseDeletionConfigurator> entry:toDeletes.entrySet()){
361 delete(entry.getKey(), entry.getValue());
362 }
363 toDeletes.clear();
364
365 // new concepts needs to be saved separately, the list contains all concepts, the
366 for (TaxonBase<?> concept: toSaveConcepts){
367 if (concept != null){
368 if (concept.getName() != null){
369 for (HybridRelationship rel : concept.getName().getHybridChildRelations()){
370 toSaveNewNames.add(rel.getParentName());
371 toSaveNewNames.add(rel.getHybridName());
372 }
373 }
374 }
375 }
376
377 //handle cascading for hybrid relationshis
378 //accepted taxa
379 if (taxonNode.getTaxon().getName() != null){
380 for (HybridRelationship rel : taxonNode.getTaxon().getName().getHybridChildRelations()){
381 toSaveNewNames.add(rel.getParentName());
382 toSaveNewNames.add(rel.getHybridName());
383 }
384 }
385 //synonyms
386 for (TaxonName synonymName : taxonNode.getTaxon().getSynonymNames()){
387 if (synonymName != null){
388 for (HybridRelationship rel : synonymName.getHybridChildRelations()){
389 toSaveNewNames.add(rel.getParentName());
390 toSaveNewNames.add(rel.getHybridName());
391 }
392 }
393 }
394 // for (TaxonName name:toSaveNewNames){
395 // name.get
396 // }
397
398 if (!toSaveNewNames.isEmpty()){
399 CdmStore.getService(INameService.class).merge(toSaveNewNames, true);
400 }
401 if (!toSaveConcepts.isEmpty()){
402 CdmStore.getService(ITaxonService.class).merge(toSaveConcepts, true);
403 }
404
405 toSaveNewNames.clear();
406 toSaveConcepts.clear();
407
408 for(AbstractPostOperation<?> entry:operations){
409 IStatus status = Status.CANCEL_STATUS;
410 final IAdaptable uiInfoAdapter = WorkspaceUndoUtil
411 .getUIInfoAdapter(AbstractUtility.getShell());
412 String operationlabel = entry.getLabel();
413 try {
414 entry.addContext(IOperationHistory.GLOBAL_UNDO_CONTEXT);
415 status = entry.execute(new NullProgressMonitor(), uiInfoAdapter);
416 } catch (ExecutionException e) {
417 MessagingUtils.operationDialog(AbstractUtility.class, e, TaxeditorStorePlugin.PLUGIN_ID, operationlabel, null);
418 }
419
420 IPostOperationEnabled postOperationEnabled = entry
421 .getPostOperationEnabled();
422 if (postOperationEnabled != null) {
423 postOperationEnabled.onComplete();
424 }
425
426 //AbstractUtility.executeOperation(entry,sync);
427 }
428
429 operations.clear();
430 CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
431 }
432
433 private void delete(TaxonBase key, TaxonBaseDeletionConfigurator value) {
434 if (key instanceof Synonym){
435 CdmStore.getService(ITaxonService.class).deleteSynonym(((Synonym)key).getUuid(), (SynonymDeletionConfigurator) value);
436 }else{
437 CdmStore.getService(ITaxonService.class).deleteTaxon(((Taxon)key).getUuid(), (TaxonDeletionConfigurator) value, null);
438 }
439 }
440
441 @Override
442 public Map<Object, List<String>> getPropertyPathsMap() {
443 return null;
444 }
445
446 private List<String> getTaxonNodePropertyPaths() {
447 List<String> taxonNodePropertyPaths = new ArrayList<String>();
448 for(String propertyPath : getTaxonBasePropertyPaths()) {
449 taxonNodePropertyPaths.add("taxon." + propertyPath); //$NON-NLS-1$
450 }
451 return taxonNodePropertyPaths;
452 }
453
454 private List<String> getTaxonBasePropertyPaths() {
455 List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
456 "sec", //$NON-NLS-1$
457 "createdBy", //$NON-NLS-1$
458 "updatedBy", //$NON-NLS-1$
459 "annotations", //$NON-NLS-1$
460 "markers", //$NON-NLS-1$
461 "credits", //$NON-NLS-1$
462 "extensions", //$NON-NLS-1$
463 "rights", //$NON-NLS-1$
464 "sources", //$NON-NLS-1$
465 "sources.links", //$NON-NLS-1$
466 "identifiers",
467 "descriptions", //$NON-NLS-1$
468 "taxonNodes", //$NON-NLS-1$
469 "descriptions.descriptionElements.feature", //$NON-NLS-1$
470 "descriptions.descriptionElements.area", //$NON-NLS-1$
471 "descriptions.descriptionElements.status", //$NON-NLS-1$
472 "descriptions.descriptionElements.markers", //$NON-NLS-1$
473 "descriptions.descriptionElements.sources", //$NON-NLS-1$
474 "descriptions.descriptionElements.annotations", //$NON-NLS-1$
475 "descriptions.markers", //$NON-NLS-1$
476 "descriptions.descriptionSources", //$NON-NLS-1$
477 "descriptions.sources", //$NON-NLS-1$
478 "descriptions.annotations", //$NON-NLS-1$
479 "descriptions.links", //$NON-NLS-1$
480 "name.descriptions", //$NON-NLS-1$
481 "name.typeDesignations.typeSpecimen.derivedFrom.originals", //$NON-NLS-1$
482 "name.typeDesignations.source", //$NON-NLS-1$
483 "name.typeDesignations.source.nameUsedInSource", //$NON-NLS-1$
484 "name.typeDesignations.source.citation", //$NON-NLS-1$
485 "name.typeDesignations.source.links", //$NON-NLS-1$
486 "name.typeDesignations.text", //$NON-NLS-1$
487 "name.typeDesignations.sources", //$NON-NLS-1$
488 "name.typeDesignations.sources.links", //$NON-NLS-1$
489 "name.status", //$NON-NLS-1$
490 "name.nomenclaturalSource", //$NON-NLS-1$
491 "name.nomenclaturalSource.nameUsedInSource", //$NON-NLS-1$
492 "name.nomenclaturalSource.links.description", //$NON-NLS-1$
493 "name.nomenclaturalSource.citation", //$NON-NLS-1$
494 "name.nomenclaturalSource.citation.inReference", //$NON-NLS-1$
495 "name.nomenclaturalSource.cdmSource", //$NON-NLS-1$
496 "name.nomenclaturalSource.cdmSource.description", //$NON-NLS-1$
497 "name.status.source", //$NON-NLS-1$
498 "name.status.source.links", //$NON-NLS-1$
499 "name.taxonBases.taxonNodes", //$NON-NLS-1$
500 "name.relationsFromThisName", //$NON-NLS-1$
501 "name.relationsFromThisName.source", //$NON-NLS-1$
502 "name.relationsFromThisName.source.links", //$NON-NLS-1$
503 "name.relationsToThisName", //$NON-NLS-1$
504 "name.relationsToThisName.source", //$NON-NLS-1$
505 "name.relationsToThisName.source.links", //$NON-NLS-1$
506 "name.homotypicalGroup.typifiedNames.taxonBases.synonyms.synonym.name.status", //$NON-NLS-1$
507 "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName", //$NON-NLS-1$
508 "name.rank.vocabulary", //$NON-NLS-1$
509 "synonyms.name.status.type", //$NON-NLS-1$
510 "synonyms.name.relationsToThisName.relatedFrom", //$NON-NLS-1$
511 "synonyms.name.relationsFromThisName.relatedTo", //$NON-NLS-1$
512 "synonyms.name.nomenclaturalSource", //$NON-NLS-1$
513 "synonyms.name.nomenclaturalSource.nameUsedInSource", //$NON-NLS-1$
514 "synonyms.name.nomenclaturalSource.links", //$NON-NLS-1$
515 "synonyms.name.nomenclaturalSource.citation", //$NON-NLS-1$
516 "synonyms.name.nomenclaturalSource.citation.inReference", //$NON-NLS-1$
517 "synonyms.name.nomenclaturalSource.cdmSource", //$NON-NLS-1$
518 "synonyms.name.nomenclaturalSource.cdmSource.description", //$NON-NLS-1$
519 "synonyms.name.nomenclaturalSource.citation.inReference.authorship", //$NON-NLS-1$
520 "synonyms.name.nomenclaturalSource.citation.authorship", //$NON-NLS-1$
521 "synonyms.name.homotypicalGroup.typifiedNames.taxonBases.synonyms", //$NON-NLS-1$
522 "relationsFromThisTaxon",//$NON-NLS-1$
523 "relationsToThisTaxon"//$NON-NLS-1$
524
525 });
526
527 return taxonBasePropertyPaths;
528 }
529
530 public void addTaxonBaseToDelete(TaxonBase selectedElement, TaxonBaseDeletionConfigurator deleteConfig) {
531 this.toDeletes.put(selectedElement, deleteConfig);
532
533 }
534
535 public void addToSaveNewName(TaxonName newName) {
536 this.toSaveNewNames.add(newName);
537 }
538 }