Revision 007bb138
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/NameEditorMenuPropertyTester.java | ||
---|---|---|
44 | 44 |
private static final String ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS = "isAcceptedAndHasNoHomotypicSynonyms"; //$NON-NLS-1$ |
45 | 45 |
private static final String NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED = "isNotHomotypicSynonymOfAcceptedTaxon"; //$NON-NLS-1$ |
46 | 46 |
private static final String SYNONYM_WITH_HOMOTYPIC_SYNONYMS = "isSynonymInHomotypicalGroupWithMoreSynonyms"; //$NON-NLS-1$ |
47 |
private static final String IS_ORPHANED = "isOrphaned"; //$NON-NLS-1$ |
|
47 |
private static final String IS_ORPHANED = "isOrphaned"; |
|
48 |
private static final String IS_NOT_INVALID_DESIGNATION = "isNotInvalidDesignation";//$NON-NLS-1$ |
|
48 | 49 |
|
49 | 50 |
/** |
50 | 51 |
* <p>Constructor for NameEditorMenuPropertyTester.</p> |
... | ... | |
195 | 196 |
if (selectedElement instanceof Synonym){ |
196 | 197 |
return true; |
197 | 198 |
} |
198 |
if(!((Taxon) selectedElement).isProparteSynonym() ){
|
|
199 |
return true;
|
|
199 |
if(((Taxon) selectedElement).isProparteSynonym() ){ |
|
200 |
return false;
|
|
200 | 201 |
} |
201 |
return false;
|
|
202 |
return true;
|
|
202 | 203 |
} |
203 | 204 |
|
204 | 205 |
public static boolean isSynonym(Object selectedElement) { |
... | ... | |
209 | 210 |
} |
210 | 211 |
|
211 | 212 |
public static boolean isAccepted(Object selectedElement) { |
213 |
|
|
212 | 214 |
return (selectedElement instanceof Taxon && ! ((Taxon) selectedElement).isMisapplication() && ! ((Taxon) selectedElement).isProparteSynonym()) ? true : false; |
215 |
|
|
213 | 216 |
} |
214 | 217 |
|
215 | 218 |
public static boolean isOrphaned(Object selectedElement) { |
... | ... | |
227 | 230 |
* @return |
228 | 231 |
*/ |
229 | 232 |
public static boolean isProParteSynonym(Object selectedElement) { |
230 |
if(selectedElement instanceof Taxon && ((Taxon) selectedElement).isMisapplication()){
|
|
233 |
if(selectedElement instanceof Taxon && ((Taxon) selectedElement).isProparteSynonym()){
|
|
231 | 234 |
return true; |
232 | 235 |
} |
233 | 236 |
return false; |
234 | 237 |
} |
238 |
|
|
239 |
|
|
235 | 240 |
} |
Also available in: Unified diff
merge of NameEditorPropertyTester and fix NPE in ConceptContainer for new Taxonrelationships