Revision 22de2466
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java | ||
---|---|---|
106 | 106 |
monitor.worked(20); |
107 | 107 |
ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration(); |
108 | 108 |
ITaxonNodeService service = controller.getTaxonNodeService(); |
109 |
if(taxonNode != null && taxonNode instanceof TaxonNode){ |
|
109 |
if(taxonNode != null && taxonNode instanceof TaxonNode && ((TaxonNode)taxonNode).hasTaxon()){
|
|
110 | 110 |
//((TaxonNode) treeNode).delete(); |
111 |
|
|
111 |
|
|
112 | 112 |
element = ((TaxonNode)taxonNode).getTaxon(); |
113 | 113 |
|
114 | 114 |
DeleteResult result = service.deleteTaxonNode((TaxonNode)taxonNode, config); |
... | ... | |
125 | 125 |
} |
126 | 126 |
|
127 | 127 |
|
128 |
}else if(taxonNode != null && taxonNode instanceof Classification){
|
|
129 |
Classification taxonomicTree = (Classification) taxonNode;
|
|
128 |
}else if(taxonNode != null && taxonNode instanceof TaxonNode && !((TaxonNode)taxonNode).hasTaxon()){
|
|
129 |
Classification taxonomicTree = ((TaxonNode) taxonNode).getClassification();
|
|
130 | 130 |
|
131 | 131 |
DeleteResult result = CdmStore.getService(IClassificationService.class).delete(taxonomicTree.getUuid()); |
132 | 132 |
if (result.isError() && !result.getExceptions().isEmpty()){ |
Also available in: Unified diff
minor