Revision 01f54c65
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupedContainerE4.java | ||
---|---|---|
393 | 393 |
|
394 | 394 |
boolean isParsable = true; |
395 | 395 |
isParsable &= StringUtils.isBlank(name.getAppendedPhrase()); // taxonFieldsEmpty(); |
396 |
|
|
397 |
isParsable &= !name.isProtectedAuthorshipCache(); |
|
398 |
isParsable &= !name.isProtectedNameCache(); |
|
396 |
if (name.isProtectedAuthorshipCache()){ |
|
397 |
isParsable &= nameAuthorsSet(name); |
|
398 |
} |
|
399 |
if (name.isProtectedNameCache()){ |
|
400 |
isParsable &= nameEpithetsNotSet(name) && nameAuthorsSet(name); |
|
401 |
} |
|
399 | 402 |
|
400 | 403 |
return isParsable; |
401 | 404 |
} |
402 | 405 |
|
403 | 406 |
/** |
407 |
* @param name |
|
408 |
* @return |
|
409 |
*/ |
|
410 |
private boolean nameAuthorsSet(TaxonName name) { |
|
411 |
boolean result = true; |
|
412 |
result &= name.getBasionymAuthorship() == null && name.getCombinationAuthorship() == null && name.getExBasionymAuthorship() == null && name.getExCombinationAuthorship() == null; |
|
413 |
return result; |
|
414 |
} |
|
415 |
|
|
416 |
/** |
|
417 |
* @param name |
|
418 |
* @return |
|
419 |
*/ |
|
420 |
private boolean nameEpithetsNotSet(TaxonName name) { |
|
421 |
boolean result = true; |
|
422 |
result &= name.getGenusOrUninomial() == null && name.getInfraGenericEpithet() == null && name.getSpecificEpithet() == null && name.getInfraSpecificEpithet() == null; |
|
423 |
|
|
424 |
return result; |
|
425 |
} |
|
426 |
|
|
427 |
/** |
|
404 | 428 |
* Parse the text and calculate errors |
405 | 429 |
*/ |
406 | 430 |
public void parseAndCalculateAnnotations() { |
Also available in: Unified diff
taxa and synonym are only grayed in name editor if data could be lost by editing in freetext editor