#5448 Fix hybrid import where specific epithets are not from same genus
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 26 Jul 2016 07:09:28 +0000 (09:09 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 26 Jul 2016 07:09:28 +0000 (09:09 +0200)
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportNames.java

index ce980d141c24d921b80b9414d20bb41160cf1ad2..30a7eeec8b67dd3c3c813271cc8e800d500add6d 100644 (file)
@@ -418,6 +418,10 @@ public class RedListGefaesspflanzenImportNames extends DbImportBase<RedListGefae
                         String[] split = ep2String.split(RedListUtil.HYB_SIGN);
                         String hybridFormula1 = ep1String+" "+split[0].trim();
                         String hybridFormula2 = ep1String+" "+split[1].trim();
+                        //check if the specific epithets are from the same genus or not like e.g. EPI2 = pratensis × Lolium multiflorum
+                        if(split[1].split(" ").length>1){
+                            hybridFormula2 = split[1];
+                        }
                         if(CdmUtils.isNotBlank(ep3String)){
                             hybridFormula1 += " "+ep3String;
                             hybridFormula2 += " "+ep3String;