serial Version ID for HomGroup
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / name / BotanicalName.java
index 2c628b2ee30b1150a9297e91371b334ad7d3728a..56958f2c3198b6116a13de18dc809a54aec19b32 100644 (file)
@@ -227,7 +227,7 @@ public class BotanicalName extends NonViralName<BotanicalName> implements Clonea
                if (nameParser == null){
                        nameParser = new NonViralNameParserImpl();
                }
-               return (BotanicalName)nameParser.parseFullName(fullNameString, NomenclaturalCode.ICBN,  rank);
+               return (BotanicalName)nameParser.parseFullName(fullNameString, NomenclaturalCode.ICNAFP,  rank);
        }
        
        /**
@@ -261,7 +261,7 @@ public class BotanicalName extends NonViralName<BotanicalName> implements Clonea
                if (nameParser == null){
                        nameParser = new NonViralNameParserImpl();
                }
-               return (BotanicalName)nameParser.parseReferencedName(fullNameAndReferenceString, NomenclaturalCode.ICBN, rank);
+               return (BotanicalName)nameParser.parseReferencedName(fullNameAndReferenceString, NomenclaturalCode.ICNAFP, rank);
        }
 
 //***********************      
@@ -310,7 +310,7 @@ public class BotanicalName extends NonViralName<BotanicalName> implements Clonea
         */
        @Override
        public NomenclaturalCode getNomenclaturalCode(){
-               return NomenclaturalCode.ICBN;
+               return NomenclaturalCode.ICNAFP;
        }
 
        
@@ -318,6 +318,7 @@ public class BotanicalName extends NonViralName<BotanicalName> implements Clonea
         * Checks if this name is an autonym.<BR>
         * An autonym is a taxon name that has equal specific and infra specific epithets.<BR>
         * {@link http://ibot.sav.sk/icbn/frameset/0010Ch2Sec1a006.htm#6.8. Vienna Code ยง6.8}
+        * or a taxon name that has equal generic and infrageneric epithets (A22.2)
         * @return true, if name has Rank, Rank is below species and species epithet equals infraSpeciesEpithtet, else false
         */
        @Override
@@ -325,6 +326,9 @@ public class BotanicalName extends NonViralName<BotanicalName> implements Clonea
                if (this.getRank() != null && this.getSpecificEpithet() != null && this.getInfraSpecificEpithet() != null && 
                                this.getRank().isInfraSpecific() && this.getSpecificEpithet().trim().equals(this.getInfraSpecificEpithet().trim())){
                        return true;
+               }else if (this.getRank() != null && this.getGenusOrUninomial() != null && this.getInfraGenericEpithet() != null && 
+                               this.getRank().isInfraGeneric() && this.getGenusOrUninomial().trim().equals(this.getInfraGenericEpithet().trim())){
+                       return true;
                }else{
                        return false;
                }