Revision 9e2583cf
Added by Patrick Plitzner over 7 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportNames.java | ||
---|---|---|
498 | 498 |
private void checkTaxonConsistency(long id, String taxNameString, String hybString, TaxonBase<?> taxonBase) { |
499 | 499 |
String nameCache = HibernateProxyHelper.deproxy(taxonBase.getName(), NonViralName.class).getNameCache().trim(); |
500 | 500 |
taxNameString = taxNameString.trim(); |
501 |
taxNameString.replaceAll(" +", " "); |
|
501 |
taxNameString = taxNameString.replaceAll(" +", " ");
|
|
502 | 502 |
|
503 | 503 |
if(taxNameString.endsWith("agg.")){ |
504 | 504 |
taxNameString = taxNameString.replace("agg.", "aggr."); |
505 | 505 |
} |
506 | 506 |
|
507 |
if(hybString.equals(RedListUtil.HYB_X)){ |
|
507 |
if(hybString.equals(RedListUtil.HYB_X) || hybString.equals(RedListUtil.HYB_N)){
|
|
508 | 508 |
taxNameString = taxNameString.replace(" "+RedListUtil.HYB_SIGN+" ", " "+RedListUtil.HYB_SIGN);//hybrid sign has no space after it in titleCache for binomial hybrids |
509 | 509 |
taxNameString = taxNameString.replace(" x ", " "+RedListUtil.HYB_SIGN);//in some cases a standard 'x' is used |
510 | 510 |
} |
... | ... | |
523 | 523 |
} |
524 | 524 |
|
525 | 525 |
taxNameString = taxNameString.replace("[ranglos]", "[unranked]"); |
526 |
if(taxonBase.getName().getRank()!=null && taxonBase.getName().getRank().equals(Rank.PROLES())){ |
|
527 |
taxNameString = taxNameString.replace("proles", "prol."); |
|
528 |
} |
|
526 | 529 |
if(STRICT_TITLE_CHECK){ |
527 | 530 |
if(!taxNameString.trim().equals(nameCache)){ |
528 | 531 |
RedListUtil.logMessage(id, "Taxon name inconsistent! taxon.nameCache <-> Column "+RedListUtil.TAXNAME+": "+nameCache+" <-> "+taxNameString, logger); |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenTransformer.java | ||
---|---|---|
57 | 57 |
@Override |
58 | 58 |
public NomenclaturalStatusType getNomenclaturalStatusByKey(String key) throws UndefinedTransformerMethodException { |
59 | 59 |
if (key == null){return null;} |
60 |
key = key.trim(); |
|
60 | 61 |
if (key.equals("nom. cons.")){return NomenclaturalStatusType.CONSERVED();} |
61 | 62 |
else if (key.equals("nom. illeg.")){return NomenclaturalStatusType.ILLEGITIMATE();} |
62 | 63 |
else if (key.equals("nom. inval.")){return NomenclaturalStatusType.INVALID();} |
Also available in: Unified diff
#5448 Enhance taxon name check