Revision e3a4a3ff
Added by Andreas Müller almost 7 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java | ||
---|---|---|
39 | 39 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
40 | 40 |
import eu.etaxonomy.cdm.model.common.ICdmBase; |
41 | 41 |
import eu.etaxonomy.cdm.model.description.PolytomousKey; |
42 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
|
|
42 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
43 | 43 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
44 | 44 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
45 | 45 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
... | ... | |
77 | 77 |
* @param selectedObject a {@link eu.etaxonomy.cdm.model.common.CdmBase} object. |
78 | 78 |
*/ |
79 | 79 |
public static void openEditor(UuidAndTitleCache uuidAndTitleCache){ |
80 |
Class type = uuidAndTitleCache.getType(); |
|
80 |
Class<?> type = uuidAndTitleCache.getType();
|
|
81 | 81 |
ICdmBase cdmBase = null; |
82 | 82 |
if(type.equals(Classification.class)){ |
83 | 83 |
cdmBase = CdmStore.getService(IClassificationService.class).load(uuidAndTitleCache.getUuid()); |
... | ... | |
88 | 88 |
else if(TaxonBase.class.isAssignableFrom(type)){ |
89 | 89 |
cdmBase = CdmStore.getService(ITaxonService.class).load(uuidAndTitleCache.getUuid()); |
90 | 90 |
} |
91 |
else if(type.equals(TaxonNameBase.class)){
|
|
91 |
else if(type.equals(TaxonName.class)){ |
|
92 | 92 |
cdmBase = CdmStore.getService(INameService.class).load(uuidAndTitleCache.getUuid()); |
93 | 93 |
} |
94 | 94 |
else{ |
... | ... | |
122 | 122 |
else{ |
123 | 123 |
EditorUtil.openTaxonBase(entityUuid); |
124 | 124 |
} |
125 |
}else if(selectedObject instanceof TaxonNameBase){
|
|
125 |
}else if(selectedObject instanceof TaxonName){ |
|
126 | 126 |
openInBulkEditor(selectedObject); |
127 | 127 |
}else if(selectedObject instanceof PolytomousKey){ |
128 | 128 |
EditorUtil.openPolytomousKey(entityUuid); |
Also available in: Unified diff
ref #6446 merge taxon name subclasses in TaxEditor