Project

General

Profile

« Previous | Next » 

Revision d4f17a57

Added by Patrick Plitzner over 7 years ago

#5448 Import hybrid with more than 2 parents with protected titlecache

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportNames.java
397 397
                    annotation.setAnnotationType(AnnotationType.TECHNICAL());
398 398
                    name.addAnnotation(annotation);
399 399
                }
400

  
401
                if(hybString.equals(RedListUtil.HYB_X)){
400
                //more than two hybrids not yet handled by name parser
401
                //TODO: use parser when implemented to fully support hybrids
402
                if(taxNameString.split(RedListUtil.HYB_SIGN).length>2){
403
                    name = BotanicalName.NewInstance(rank);
404
                    name.setTitleCache(taxNameString, true);
405
                }
406
                else if(hybString.equals(RedListUtil.HYB_X)){
402 407
                    name.setBinomHybrid(true);
403 408
                }
404 409
                else if(hybString.equals(RedListUtil.HYB_G)){
......
411 416
                    }
412 417
                    else if(ep2String.contains(RedListUtil.HYB_SIGN)){
413 418
                        String[] split = ep2String.split(RedListUtil.HYB_SIGN);
414
                        if(split.length!=2){
415
                            RedListUtil.logMessage(id, "Multiple hybrid signs found in "+ep2String, logger);
416
                        }
417 419
                        String hybridFormula1 = ep1String+" "+split[0].trim();
418 420
                        String hybridFormula2 = ep1String+" "+split[1].trim();
419 421
                        if(CdmUtils.isNotBlank(ep3String)){
......
425 427
                    }
426 428
                    else if(ep3String.contains(RedListUtil.HYB_SIGN)){
427 429
                        String[] split = ep3String.split(RedListUtil.HYB_SIGN);
428
                        if(split.length!=2){
429
                            RedListUtil.logMessage(id, "Multiple hybrid signs found in "+ep3String, logger);
430
                        }
431 430
                        String hybridFormula1 = ep1String+" "+ep2String+" "+split[0];
432 431
                        String hybridFormula2 = ep1String+" "+ep2String+" "+split[1];
433 432
                        String fullFormula = hybridFormula1+" "+RedListUtil.HYB_SIGN+" "+hybridFormula2;

Also available in: Unified diff