Project

General

Profile

Download (21.2 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.service.IClassificationService;
32
import eu.etaxonomy.cdm.api.service.INameService;
33
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
34
import eu.etaxonomy.cdm.api.service.ITaxonService;
35
import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
36
import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;
37
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
38
import eu.etaxonomy.cdm.model.common.CdmBase;
39
import eu.etaxonomy.cdm.model.name.HybridRelationship;
40
import eu.etaxonomy.cdm.model.name.TaxonName;
41
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
42
import eu.etaxonomy.cdm.model.taxon.Synonym;
43
import eu.etaxonomy.cdm.model.taxon.Taxon;
44
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
45
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
46
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
47
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
48
import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
49
import eu.etaxonomy.taxeditor.editor.ChooseFromMultipleAcceptedTaxaDialog;
50
import eu.etaxonomy.taxeditor.editor.ChooseFromMultipleTaxonNodesDialog;
51
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
52
import eu.etaxonomy.taxeditor.model.AbstractUtility;
53
import eu.etaxonomy.taxeditor.model.DataChangeBridge;
54
import eu.etaxonomy.taxeditor.model.MessagingUtils;
55
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
56
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
57
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
58
import eu.etaxonomy.taxeditor.store.CdmStore;
59
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
60

    
61
/**
62
 * @author pplitzner
63
 * @date Aug 24, 2017
64
 */
65
public class TaxonEditorInput  extends CdmEntitySessionInput<TaxonNode>{
66

    
67
    private static final String INCORRECT_STATE = Messages.TaxonEditorInput_INCORRECT_STATE;
68

    
69
    private TaxonNode taxonNode;
70

    
71
    private Map<TaxonBase, TaxonBaseDeletionConfigurator> toDeletes = new HashMap<>();
72
    private Set<Synonym> toSaveNewSynonyms = new HashSet<>();
73
    private Set<TaxonBase> toSaveConcepts = new HashSet<>();
74
    private Set<TaxonName> toSaveNewNames = new HashSet<>();
75

    
76
    private Set<AbstractPostOperation> operations = new HashSet<>();
77

    
78
//    private TaxonEditorInputDataChangeBehaviourE4 dataChangeBehavior;
79

    
80
    private TaxonBase<?> initiallySelectedTaxonBase;
81

    
82
    private UISynchronize sync;
83

    
84

    
85
    public void setSync(UISynchronize sync) {
86
        this.sync = sync;
87
    }
88

    
89
    private enum CdmType {
90
        TAXON_NODE,
91
        TAXON_BASE,
92
        PARENT_TAXON_NODE
93
    }
94

    
95
    private TaxonEditorInput(UUID uuid, CdmType type) {
96
        super(true);
97
    	switch(type) {
98
        case PARENT_TAXON_NODE:
99
            initForParentTaxonNode(uuid);
100
            break;
101
        case TAXON_BASE:
102
            initForTaxonBase(uuid);
103
            break;
104
        case TAXON_NODE:
105
            initForTaxonNode(uuid);
106
            break;
107
        }
108
    }
109

    
110
    private void init(TaxonNode taxonNode) {
111
    	this.taxonNode = taxonNode;
112
    }
113

    
114
    private void initForTaxonNode(UUID taxonNodeUuid) {
115
    	this.getCdmEntitySession().bind();
116
        TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, getTaxonNodePropertyPaths());
117
//    	TaxonNode taxonNode = getCdmEntitySession().remoteLoad(CdmStore.getService(ITaxonNodeService.class), taxonNodeUuid, getTaxonNodePropertyPaths());
118
        if(taxonNode == null){
119
            MessagingUtils.warningDialog(Messages.TaxonEditorInput_NOT_IMPLEMENTED, TaxonEditorInput.class, Messages.TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE);
120
        }
121
        init(taxonNode);
122
        setInitiallySelectedTaxonBase(getTaxon());
123
    }
124

    
125
    private void initForTaxonBase(UUID taxonBaseUuid) {
126
    	this.getCdmEntitySession().bind();
127
//        TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).load(taxonBaseUuid, getTaxonBasePropertyPaths());
128
    	TaxonBase<?> taxonBase = getCdmEntitySession().remoteLoad(CdmStore.getService(ITaxonService.class), taxonBaseUuid, getTaxonBasePropertyPaths());
129
        if (taxonBase != null){
130
            if(taxonBase.isInstanceOf(Taxon.class)){
131
                Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
132
                setInitiallySelectedTaxonBase(taxon);
133

    
134
                if ( taxon.isMisapplication() || taxon.isProparteSynonym()){
135
                    // TODO get accepted taxon
136
                    MessagingUtils.info(Messages.TaxonEditorInput_OPEN_MISSAPPLIED_NAME);
137

    
138
                    Set<Taxon> acceptedTaxa = new HashSet<Taxon>();
139
                    Set<TaxonRelationship> relations = taxon.getRelationsFromThisTaxon();
140
                    for(TaxonRelationship relation : relations){
141
                        if(relation.getType().isAnyMisappliedName() || relation.getType().isAnySynonym()){
142
                            acceptedTaxa.add(relation.getToTaxon());
143
                        }
144
                    }
145
                    if (taxon.getTaxonNodes().size() > 0){
146
                        acceptedTaxa.add(taxon);
147
                    }
148
                    setInputForRelatedTaxa(acceptedTaxa);
149

    
150
                }else{
151
                    setInputForMultipleNodes(taxon.getTaxonNodes());
152
                }
153
            }else if(taxonBase instanceof Synonym){
154
                Synonym synonym = (Synonym) taxonBase;
155

    
156
                Set<Taxon> taxa = new HashSet<>();
157
                Taxon taxon = synonym.getAcceptedTaxon();
158
                if (taxon != null){
159
                	taxa.add(taxon);
160
                }
161
                setInputForMultipleTaxa(taxa);
162
                setInitiallySelectedTaxonBase(synonym);
163
            }
164
        }
165
    }
166

    
167
    private void initForParentTaxonNode(UUID parentNodeUuid){
168
    	this.getCdmEntitySession().bind();
169
        TaxonName name = PreferencesUtil.getPreferredNomenclaturalCode().getNewTaxonNameInstance(null);
170
        ITaxonTreeNode parentNode = CdmStore.getService(IClassificationService.class).getTreeNodeByUuid(parentNodeUuid);
171

    
172
        Taxon newTaxon = Taxon.NewInstance(name, parentNode.getReference());
173
        TaxonNode newTaxonNode = parentNode.addChildTaxon(newTaxon, parentNode.getReference(), parentNode.getMicroReference());
174

    
175
        // add the new taxon to the editors persistence context
176
        UUID newTaxonNodeUuid = CdmStore.getService(ITaxonNodeService.class).save(newTaxonNode).getUuid();
177

    
178
        initForTaxonNode(newTaxonNodeUuid);
179
    }
180

    
181
    private void setInputForMultipleNodes(Set<TaxonNode> taxonNodes){
182
        if(taxonNodes.size() == 1){
183
            TaxonNode taxonNode = taxonNodes.iterator().next();
184
            taxonNode = getCdmEntitySession().remoteLoad(CdmStore.getService(ITaxonNodeService.class), taxonNode.getUuid(), getTaxonNodePropertyPaths());
185
            init(taxonNode);
186
        }else if(taxonNodes.size() > 1){
187

    
188
            TaxonNode taxonNode = ChooseFromMultipleTaxonNodesDialog.choose(taxonNodes);
189
            if(taxonNode != null){
190
                taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid(), getTaxonNodePropertyPaths());
191
            }
192
            if(taxonNode != null){
193
                init(taxonNode);
194
            }
195
        } else if (taxonNodes.size() == 0) {
196
            // this is an undesired state
197
            MessagingUtils.warningDialog(INCORRECT_STATE,TaxonEditorInput.class,Messages.TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION);
198
        }
199
    }
200

    
201
    private void setInputForMultipleTaxa(Set<Taxon> taxa){
202
        if(taxa.size() == 1){
203
            Taxon taxon = taxa.iterator().next();
204
            Set<TaxonNode> nodes = taxon.getTaxonNodes();
205
            setInputForMultipleNodes(nodes);
206
        }else if(taxa.size() > 1){
207
            Set<TaxonNode> taxonNodes = new HashSet<TaxonNode>();
208
            for ( Taxon taxon : taxa ){
209
                taxonNodes.addAll(taxon.getTaxonNodes());
210
            }
211
            setInputForMultipleNodes(taxonNodes);
212
        }else if(taxa.size() == 0){
213
            // this is an undesired state
214
            MessagingUtils.warningDialog(INCORRECT_STATE, TaxonEditorInput.class, Messages.TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT);
215
        }
216
    }
217

    
218
    private void setInputForRelatedTaxa(Set<Taxon> taxa){
219
        if(taxa.size() == 1){
220
            Taxon taxon = taxa.iterator().next();
221
            Set<TaxonNode> nodes = taxon.getTaxonNodes();
222
            TaxonNode taxonNode = null;
223
            if (nodes.size()>1){
224
                taxonNode = ChooseFromMultipleTaxonNodesDialog.choose(nodes);
225
            }else if (nodes.size()==1){
226
                taxonNode = nodes.iterator().next();
227
            }else{
228
                MessagingUtils.warningDialog(INCORRECT_STATE,TaxonEditorInput.class,Messages.TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION);
229
            }
230
            init(taxonNode);
231
        }else if(taxa.size() > 1){
232
            Iterator<Taxon> taxonIterator = taxa.iterator();
233
            Set<TaxonNode> nodes = new HashSet<>();
234
            while (taxonIterator.hasNext()){
235

    
236
                nodes.addAll(taxonIterator.next().getTaxonNodes());
237
            }
238
            TaxonNode taxonNode = ChooseFromMultipleAcceptedTaxaDialog.choose(nodes);
239
            if(taxonNode != null){
240
                taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid(), getTaxonNodePropertyPaths());
241
            }
242
            if(taxonNode != null){
243
                init(taxonNode);
244
            }
245
        } else if (taxa.size() == 0) {
246
            // this is an undesired state
247
            MessagingUtils.warningDialog(INCORRECT_STATE,TaxonEditorInput.class,Messages.TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION);
248
        }
249
    }
250

    
251
    public static TaxonEditorInput NewInstance(UUID taxonNodeUuid) {
252
        return new TaxonEditorInput(taxonNodeUuid, CdmType.TAXON_NODE);
253
    }
254

    
255
    public static TaxonEditorInput NewInstanceFromTaxonBase(UUID taxonBaseUuid){
256
        return new TaxonEditorInput(taxonBaseUuid, CdmType.TAXON_BASE);
257
    }
258

    
259

    
260
    public static TaxonEditorInput NewEmptyInstance(UUID parentNodeUuid){
261
        return new TaxonEditorInput(parentNodeUuid, CdmType.PARENT_TAXON_NODE);
262
    }
263

    
264
    public Object getAdapter(Class adapter) {
265

    
266
        if (adapter == Taxon.class) {
267
            return getTaxon();
268
        }
269

    
270
        if (adapter == TaxonNode.class) {
271
            return taxonNode;
272
        }
273

    
274
        return null;
275
    }
276

    
277
    /**
278
     * {@inheritDoc}
279
     *
280
     * Overrides equals to ensure that a taxon can only be edited by
281
     * one editor at a time.
282
     */
283
    @Override
284
    public boolean equals(Object obj) {
285
        if (TaxonEditorInput.class.equals(obj.getClass())
286
                && getTaxon() != null
287
                && getTaxon().equals(((TaxonEditorInput) obj).getTaxon())) {
288
            if (((TaxonEditorInput) obj).getInitiallySelectedTaxonBase() != null){
289
                setInitiallySelectedTaxonBase(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase());
290
            }
291
            return true;
292
        }
293
        return false;
294
    }
295

    
296
    public Taxon getTaxon(){
297
        if(taxonNode!=null){
298
            Taxon taxon = CdmBase.deproxy(taxonNode.getTaxon());
299
            return taxon;
300
        }
301
        return null;
302
    }
303

    
304
    public TaxonNode getTaxonNode() {
305
        return taxonNode;
306
    }
307

    
308
    public void setInitiallySelectedTaxonBase(TaxonBase taxonBase) {
309
        this.initiallySelectedTaxonBase = taxonBase;
310
    }
311

    
312
    public TaxonBase getInitiallySelectedTaxonBase() {
313
        return initiallySelectedTaxonBase;
314
    }
315

    
316
    public void addOperation(AbstractPostOperation operation) {
317
        this.operations.add(operation);
318
    }
319

    
320
    public void addToSaveNewSynonym(Synonym toSaveNew) {
321
        this.toSaveNewSynonyms.add(toSaveNew);
322
    }
323
    public void addToSaveConcept(Taxon toSaveNew) {
324
       this.toSaveConcepts.add(toSaveNew);
325
    }
326

    
327
    @Override
328
    public List<TaxonNode> getRootEntities() {
329
        return Arrays.asList(taxonNode);
330
    }
331

    
332
    @Override
333
    public void merge() {
334
        if (!this.getCdmEntitySession().isActive()){
335
            this.getCdmEntitySession().bind();
336
        }
337
        for(Entry<TaxonBase, TaxonBaseDeletionConfigurator> entry:toDeletes.entrySet()){
338
            delete(entry.getKey(), entry.getValue());
339
        }
340
        toDeletes.clear();
341

    
342
        // new concepts needs to be saved separately, the list contains all concepts, the
343
        for (TaxonBase<?> concept: toSaveConcepts){
344
            if (concept != null){
345
                if (concept.getName() != null){
346
                    for (HybridRelationship rel : concept.getName().getHybridChildRelations()){
347
                        toSaveNewNames.add(rel.getParentName());
348
                        toSaveNewNames.add(rel.getHybridName());
349
                    }
350
                }
351
            }
352
        }
353

    
354
        //handle cascading for hybrid relationshis
355
        //accepted taxa
356
        if (taxonNode.getTaxon().getName() != null){
357
            for (HybridRelationship rel : taxonNode.getTaxon().getName().getHybridChildRelations()){
358
                toSaveNewNames.add(rel.getParentName());
359
                toSaveNewNames.add(rel.getHybridName());
360
            }
361
        }
362
        //synonyms
363
        for (TaxonName synonymName : taxonNode.getTaxon().getSynonymNames()){
364
            if (synonymName != null){
365
                for (HybridRelationship rel : synonymName.getHybridChildRelations()){
366
                    toSaveNewNames.add(rel.getParentName());
367
                    toSaveNewNames.add(rel.getHybridName());
368
                }
369
            }
370
        }
371

    
372

    
373
        if (!toSaveNewNames.isEmpty()){
374
        	List<TaxonName> listNames = new ArrayList(toSaveNewNames);
375
            CdmStore.getService(INameService.class).merge(listNames, true);
376
        }
377
        if (!toSaveConcepts.isEmpty()){
378
        	List<TaxonBase> listTaxa = new ArrayList(toSaveConcepts);
379
            CdmStore.getService(ITaxonService.class).merge(listTaxa, true);
380
        }
381

    
382
        toSaveNewNames.clear();
383
        toSaveConcepts.clear();
384

    
385
        for(AbstractPostOperation<?> entry:operations){
386
            IStatus status = Status.CANCEL_STATUS;
387
            final IAdaptable uiInfoAdapter = WorkspaceUndoUtil
388
                    .getUIInfoAdapter(AbstractUtility.getShell());
389
            String operationlabel = entry.getLabel();
390
            try {
391
                entry.addContext(IOperationHistory.GLOBAL_UNDO_CONTEXT);
392
                status = entry.execute(new NullProgressMonitor(), uiInfoAdapter);
393
            } catch (ExecutionException e) {
394
                MessagingUtils.operationDialog(AbstractUtility.class, e, TaxeditorStorePlugin.PLUGIN_ID, operationlabel, null);
395
            }
396

    
397
            IPostOperationEnabled postOperationEnabled = entry
398
                    .getPostOperationEnabled();
399
            if (postOperationEnabled != null) {
400
                postOperationEnabled.onComplete();
401
            }
402

    
403
            //AbstractUtility.executeOperation(entry,sync);
404
        }
405

    
406
        operations.clear();
407
        CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
408
    }
409

    
410
    private void delete(TaxonBase key, TaxonBaseDeletionConfigurator value) {
411
        if (key instanceof Synonym){
412
            CdmStore.getService(ITaxonService.class).deleteSynonym(((Synonym)key).getUuid(), (SynonymDeletionConfigurator) value);
413
        }else{
414
            CdmStore.getService(ITaxonService.class).deleteTaxon(((Taxon)key).getUuid(), (TaxonDeletionConfigurator) value, null);
415
        }
416
    }
417

    
418
    @Override
419
    public Map<Object, List<String>> getPropertyPathsMap() {
420
        return null;
421
    }
422

    
423
    private List<String> getTaxonNodePropertyPaths() {
424
        List<String> taxonNodePropertyPaths = new ArrayList<String>();
425
        for(String propertyPath : getTaxonBasePropertyPaths()) {
426
            taxonNodePropertyPaths.add("taxon." + propertyPath); //$NON-NLS-1$
427
        }
428
        return taxonNodePropertyPaths;
429
    }
430

    
431
    private List<String> getTaxonBasePropertyPaths() {
432
        List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
433
                "sec", //$NON-NLS-1$
434
                "createdBy", //$NON-NLS-1$
435
                "updatedBy", //$NON-NLS-1$
436
                "annotations", //$NON-NLS-1$
437
                "markers", //$NON-NLS-1$
438
                "credits", //$NON-NLS-1$
439
                "extensions", //$NON-NLS-1$
440
                "rights", //$NON-NLS-1$
441
                "sources", //$NON-NLS-1$
442
                "sources.links", //$NON-NLS-1$
443
                "identifiers",
444
                "descriptions", //$NON-NLS-1$
445
                "taxonNodes", //$NON-NLS-1$
446
                "descriptions.descriptionElements.feature", //$NON-NLS-1$
447
                "descriptions.descriptionElements.area", //$NON-NLS-1$
448
                "descriptions.descriptionElements.status", //$NON-NLS-1$
449
                "descriptions.descriptionElements.markers", //$NON-NLS-1$
450
                "descriptions.descriptionElements.sources", //$NON-NLS-1$
451
                "descriptions.descriptionElements.annotations", //$NON-NLS-1$
452
                "descriptions.markers", //$NON-NLS-1$
453
                "descriptions.descriptionSources", //$NON-NLS-1$
454
                "descriptions.sources", //$NON-NLS-1$
455
                "descriptions.annotations", //$NON-NLS-1$
456
                "descriptions.links", //$NON-NLS-1$
457
                "name.descriptions", //$NON-NLS-1$
458
                "name.typeDesignations.typeSpecimen.derivedFrom.originals", //$NON-NLS-1$
459
                "name.typeDesignations.source", //$NON-NLS-1$
460
                "name.typeDesignations.source.nameUsedInSource", //$NON-NLS-1$
461
                "name.typeDesignations.source.citation", //$NON-NLS-1$
462
                "name.typeDesignations.source.links", //$NON-NLS-1$
463
                "name.typeDesignations.text", //$NON-NLS-1$
464
                "name.typeDesignations.sources", //$NON-NLS-1$
465
                "name.typeDesignations.sources.links", //$NON-NLS-1$
466
                "name.status", //$NON-NLS-1$
467
                "name.nomenclaturalSource", //$NON-NLS-1$
468
                "name.nomenclaturalSource.nameUsedInSource", //$NON-NLS-1$
469
                "name.nomenclaturalSource.links.description", //$NON-NLS-1$
470
                "name.nomenclaturalSource.citation", //$NON-NLS-1$
471
                "name.nomenclaturalSource.citation.inReference", //$NON-NLS-1$
472
                "name.nomenclaturalSource.cdmSource", //$NON-NLS-1$
473
                "name.nomenclaturalSource.cdmSource.description", //$NON-NLS-1$
474
                "name.status.source", //$NON-NLS-1$
475
                "name.status.source.links", //$NON-NLS-1$
476
                "name.taxonBases.taxonNodes", //$NON-NLS-1$
477
                "name.relationsFromThisName", //$NON-NLS-1$
478
                "name.relationsFromThisName.source", //$NON-NLS-1$
479
                "name.relationsFromThisName.source.links", //$NON-NLS-1$
480
                "name.relationsToThisName", //$NON-NLS-1$
481
                "name.relationsToThisName.source", //$NON-NLS-1$
482
                "name.relationsToThisName.source.links", //$NON-NLS-1$
483
                "name.homotypicalGroup.typifiedNames.taxonBases.synonyms.synonym.name.status", //$NON-NLS-1$
484
                "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName", //$NON-NLS-1$
485
                "name.rank.vocabulary", //$NON-NLS-1$
486
                "synonyms.name.status.type", //$NON-NLS-1$
487
                "synonyms.name.relationsToThisName.relatedFrom", //$NON-NLS-1$
488
                "synonyms.name.relationsFromThisName.relatedTo", //$NON-NLS-1$
489
                "synonyms.name.nomenclaturalSource", //$NON-NLS-1$
490
                "synonyms.name.nomenclaturalSource.nameUsedInSource", //$NON-NLS-1$
491
                "synonyms.name.nomenclaturalSource.links", //$NON-NLS-1$
492
                "synonyms.name.nomenclaturalSource.citation", //$NON-NLS-1$
493
                "synonyms.name.nomenclaturalSource.citation.inReference", //$NON-NLS-1$
494
                "synonyms.name.nomenclaturalSource.cdmSource", //$NON-NLS-1$
495
                "synonyms.name.nomenclaturalSource.cdmSource.description", //$NON-NLS-1$
496
                "synonyms.name.nomenclaturalSource.citation.inReference.authorship", //$NON-NLS-1$
497
                "synonyms.name.nomenclaturalSource.citation.authorship", //$NON-NLS-1$
498
                "synonyms.name.homotypicalGroup.typifiedNames.taxonBases.synonyms", //$NON-NLS-1$
499
                "relationsFromThisTaxon",//$NON-NLS-1$
500
                "relationsToThisTaxon"//$NON-NLS-1$
501

    
502
        });
503

    
504
        return taxonBasePropertyPaths;
505
    }
506

    
507
    public void addTaxonBaseToDelete(TaxonBase selectedElement, TaxonBaseDeletionConfigurator deleteConfig) {
508
        this.toDeletes.put(selectedElement, deleteConfig);
509

    
510
    }
511

    
512
    public void addToSaveNewName(TaxonName newName) {
513
        this.toSaveNewNames.add(newName);
514
    }
515
}
    (1-1/1)