import org.hibernate.annotations.CascadeType;
import eu.etaxonomy.cdm.model.agent.Agent;
-import eu.etaxonomy.cdm.model.agent.INomenclaturalAgent;
+import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;
+import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
-import eu.etaxonomy.cdm.strategy.BotanicNameDefaultCacheStrategy;
-import eu.etaxonomy.cdm.strategy.TaxonNameParserBotanicalNameImpl;
+import eu.etaxonomy.cdm.strategy.cache.BotanicNameDefaultCacheStrategy;
+import eu.etaxonomy.cdm.strategy.parser.TaxonNameParserBotanicalNameImpl;
import java.util.*;
* @return
*/
public static BotanicalName NewInstance(Rank rank){
- return new BotanicalName(rank);
+ return new BotanicalName(rank, null);
+ }
+
+
+ /**
+ * @param rank
+ * @param homotypicalGroup
+ * @return
+ */
+ public static BotanicalName NewInstance(Rank rank, HomotypicalGroup homotypicalGroup){
+ return new BotanicalName(rank, homotypicalGroup);
+ }
+
+ public static BotanicalName NewInstance(Rank rank, String genusOrUninomial, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
+ return new BotanicalName(rank, genusOrUninomial, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
+ }
+
+ /**
+ * Returns a parsed Name
+ * @param fullName
+ * @return
+ */
+ public static BotanicalName PARSED_NAME(String fullNameString){
+ return PARSED_NAME(fullNameString, Rank.GENUS());
+ }
+
+ /**
+ * Returns a parsed Name
+ * @param fullName
+ * @return
+ */
+ public static BotanicalName PARSED_NAME(String fullNameString, Rank rank){
+ if (nameParser == null){
+ nameParser = new TaxonNameParserBotanicalNameImpl();
+ }
+ return (BotanicalName)nameParser.parseFullName(fullNameString, rank);
}
/**
* @param fullName
* @return
*/
- public static BotanicalName PARSED_NAME(String fullName){
- return PARSED_NAME(fullName, Rank.GENUS());
+ public static BotanicalName PARSED_REFERENCE(String fullNameAndReferenceString){
+ return PARSED_REFERENCE(fullNameAndReferenceString, Rank.GENUS());
}
/**
* @param fullName
* @return
*/
- public static BotanicalName PARSED_NAME(String fullName, Rank rank){
+ public static BotanicalName PARSED_REFERENCE(String fullNameAndReferenceString, Rank rank){
if (nameParser == null){
nameParser = new TaxonNameParserBotanicalNameImpl();
}
- return (BotanicalName)nameParser.parseFullName(fullName, rank);
+ return (BotanicalName)nameParser.parseFullReference(fullNameAndReferenceString, rank);
}
//needed by hibernate
super();
this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
}
- public BotanicalName(Rank rank) {
- super(rank);
+ protected BotanicalName(Rank rank, HomotypicalGroup homotypicalGroup) {
+ super(rank, homotypicalGroup);
this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
}
- public BotanicalName(Rank rank, String genusOrUninomial, String specificEpithet, String infraSpecificEpithet, INomenclaturalAgent combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef) {
- super(rank, genusOrUninomial, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef);
+ protected BotanicalName(Rank rank, String genusOrUninomial, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
+ super(rank, genusOrUninomial, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
}