Project

General

Profile

Download (21.6 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
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

    
351
    @Override
352
    public List<TaxonNode> getRootEntities() {
353
        return Arrays.asList(taxonNode);
354
    }
355

    
356
    @Override
357
    public void merge() {
358
        if (!this.getCdmEntitySession().isActive()){
359
            this.getCdmEntitySession().bind();
360
        }
361
        for(Entry<TaxonBase, TaxonBaseDeletionConfigurator> entry:toDeletes.entrySet()){
362
            delete(entry.getKey(), entry.getValue());
363
        }
364
        toDeletes.clear();
365

    
366
        // new concepts needs to be saved separately, the list contains all concepts, the
367
        for (TaxonBase<?> concept: toSaveConcepts){
368
            if (concept != null){
369
                if (concept.getName() != null){
370
                    for (HybridRelationship rel : concept.getName().getHybridChildRelations()){
371
                        toSaveNewNames.add(rel.getParentName());
372
                        toSaveNewNames.add(rel.getHybridName());
373
                    }
374
                }
375
            }
376
        }
377

    
378
        //handle cascading for hybrid relationshis
379
        //accepted taxa
380
        if (taxonNode.getTaxon().getName() != null){
381
            for (HybridRelationship rel : taxonNode.getTaxon().getName().getHybridChildRelations()){
382
                toSaveNewNames.add(rel.getParentName());
383
                toSaveNewNames.add(rel.getHybridName());
384
            }
385
        }
386
        //synonyms
387
        for (TaxonName synonymName : taxonNode.getTaxon().getSynonymNames()){
388
            if (synonymName != null){
389
                for (HybridRelationship rel : synonymName.getHybridChildRelations()){
390
                    toSaveNewNames.add(rel.getParentName());
391
                    toSaveNewNames.add(rel.getHybridName());
392
                }
393
            }
394
        }
395
//        for (TaxonName name:toSaveNewNames){
396
//            name.get
397
//        }
398

    
399
        if (!toSaveNewNames.isEmpty()){
400
            CdmStore.getService(INameService.class).merge(toSaveNewNames, true);
401
        }
402
        if (!toSaveConcepts.isEmpty()){
403
            CdmStore.getService(ITaxonService.class).merge(toSaveConcepts, true);
404
        }
405

    
406
        toSaveNewNames.clear();
407
        toSaveConcepts.clear();
408

    
409

    
410

    
411

    
412
        for(AbstractPostOperation<?> entry:operations){
413
            IStatus status = Status.CANCEL_STATUS;
414
            final IAdaptable uiInfoAdapter = WorkspaceUndoUtil
415
                    .getUIInfoAdapter(AbstractUtility.getShell());
416
            String operationlabel = entry.getLabel();
417
            try {
418
                entry.addContext(IOperationHistory.GLOBAL_UNDO_CONTEXT);
419
                status = entry.execute(new NullProgressMonitor(), uiInfoAdapter);
420
            } catch (ExecutionException e) {
421
                MessagingUtils.operationDialog(AbstractUtility.class, e, TaxeditorStorePlugin.PLUGIN_ID, operationlabel, null);
422
            }
423

    
424
            IPostOperationEnabled postOperationEnabled = entry
425
                    .getPostOperationEnabled();
426
            if (postOperationEnabled != null) {
427
                postOperationEnabled.onComplete();
428
            }
429

    
430
            //AbstractUtility.executeOperation(entry,sync);
431
        }
432

    
433
        operations.clear();
434
        CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
435
    }
436

    
437
    private void delete(TaxonBase key, TaxonBaseDeletionConfigurator value) {
438
        if (key instanceof Synonym){
439
            CdmStore.getService(ITaxonService.class).deleteSynonym(((Synonym)key).getUuid(), (SynonymDeletionConfigurator) value);
440
        }else{
441
            CdmStore.getService(ITaxonService.class).deleteTaxon(((Taxon)key).getUuid(), (TaxonDeletionConfigurator) value, null);
442
        }
443
    }
444

    
445
    @Override
446
    public Map<Object, List<String>> getPropertyPathsMap() {
447
        return null;
448
    }
449

    
450
    private List<String> getTaxonNodePropertyPaths() {
451
        List<String> taxonNodePropertyPaths = new ArrayList<String>();
452
        for(String propertyPath : getTaxonBasePropertyPaths()) {
453
            taxonNodePropertyPaths.add("taxon." + propertyPath); //$NON-NLS-1$
454
        }
455
        return taxonNodePropertyPaths;
456
    }
457

    
458
    private List<String> getTaxonBasePropertyPaths() {
459
        List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
460
                "sec", //$NON-NLS-1$
461
                "createdBy", //$NON-NLS-1$
462
                "updatedBy", //$NON-NLS-1$
463
                "annotations", //$NON-NLS-1$
464
                "markers", //$NON-NLS-1$
465
                "credits", //$NON-NLS-1$
466
                "extensions", //$NON-NLS-1$
467
                "rights", //$NON-NLS-1$
468
                "sources", //$NON-NLS-1$
469
                "identifiers",
470
                "descriptions", //$NON-NLS-1$
471
                "taxonNodes", //$NON-NLS-1$
472
                "descriptions.descriptionElements.feature", //$NON-NLS-1$
473
                "descriptions.descriptionElements.area", //$NON-NLS-1$
474
                "descriptions.descriptionElements.status", //$NON-NLS-1$
475
                "descriptions.descriptionElements.markers", //$NON-NLS-1$
476
                "descriptions.descriptionElements.sources", //$NON-NLS-1$
477
                "descriptions.descriptionElements.annotations", //$NON-NLS-1$
478
                "descriptions.markers", //$NON-NLS-1$
479
                "descriptions.descriptionSources", //$NON-NLS-1$
480
                "descriptions.sources", //$NON-NLS-1$
481
                "descriptions.annotations", //$NON-NLS-1$
482
                "descriptions.links", //$NON-NLS-1$
483
                "name.descriptions", //$NON-NLS-1$
484
                "name.typeDesignations.typeSpecimen.derivedFrom.originals", //$NON-NLS-1$
485
                "name.typeDesignations.source", //$NON-NLS-1$
486
                "name.typeDesignations.source.nameUsedInSource", //$NON-NLS-1$
487
                "name.typeDesignations.source.citation", //$NON-NLS-1$
488
                "name.typeDesignations.source.links", //$NON-NLS-1$
489
                "name.typeDesignations.text", //$NON-NLS-1$
490
                "name.typeDesignations.sources", //$NON-NLS-1$
491
                "name.status", //$NON-NLS-1$
492
                "name.nomenclaturalSource", //$NON-NLS-1$
493
                "name.nomenclaturalSource.nameUsedInSource", //$NON-NLS-1$
494
                "name.nomenclaturalSource.links.description", //$NON-NLS-1$
495
                "name.nomenclaturalSource.citation", //$NON-NLS-1$
496
                "name.nomenclaturalSource.citation.inReference", //$NON-NLS-1$
497
                "name.nomenclaturalSource.cdmSource", //$NON-NLS-1$
498
                "name.nomenclaturalSource.cdmSource.description", //$NON-NLS-1$
499
                "name.taxonBases.taxonNodes", //$NON-NLS-1$
500
                "name.relationsFromThisName", //$NON-NLS-1$
501
                "name.relationsFromThisName.relatedTo", //$NON-NLS-1$
502
                "name.relationsToThisName", //$NON-NLS-1$
503
                "name.relationsToThisName.relatedFrom", //$NON-NLS-1$
504
                "name.homotypicalGroup.typifiedNames.taxonBases.synonyms.synonym.name.status", //$NON-NLS-1$
505
                "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName", //$NON-NLS-1$
506
                "synonyms.name.status.type", //$NON-NLS-1$
507
                "synonyms.name.relationsToThisName.relatedFrom", //$NON-NLS-1$
508
                "synonyms.name.relationsFromThisName.relatedTo", //$NON-NLS-1$
509
                "synonyms.name.nomenclaturalSource", //$NON-NLS-1$
510
                "synonyms.name.nomenclaturalSource.nameUsedInSource", //$NON-NLS-1$
511
                "synonyms.name.nomenclaturalSource.links", //$NON-NLS-1$
512
                "synonyms.name.nomenclaturalSource.citation", //$NON-NLS-1$
513
                "synonyms.name.nomenclaturalSource.citation.inReference", //$NON-NLS-1$
514
                "synonyms.name.nomenclaturalSource.cdmSource", //$NON-NLS-1$
515
                "synonyms.name.nomenclaturalSource.cdmSource.description", //$NON-NLS-1$
516
                "synonyms.name.nomenclaturalSource.citation.inReference.authorship", //$NON-NLS-1$
517
                "synonyms.name.nomenclaturalSource.citation.authorship", //$NON-NLS-1$
518
                "synonyms.name.homotypicalGroup.typifiedNames.taxonBases.synonyms", //$NON-NLS-1$
519
                "relationsFromThisTaxon",//$NON-NLS-1$
520
                "relationsToThisTaxon"//$NON-NLS-1$
521

    
522
        });
523

    
524
        return taxonBasePropertyPaths;
525
    }
526

    
527
    public void addTaxonBaseToDelete(TaxonBase selectedElement, TaxonBaseDeletionConfigurator deleteConfig) {
528
        this.toDeletes.put(selectedElement, deleteConfig);
529

    
530
    }
531

    
532
    public void addToSaveNewName(TaxonName newName) {
533
        this.toSaveNewNames.add(newName);
534
    }
535
}
(2-2/2)