Revision c59ecc4a
Added by Andreas Müller almost 13 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/wp6/CommonNameExcelImport.java | ||
---|---|---|
72 | 72 |
|
73 | 73 |
|
74 | 74 |
@Override |
75 |
protected boolean analyzeRecord(HashMap<String, String> record, CichorieaeCommonNameImportState state) { |
|
76 |
|
|
77 |
boolean success = true; |
|
78 |
Set<String> keys = record.keySet(); |
|
75 |
protected void analyzeRecord(HashMap<String, String> record, CichorieaeCommonNameImportState state) { |
|
76 |
Set<String> keys = record.keySet(); |
|
79 | 77 |
|
80 | 78 |
CommonNameRow row = new CommonNameRow(); |
81 | 79 |
state.setCommonNameRow(row); |
... | ... | |
118 | 116 |
} else if(key.equalsIgnoreCase(AREA_COLUMN)) { |
119 | 117 |
row.setArea(value); |
120 | 118 |
} else { |
121 |
success = false;
|
|
119 |
state.setUnsuccessfull();
|
|
122 | 120 |
logger.error("Unexpected column header " + key); |
123 | 121 |
} |
124 | 122 |
} |
125 |
return success;
|
|
123 |
return; |
|
126 | 124 |
} |
127 | 125 |
|
128 | 126 |
|
... | ... | |
130 | 128 |
* Stores taxa records in DB |
131 | 129 |
*/ |
132 | 130 |
@Override |
133 |
protected boolean firstPass(CichorieaeCommonNameImportState state) {
|
|
131 |
protected void firstPass(CichorieaeCommonNameImportState state) {
|
|
134 | 132 |
|
135 |
boolean success = true; |
|
136 | 133 |
CommonNameRow taxonLight = state.getCommonNameRow(); |
137 |
|
|
138 | 134 |
//species name |
139 | 135 |
String speciesStr = taxonLight.getSpecies(); |
140 | 136 |
TaxonDescription taxonDesc = getTaxon(state, speciesStr); |
... | ... | |
148 | 144 |
// TaxonNameBase nameUsedInSource = getNameUsedInSource(state, taxonLight.getNameUsedInSource()); |
149 | 145 |
|
150 | 146 |
getTaxonService().save(taxonDesc.getTaxon()); |
151 |
return success;
|
|
147 |
return; |
|
152 | 148 |
} |
153 | 149 |
|
154 | 150 |
|
... | ... | |
324 | 320 |
* Stores parent-child, synonym and common name relationships |
325 | 321 |
*/ |
326 | 322 |
@Override |
327 |
protected boolean secondPass(CichorieaeCommonNameImportState state) {
|
|
328 |
boolean success = true;
|
|
329 |
return success;
|
|
323 |
protected void secondPass(CichorieaeCommonNameImportState state) {
|
|
324 |
//no second pass
|
|
325 |
return; |
|
330 | 326 |
} |
331 | 327 |
|
332 | 328 |
|
Also available in: Unified diff
last updates for Taxon Excel Import and moving all success variables to state