Revision 0a534d09
Added by Patrick Plitzner over 10 years ago
- adapted sub classes of AbstractPostOperation
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToConceptOperation.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
... | ... | |
32 | 32 |
* @version 1.0 |
33 | 33 |
*/ |
34 | 34 |
public class ChangeSynonymToConceptOperation extends AbstractPostTaxonOperation { |
35 |
private Synonym synonym; |
|
36 |
private TaxonRelationshipType taxonRelationshipType; |
|
37 |
|
|
35 |
private final Synonym synonym;
|
|
36 |
private final TaxonRelationshipType taxonRelationshipType;
|
|
37 |
|
|
38 | 38 |
/** |
39 | 39 |
* <p>Constructor for ChangeSynonymToConceptOperation.</p> |
40 | 40 |
* |
... | ... | |
48 | 48 |
public ChangeSynonymToConceptOperation(String label, |
49 | 49 |
IUndoContext undoContext, Taxon taxon, Synonym synonym, TaxonRelationshipType taxonRelationshipType, IPostOperationEnabled postOperationEnabled) { |
50 | 50 |
super(label, undoContext, taxon, postOperationEnabled); |
51 |
|
|
51 |
|
|
52 | 52 |
this.taxonRelationshipType = taxonRelationshipType; |
53 | 53 |
this.synonym = synonym; |
54 |
|
|
54 |
|
|
55 | 55 |
} |
56 | 56 |
|
57 | 57 |
/* (non-Javadoc) |
... | ... | |
64 | 64 |
|
65 | 65 |
// // Get name from synonym |
66 | 66 |
// TaxonNameBase<?, ?> synonymName = synonym.getName(); |
67 |
//
|
|
67 |
// |
|
68 | 68 |
// // remove synonym from taxon |
69 | 69 |
// taxon.removeSynonym(synonym); |
70 |
//
|
|
70 |
// |
|
71 | 71 |
// // Create a taxon with synonym name |
72 | 72 |
// Taxon fromTaxon = Taxon.NewInstance(synonymName, null); |
73 |
//
|
|
74 |
// // Add taxon relation
|
|
73 |
// |
|
74 |
// // Add taxon relation |
|
75 | 75 |
// fromTaxon.addTaxonRelation(taxon, taxonRelationshipType, null, null); |
76 | 76 |
|
77 | 77 |
monitor.worked(20); |
78 |
Taxon fromTaxon = CdmStore.getService(ITaxonService.class).changeSynonymToRelatedTaxon(synonym, taxon, taxonRelationshipType, null, null);
|
|
78 |
Taxon fromTaxon = CdmStore.getService(ITaxonService.class).changeSynonymToRelatedTaxon(synonym, element, taxonRelationshipType, null, null);
|
|
79 | 79 |
monitor.worked(40); |
80 |
|
|
80 |
|
|
81 | 81 |
// TaxonRelationshipType. |
82 | 82 |
// logger.warn("Not yet implemented."); |
83 | 83 |
|
Also available in: Unified diff