Revision deda7038
Added by Andreas Müller over 6 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/identifier/IdentifierImport.java | ||
---|---|---|
121 | 121 |
uuid = UUID.fromString(uuidStr); |
122 | 122 |
} catch (Exception e) { |
123 | 123 |
String message = String.format( |
124 |
"Entity identifier not recognized as UUID in line %d. Skipped", i);
|
|
124 |
"Entity identifier not recognized as UUID in line %d. Skipped. Value was: %s", i, uuidStr);
|
|
125 | 125 |
logger.warn(message); |
126 | 126 |
return null; |
127 | 127 |
} |
... | ... | |
138 | 138 |
//identifier value |
139 | 139 |
if (strs.length < 2){ |
140 | 140 |
String message = String.format( |
141 |
"Record in line %d has no identifier value information. Skipped", i); |
|
141 |
"Record in line %d has no identifier value information. Skipped.", i);
|
|
142 | 142 |
logger.warn(message); |
143 |
this.commitTransaction(tx); |
|
143 | 144 |
return null; |
144 | 145 |
} |
145 |
//skip column 1, it is for default language label, but not used during import |
|
146 | 146 |
String value = null; |
147 | 147 |
if (isNotBlank(strs[1])){ |
148 | 148 |
value = strs[1]; |
149 |
}else if (config.isIgnoreEmptyIdentifier()){ |
|
150 |
String message = String.format( |
|
151 |
"Record in line %d has empty identifier value information. Skipped.", i); |
|
152 |
logger.debug(message); |
|
153 |
this.commitTransaction(tx); |
|
154 |
return null; |
|
149 | 155 |
} |
150 | 156 |
|
151 | 157 |
Identifier<?> identifier = Identifier.NewInstance(value, idType); |
Also available in: Unified diff
minor fixes to IdentifierImport