Revision e7419058
Added by Andreas Müller about 10 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/excel/common/ExcelTaxonOrSpecimenImportBase.java | ||
---|---|---|
171 | 171 |
keyValue.index = 0; |
172 | 172 |
} |
173 | 173 |
//source |
174 |
if (split.length > current){ |
|
174 |
if (split.length > current && ! isIgnore(keyValue.key)){
|
|
175 | 175 |
//refType |
176 | 176 |
if (isRefType(split[current])){ |
177 | 177 |
String refTypeStr = split[current++]; |
... | ... | |
204 | 204 |
} |
205 | 205 |
|
206 | 206 |
} |
207 |
if (split.length > current){ |
|
207 |
if (split.length > current && ! isIgnore(keyValue.key)){
|
|
208 | 208 |
String message = "Key has unexpected part at position %d of key. %s (and following parts) can not be handled"; |
209 | 209 |
message = String.format(message, current, split[current]); |
210 | 210 |
fireWarningEvent(message, state, 10); |
... | ... | |
225 | 225 |
} |
226 | 226 |
|
227 | 227 |
|
228 |
private boolean isIgnore(String key) { |
|
229 |
return key.matches(IGNORE_COLUMN); |
|
230 |
} |
|
231 |
|
|
228 | 232 |
private boolean isRefType(String string) { |
229 | 233 |
return SourceType.isKeyName(string); |
230 | 234 |
} |
... | ... | |
243 | 247 |
String key = keyValue.key; |
244 | 248 |
if (key.matches(CDM_UUID_COLUMN)){ |
245 | 249 |
return true; |
246 |
} else if(keyValue.key.matches(IGNORE_COLUMN)) {
|
|
250 |
} else if(isIgnore(keyValue.key)) {
|
|
247 | 251 |
logger.debug("Ignored column" + keyValue.originalKey); |
248 | 252 |
return true; |
249 | 253 |
} |
Also available in: Unified diff
handle ignore better