Revision 815a9015
Added by Katja Luther about 6 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/excel/taxa/NormalExplicitImport.java | ||
---|---|---|
97 | 97 |
@Override |
98 | 98 |
protected void analyzeSingleValue(KeyValue keyValue, TaxonExcelImportState state) { |
99 | 99 |
|
100 |
NormalExplicitRow normalExplicitRow = state.getCurrentRow(); |
|
100 |
NormalExplicitRow normalExplicitRow = (NormalExplicitRow)state.getCurrentRow();
|
|
101 | 101 |
String key = keyValue.key; |
102 | 102 |
String value = keyValue.value; |
103 | 103 |
Integer index = keyValue.index; |
... | ... | |
244 | 244 |
// } |
245 | 245 |
// System.out.println("FP:" + state.getCurrentLine()); |
246 | 246 |
Rank rank = null; |
247 |
NormalExplicitRow taxonDataHolder = state.getCurrentRow(); |
|
247 |
NormalExplicitRow taxonDataHolder = (NormalExplicitRow)state.getCurrentRow();
|
|
248 | 248 |
|
249 | 249 |
String rankStr = taxonDataHolder.getRank(); |
250 | 250 |
String taxonNameStr = taxonDataHolder.getScientificName(); |
... | ... | |
399 | 399 |
protected void secondPass(TaxonExcelImportState state) { |
400 | 400 |
if (logger.isDebugEnabled()){logger.debug(state.getCurrentLine());} |
401 | 401 |
try { |
402 |
NormalExplicitRow taxonDataHolder = state.getCurrentRow(); |
|
402 |
NormalExplicitRow taxonDataHolder = (NormalExplicitRow)state.getCurrentRow();
|
|
403 | 403 |
String taxonNameStr = taxonDataHolder.getScientificName(); |
404 | 404 |
String nameStatus = taxonDataHolder.getNameStatus(); |
405 | 405 |
String commonNameStr = taxonDataHolder.getCommonName(); |
... | ... | |
732 | 732 |
*/ |
733 | 733 |
private void handleCommonName(TaxonExcelImportState state, |
734 | 734 |
String taxonNameStr, String commonNameStr, Taxon acceptedTaxon) { |
735 |
Language language = getTermService().getLanguageByIso(state.getCurrentRow().getLanguage());
|
|
736 |
if (language == null && CdmUtils.isNotEmpty(state.getCurrentRow().getLanguage()) ){
|
|
735 |
Language language = getTermService().getLanguageByIso(((NormalExplicitRow)state.getCurrentRow()).getLanguage());
|
|
736 |
if (language == null && CdmUtils.isNotEmpty(((NormalExplicitRow)state.getCurrentRow()).getLanguage()) ){
|
|
737 | 737 |
String error ="Language is null but shouldn't"; |
738 | 738 |
logger.error(error); |
739 | 739 |
throw new IllegalArgumentException(error); |
... | ... | |
874 | 874 |
} |
875 | 875 |
} |
876 | 876 |
if (StringUtils.isNotBlank(reference)) { |
877 |
String pub = CdmUtils.concat(" ", reference, state.getCurrentRow().getCollation());
|
|
877 |
String pub = CdmUtils.concat(" ", reference, ((NormalExplicitRow)state.getCurrentRow()).getCollation());
|
|
878 | 878 |
String[] split = pub.split(":"); |
879 | 879 |
pub = split[0]; |
880 | 880 |
|
Also available in: Unified diff
adapted deleteResult