(no commit message)
authorm.geoffroy <m.geoffroy@localhost>
Thu, 26 Jun 2008 14:15:05 +0000 (14:15 +0000)
committerm.geoffroy <m.geoffroy@localhost>
Thu, 26 Jun 2008 14:15:05 +0000 (14:15 +0000)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/BotanicalName.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/NonViralName.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/ZoologicalName.java

index 80229c47d02aa4b4bf1fba4bd3057c5984925988..7ae2d641b4e0af8bd06e0f09ac2dc366c556782a 100644 (file)
@@ -95,8 +95,8 @@ public class BotanicalName extends NonViralName {
                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);
+       public static  BotanicalName NewInstance(Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
+               return new BotanicalName(rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
        }
        
        /**
@@ -150,8 +150,8 @@ public class BotanicalName extends NonViralName {
                super(rank, homotypicalGroup);
                this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
        }
-       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);
+       protected BotanicalName(Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
+               super(rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
                this.cacheStrategy = BotanicNameDefaultCacheStrategy.NewInstance();
        }
 
index 66d91a1e8bd53efd44b6d781eb8e7a767c1a7b42..5eacff7d7d620d5554078f08d7ad878a7b43bdef 100644 (file)
@@ -131,12 +131,12 @@ public class NonViralName<T extends NonViralName> extends TaxonNameBase<NonViral
         * Class constructor: creates a new non viral taxon name instance
         * only containing its {@link common.Rank rank},
         * its {@link common.HomotypicalGroup homotypical group} and
-        * only containing the {@link eu.etaxonomy.cdm.strategy.cache.NonViralNameDefaultCacheStrategy default cache strategy}.
+        * the {@link eu.etaxonomy.cdm.strategy.cache.NonViralNameDefaultCacheStrategy default cache strategy}.
         * 
         * @param       rank  the rank to be assigned to this non viral taxon name
         * @param       homotypicalGroup  the homotypical group to which this non viral taxon name belongs
         * @see         #NonViralName()
-        * @see         #NonViralName(Rank, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
+        * @see         #NonViralName(Rank, String, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
         * @see         #NewInstance(Rank, HomotypicalGroup)
         * @see         eu.etaxonomy.cdm.strategy.cache.INonViralNameCacheStrategy
         * @see         eu.etaxonomy.cdm.strategy.cache.INameCacheStrategy
@@ -158,8 +158,11 @@ public class NonViralName<T extends NonViralName> extends TaxonNameBase<NonViral
         * @param       genusOrUninomial the string for this taxon name
         *                      if its rank is genus or higher or for the genus part
         *                      if its rank is lower than genus
-        * @param       specificEpithet  the string for the first epithet of
+        * @param       infraGenericEpithet  the string for the first epithet of
         *                      this non viral taxon name if its rank is lower than genus
+        *                      and higher than species aggregate
+        * @param       specificEpithet  the string for the first epithet of
+        *                      this non viral taxon name if its rank is species aggregate or lower
         * @param       infraSpecificEpithet  the string for the second epithet of
         *                      this non viral taxon name if its rank is lower than species
         * @param       combinationAuthorTeam  the author or the team who published this non viral taxon name
@@ -169,14 +172,15 @@ public class NonViralName<T extends NonViralName> extends TaxonNameBase<NonViral
         * @see         #NonViralName()
         * @see         #NonViralName(Rank, HomotypicalGroup)
         * @see         #NewInstance(Rank, HomotypicalGroup)
+        * @see         eu.etaxonomy.cdm.strategy.cache.NonViralNameDefaultCacheStrategy
         * @see         eu.etaxonomy.cdm.strategy.cache.INonViralNameCacheStrategy
-        * @see         eu.etaxonomy.cdm.strategy.cache.INameCacheStrategy
         * @see         eu.etaxonomy.cdm.strategy.cache.IIdentifiableEntityCacheStrategy
         */
-       protected NonViralName(Rank rank, String genusOrUninomial, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
+       protected NonViralName(Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
                super(rank, homotypicalGroup);
                setNameCacheStrategy();
                setGenusOrUninomial(genusOrUninomial);
+               setInfraGenericEpithet (infraGenericEpithet);
                setSpecificEpithet(specificEpithet);
                setInfraSpecificEpithet(infraSpecificEpithet);
                setCombinationAuthorTeam(combinationAuthorTeam);
index 7dd1091364c8fb273ea74248853d1620727efa69..45c9eeacc24dd8c228e8e68b85e5b515d3f53533 100644 (file)
@@ -28,10 +28,12 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
 /**
- * Taxon name class for animals
+ * The taxon name class for animals.
+ * 
  * @author m.doering
  * @version 1.0
  * @created 08-Nov-2007 13:07:03
+ * @see NonViralName
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "", propOrder = {
@@ -58,22 +60,148 @@ public class ZoologicalName extends NonViralName {
        static private INonViralNameParser nameParser = new NonViralNameParserImpl();
 
        
+       // ************* CONSTRUCTORS *************/    
+       /** 
+        * Class constructor: creates a new zoological taxon name instance
+        * only containing the {@link eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy default cache strategy}.
+        * 
+        * @see #ZoologicalName(Rank, HomotypicalGroup)
+        * @see #ZoologicalName(Rank, String, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
+        * @see eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy
+        */
+       protected ZoologicalName() {
+               this.cacheStrategy = ZooNameDefaultCacheStrategy.NewInstance();
+       }
+       
+       /** 
+        * Class constructor: creates a new zoological taxon name instance
+        * only containing its {@link common.Rank rank},
+        * its {@link common.HomotypicalGroup homotypical group} and
+        * the {@link eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy default cache strategy}.
+        * 
+        * @param       rank  the rank to be assigned to this non viral taxon name
+        * @param       homotypicalGroup  the homotypical group to which this non viral taxon name belongs
+        * @see         #ZoologicalName()
+        * @see         #ZoologicalName(Rank, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
+        * @see         eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy
+        */
+       protected ZoologicalName(Rank rank, HomotypicalGroup homotypicalGroup) {
+               super(rank, homotypicalGroup);
+               this.cacheStrategy = ZooNameDefaultCacheStrategy.NewInstance();
+       }
+
+       /** 
+        * Class constructor: creates a new zoological taxon name instance
+        * containing its {@link common.Rank rank},
+        * its {@link common.HomotypicalGroup homotypical group},
+        * its scientific name components, its {@link agent.TeamOrPersonBase author(team)},
+        * its {@link reference.INomenclaturalReference nomenclatural reference} and
+        * the {@link eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy default cache strategy}.
+        * 
+        * @param       rank  the rank to be assigned to this zoological taxon name
+        * @param       genusOrUninomial the string for this zoological taxon name
+        *                      if its rank is genus or higher or for the genus part
+        *                      if its rank is lower than genus
+        * @param       infraGenericEpithet  the string for the first epithet of
+        *                      this zoological taxon name if its rank is lower than genus
+        *                      and higher than species aggregate
+        * @param       specificEpithet  the string for the first epithet of
+        *                      this zoological taxon name if its rank is species aggregate or lower
+        * @param       infraSpecificEpithet  the string for the second epithet of
+        *                      this zoological taxon name if its rank is lower than species
+        * @param       combinationAuthorTeam  the author or the team who published this zoological taxon name
+        * @param       nomenclaturalReference  the nomenclatural reference where this zoological taxon name was published
+        * @param       nomenclMicroRef  the string with the details for precise location within the nomenclatural reference
+        * @param       homotypicalGroup  the homotypical group to which this zoological taxon name belongs
+        * @see         #ZoologicalName()
+        * @see         #ZoologicalName(Rank, HomotypicalGroup)
+        * @see         #NewInstance(Rank, String, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
+        * @see         eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy
+        * @see         eu.etaxonomy.cdm.strategy.cache.INonViralNameCacheStrategy
+        * @see         eu.etaxonomy.cdm.strategy.cache.IIdentifiableEntityCacheStrategy
+        */
+       protected ZoologicalName (Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
+               super(rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
+               this.cacheStrategy = ZooNameDefaultCacheStrategy.NewInstance();
+       }
+       
+       
+       //********* METHODS **************************************/
+       
+       /** 
+        * Creates a new zoological taxon name instance
+        * only containing its {@link common.Rank rank} and
+        * the {@link eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy default cache strategy}.
+        * 
+        * @param       rank    the rank to be assigned to this zoological taxon name
+        * @see                         #ZoologicalName(Rank, HomotypicalGroup)
+        * @see                         #NewInstance(Rank, HomotypicalGroup)
+        * @see                         #NewInstance(Rank, String, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
+        * @see                         eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy
+        */
        public static ZoologicalName NewInstance(Rank rank){
                return new ZoologicalName(rank, null);
        }
 
+       /** 
+        * Creates a new zoological taxon name instance
+        * only containing its {@link common.Rank rank} and
+        * its {@link common.HomotypicalGroup homotypical group} and 
+        * the {@link eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy default cache strategy}.
+        * The new zoological taxon name instance will be also added to the set of
+        * zoological taxon names belonging to this homotypical group. If the homotypical 
+        * group does not exist a new instance will be created for it.
+        * 
+        * @param  rank  the rank to be assigned to this zoological taxon name
+        * @param  homotypicalGroup  the homotypical group to which this zoological taxon name belongs
+        * @see    #NewInstance(Rank)
+        * @see    #NewInstance(Rank, String, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
+        * @see    #ZoologicalName(Rank, HomotypicalGroup)
+        * @see    eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy
+        */
        public static ZoologicalName NewInstance(Rank rank, HomotypicalGroup homotypicalGroup){
                return new ZoologicalName(rank, homotypicalGroup);
        }
-       public static ZoologicalName NewInstance(Rank rank, String genusOrUninomial, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
-               return new ZoologicalName(rank, genusOrUninomial, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
+       /** 
+        * Creates a new zoological taxon name instance
+        * containing its {@link common.Rank rank},
+        * its {@link common.HomotypicalGroup homotypical group},
+        * its scientific name components, its {@link agent.TeamOrPersonBase author(team)},
+        * its {@link reference.INomenclaturalReference nomenclatural reference} and
+        * the {@link eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy default cache strategy}.
+        * 
+        * @param       rank  the rank to be assigned to this zoological taxon name
+        * @param       genusOrUninomial the string for this zoological taxon name
+        *                      if its rank is genus or higher or for the genus part
+        *                      if its rank is lower than genus
+        * @param       infraGenericEpithet  the string for the first epithet of
+        *                      this zoological taxon name if its rank is lower than genus
+        *                      and higher than species aggregate
+        * @param       specificEpithet  the string for the first epithet of
+        *                      this zoological taxon name if its rank is species aggregate or lower
+        * @param       infraSpecificEpithet  the string for the second epithet of
+        *                      this zoological taxon name if its rank is lower than species
+        * @param       combinationAuthorTeam  the author or the team who published this zoological taxon name
+        * @param       nomenclaturalReference  the nomenclatural reference where this zoological taxon name was published
+        * @param       nomenclMicroRef  the string with the details for precise location within the nomenclatural reference
+        * @param       homotypicalGroup  the homotypical group to which this zoological taxon name belongs
+        * @see         #NewInstance(Rank)
+        * @see         #NewInstance(Rank, HomotypicalGroup)
+        * @see         #ZoologicalName(Rank, String, String, String, String, TeamOrPersonBase, INomenclaturalReference, String, HomotypicalGroup)
+        * @see         eu.etaxonomy.cdm.strategy.cache.ZooNameDefaultCacheStrategy
+        */
+       public static ZoologicalName NewInstance(Rank rank, String genusOrUninomial, String infraGenericEpithet, String specificEpithet, String infraSpecificEpithet, TeamOrPersonBase combinationAuthorTeam, INomenclaturalReference nomenclaturalReference, String nomenclMicroRef, HomotypicalGroup homotypicalGroup) {
+               return new ZoologicalName(rank, genusOrUninomial, infraGenericEpithet, specificEpithet, infraSpecificEpithet, combinationAuthorTeam, nomenclaturalReference, nomenclMicroRef, homotypicalGroup);
        }       
        
        
        /**
-        * Returns a parsed Name
-        * @param fullName
-        * @return
+        * Returns a zoological taxon name based on parsing a string composed of
+        * just one word (uninomial) and supposing that it is compliant to the ICZN.
+        * 
+        * @param       fullNameString  string representing the scientific name of a
+        *                                                      uninomial zoological taxon name 
+        * @return                                      the new zoological taxon name
         */
        public static ZoologicalName PARSED_NAME(String fullNameString){
                return PARSED_NAME(fullNameString, Rank.GENUS());
@@ -91,21 +219,6 @@ public class ZoologicalName extends NonViralName {
                return (ZoologicalName)nameParser.parseFullName(fullNameString, NomenclaturalCode.ICZN(), rank);
        }
        
-       protected ZoologicalName() {
-               this.cacheStrategy = ZooNameDefaultCacheStrategy.NewInstance();
-       }
-       
-       protected ZoologicalName(Rank rank, HomotypicalGroup homotypicalGroup) {
-               super(rank, homotypicalGroup);
-               this.cacheStrategy = ZooNameDefaultCacheStrategy.NewInstance();
-       }
-
-       protected ZoologicalName (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 = ZooNameDefaultCacheStrategy.NewInstance();
-       }
-       
-       
        @Transient
        @Override
        public NomenclaturalCode getNomeclaturalCode(){