Revision 59d588d3
Added by Andreas Müller over 5 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelTaxonNameImport.java | ||
---|---|---|
338 | 338 |
private void handleNameNotes(BerlinModelImportState state, TaxonName taxonName, ResultSet rs, int nameId) throws SQLException { |
339 | 339 |
String notesOrig = rs.getString("notes"); |
340 | 340 |
String notes = filterNotes(notesOrig, nameId); |
341 |
if (isNotBlank(notes) && taxonName != null ){ |
|
341 |
boolean isParentalSpecies = state.getConfig().isEuroMed() && isPostulatedParentalSpeciesNote(notes); |
|
342 |
if (isNotBlank(notes) && taxonName != null && !isParentalSpecies ){ |
|
342 | 343 |
String notesString = String.valueOf(notes); |
343 | 344 |
if (notesString.length() > 65530 ){ |
344 | 345 |
notesString = notesString.substring(0, 65530) + "..."; |
... | ... | |
356 | 357 |
/** |
357 | 358 |
* @param notes |
358 | 359 |
*/ |
359 |
private String filterNotes(String notes, int nameId) {
|
|
360 |
protected static String filterNotes(String notes, int nameId) {
|
|
360 | 361 |
String result; |
361 | 362 |
if (isBlank(notes)){ |
362 | 363 |
result = null; |
... | ... | |
393 | 394 |
} |
394 | 395 |
|
395 | 396 |
|
397 |
/** |
|
398 |
* @param nameNotes |
|
399 |
* @return |
|
400 |
*/ |
|
401 |
protected static boolean isPostulatedParentalSpeciesNote(String nameNotes) { |
|
402 |
if (nameNotes == null){ |
|
403 |
return false; |
|
404 |
}else{ |
|
405 |
return nameNotes.matches(".*<>.*"); |
|
406 |
} |
|
407 |
} |
|
408 |
|
|
409 |
|
|
396 | 410 |
private Rank handleProlesAndRaceSublusus(BerlinModelImportState state, ResultSet rs, Rank rank) throws SQLException { |
397 | 411 |
Rank result; |
398 | 412 |
String rankAbbrev = rs.getString("RankAbbrev"); |
Also available in: Unified diff
fix #7769 implement postulated parental species as extension