Revision 539b7820
Added by Andreas Müller over 5 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/cyprus/CyprusAltitudeActivator.java | ||
---|---|---|
12 | 12 |
import java.io.FileNotFoundException; |
13 | 13 |
import java.net.URI; |
14 | 14 |
import java.net.URISyntaxException; |
15 |
import java.util.HashMap; |
|
16 | 15 |
import java.util.HashSet; |
17 | 16 |
import java.util.List; |
17 |
import java.util.Map; |
|
18 | 18 |
import java.util.Set; |
19 | 19 |
import java.util.UUID; |
20 | 20 |
|
... | ... | |
79 | 79 |
|
80 | 80 |
private void doImport(ICdmDataSource cdmDestination){ |
81 | 81 |
|
82 |
List<HashMap<String, String>> excel;
|
|
82 |
List<Map<String, String>> excel; |
|
83 | 83 |
try { |
84 | 84 |
excel = ExcelUtils.parseXLS(source, "coreTax"); |
85 | 85 |
} catch (FileNotFoundException e) { |
... | ... | |
107 | 107 |
MeasurementUnit meter = (MeasurementUnit)app.getTermService().find(UUID.fromString("8bef5055-789c-41e5-bea2-8dc2ea8ecdf6")); |
108 | 108 |
|
109 | 109 |
int count =1; |
110 |
for (HashMap<String, String> row : excel){
|
|
110 |
for (Map<String, String> row : excel){ |
|
111 | 111 |
count++; |
112 | 112 |
UUID baseUuid = makeUuid(row, "uuid"); |
113 | 113 |
UUID acceptedUuid = makeUuid(row, "acceptedNameUuid"); |
... | ... | |
256 | 256 |
* @param row |
257 | 257 |
* @return |
258 | 258 |
*/ |
259 |
private UUID makeUuid(HashMap<String, String> row, String colName) {
|
|
259 |
private UUID makeUuid(Map<String, String> row, String colName) { |
|
260 | 260 |
if (StringUtils.isBlank(row.get(colName))){ |
261 | 261 |
return null; |
262 | 262 |
}else{ |
Also available in: Unified diff
cleanup