Project

General

Profile

Revision 75733adf

ID75733adf08cf3bd3128f84687b8fc20e6b52273e
Parent 783428fc
Child a4854e75

Added by Patrick Plitzner over 5 years ago

#5448 Set species epithet for species groups and aggregates

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportNames.java
339 339
        }
340 340
        name.setGenusOrUninomial(ep1String);
341 341
        if(CdmUtils.isNotBlank(ep2String)){
342
            if(rank!=null && rank.isInfraGeneric()){
342
            if(rank!=null && rank.isInfraGenericButNotSpeciesGroup()){
343 343
                name.setInfraGenericEpithet(ep2String);
344 344
            }
345 345
            else{
......
465 465
    private void checkTaxonNameConsistency(long id, String taxNameString, String hybString, TaxonBase<?> taxonBase) {
466 466
        if(hybString.equals(RedListUtil.HYB_XF)){
467 467
            if(HibernateProxyHelper.deproxy(taxonBase.getName(),NonViralName.class).getHybridChildRelations().isEmpty()){
468
                RedListUtil.logMessage(id, "Hybrid name but no hybrid child relations", logger);
468
                RedListUtil.logMessage(id, "Hybrid name but no hybrid child relations: "+taxonBase.getTitleCache(), logger);
469 469
                return;
470 470
            }
471 471
            return;
......
479 479
        if(taxNameString.endsWith("agg.")){
480 480
            taxNameString = taxNameString.replace("agg.", "aggr.");
481 481
        }
482
        if(taxNameString.endsWith("aggr.")){
483
            taxNameString = taxNameString.replaceFirst(" ", " (");
484
            taxNameString = taxNameString.replace(" aggr.", ") aggr.");
485
        }
486 482

  
487 483
        if(hybString.equals(RedListUtil.HYB_X)){
488 484
            taxNameString = taxNameString.replace(" "+RedListUtil.HYB_SIGN+" ", " "+RedListUtil.HYB_SIGN);//hybrid sign has no space after it in titleCache for binomial hybrids
......
501 497
        if(taxNameString.endsWith("- group")){
502 498
            taxNameString = taxNameString.replaceAll("- group", "species group");
503 499
        }
504
        if(taxNameString.endsWith("species group")){
505
            taxNameString = taxNameString.replaceFirst(" ", " (");
506
            taxNameString = taxNameString.replace(" species group", ") species group");
507
        }
508 500

  
509 501
        taxNameString = taxNameString.replace("[ranglos]", "[unranked]");
510 502
        if(STRICT_TITLE_CHECK){

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)