@Configurable
public class BotanicalName extends NonViralName<BotanicalName> implements Cloneable /*, IMergable*/ {
private static final long serialVersionUID = 6818651572463497727L;
+ @SuppressWarnings("unused")
private static final Logger logger = Logger.getLogger(BotanicalName.class);
//Only for fungi: to indicate that the type of the name is asexual or not
@XmlElement(name ="IsAnamorphic")
private boolean anamorphic;
- static private INonViralNameParser nameParser = new NonViralNameParserImpl();
+ static private INonViralNameParser<?> nameParser = new NonViralNameParserImpl();
// ************* CONSTRUCTORS *************/
//needed by hibernate
if (nameParser == null){
nameParser = new NonViralNameParserImpl();
}
- return (BotanicalName)nameParser.parseFullName(fullNameString, NomenclaturalCode.ICBN, rank);
+ return (BotanicalName)nameParser.parseFullName(fullNameString, NomenclaturalCode.ICNAFP, rank);
}
/**
if (nameParser == null){
nameParser = new NonViralNameParserImpl();
}
- return (BotanicalName)nameParser.parseReferencedName(fullNameAndReferenceString, NomenclaturalCode.ICBN, rank);
+ return (BotanicalName)nameParser.parseReferencedName(fullNameAndReferenceString, NomenclaturalCode.ICNAFP, rank);
}
//***********************
*/
@Override
public NomenclaturalCode getNomenclaturalCode(){
- return NomenclaturalCode.ICBN;
+ return NomenclaturalCode.ICNAFP;
}
* 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
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;
}