\r
\r
@Override\r
- protected boolean analyzeRecord(HashMap<String, String> record, CichorieaeCommonNameImportState state) {\r
- \r
- boolean success = true;\r
- Set<String> keys = record.keySet();\r
+ protected void analyzeRecord(HashMap<String, String> record, CichorieaeCommonNameImportState state) {\r
+ Set<String> keys = record.keySet();\r
\r
CommonNameRow row = new CommonNameRow();\r
state.setCommonNameRow(row);\r
} else if(key.equalsIgnoreCase(AREA_COLUMN)) {\r
row.setArea(value);\r
} else {\r
- success = false;\r
+ state.setUnsuccessfull();\r
logger.error("Unexpected column header " + key);\r
}\r
}\r
- return success;\r
+ return;\r
}\r
\r
\r
* Stores taxa records in DB\r
*/\r
@Override\r
- protected boolean firstPass(CichorieaeCommonNameImportState state) {\r
+ protected void firstPass(CichorieaeCommonNameImportState state) {\r
\r
- boolean success = true;\r
CommonNameRow taxonLight = state.getCommonNameRow();\r
-\r
//species name\r
String speciesStr = taxonLight.getSpecies();\r
TaxonDescription taxonDesc = getTaxon(state, speciesStr);\r
// TaxonNameBase nameUsedInSource = getNameUsedInSource(state, taxonLight.getNameUsedInSource());\r
\r
getTaxonService().save(taxonDesc.getTaxon());\r
- return success;\r
+ return;\r
}\r
\r
\r
}else if (result.getId() == 0){\r
// UUID uuidLanguageVoc = UUID.fromString("45ac7043-7f5e-4f37-92f2-3874aaaef2de"); \r
UUID uuidLanguageVoc = UUID.fromString("434cea89-9052-4567-b2db-ff77f42e9084"); \r
- TermVocabulary<Language> voc = getVocabulary(uuidLanguageVoc, "User Defined Languages", "User Defined Languages", null);\r
+ TermVocabulary<Language> voc = getVocabulary(uuidLanguageVoc, "User Defined Languages", "User Defined Languages", null, null, false, result);\r
// TermVocabulary<Language> voc = getVocabularyService().find(uuidLanguageVoc);\r
voc.addTerm(result);\r
getTermService().saveOrUpdate(result);\r
* Stores parent-child, synonym and common name relationships\r
*/\r
@Override\r
- protected boolean secondPass(CichorieaeCommonNameImportState state) {\r
- boolean success = true;\r
- return success;\r
+ protected void secondPass(CichorieaeCommonNameImportState state) {\r
+ //no second pass\r
+ return;\r
}\r
\r
\r