(no commit message)
authorm.geoffroy <m.geoffroy@localhost>
Thu, 3 Jul 2008 12:15:15 +0000 (12:15 +0000)
committerm.geoffroy <m.geoffroy@localhost>
Thu, 3 Jul 2008 12:15:15 +0000 (12:15 +0000)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/HomotypicalGroup.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/TaxonNameBase.java

index 73aaa3d5396157385fa0df552654e90ebd3313e9..62c690d3ec166997936ae719813c80c2f2faad27 100644 (file)
@@ -34,6 +34,7 @@ import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
 import eu.etaxonomy.cdm.model.occurrence.Specimen;
 import eu.etaxonomy.cdm.model.reference.ReferenceBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonComparator;
 import eu.etaxonomy.cdm.strategy.cache.name.INameCacheStrategy;
 
@@ -101,23 +102,44 @@ public class HomotypicalGroup extends AnnotatableEntity {
        public Set<TaxonNameBase> getTypifiedNames() {
                return typifiedNames;
        }
+       /** 
+        * @see #getTypifiedNames()
+        */
        protected void setTypifiedNames(Set<TaxonNameBase> typifiedNames) {
                this.typifiedNames = typifiedNames;
        }
+       /** 
+        * Adds a new {@link TaxonNameBase taxon name}
+        * to the set of taxon names that belong to this homotypical group.
+        *
+        * @param  typifiedName  the taxon name to be added to this group
+        * @see                                  #getTypifiedNames()
+        * @see                                  #removeTypifiedName(TaxonNameBase)
+        */
        public void addTypifiedName(TaxonNameBase typifiedName) {
                if (typifiedName != null){
                        typifiedName.setHomotypicalGroup(this);
                        typifiedNames.add(typifiedName);
                }
        }
+       /** 
+        * Removes one element from the set of {@link TaxonNameBase taxon names}
+        * that belong to this homotypical group.
+        *
+        * @param  taxonBase    the taxon name which should be removed from the corresponding set
+        * @see                                 #addTypifiedName(TaxonNameBase)
+        */
        public void removeTypifiedName(TaxonNameBase typifiedName) {
                typifiedName.setHomotypicalGroup(null);
                typifiedNames.remove(typifiedName);     
        }
 
        /**
-        * Merges the typified Names of the homotypicalGroupToMerge into this homotypical group 
-        * @param homotypicalGroupToMerge
+        * Merges the typified {@link TaxonNameBase taxon names} from one homotypical group into
+        * the set of typified taxon names of this homotypical group.
+        *  
+        * @param       homotypicalGroupToMerge the homotypical group the typified names of which
+        *                                                                      are to be transferred to this homotypical group
         */
        public void merge(HomotypicalGroup homotypicalGroupToMerge){
                if (homotypicalGroupToMerge != null){
@@ -130,14 +152,36 @@ public class HomotypicalGroup extends AnnotatableEntity {
        }
        
        
+       /** 
+        * Returns the set of {@link SpecimenTypeDesignation specimen type designations} that
+        * typify this homotypical group including the status of these designations.
+        *
+        * @see #getTypifiedNames()
+        */
        @OneToMany
        @Cascade({CascadeType.SAVE_UPDATE})
        public Set<SpecimenTypeDesignation> getTypeDesignations() {
                return typeDesignations;
        }
+       /** 
+        * @see #getTypeDesignations()
+        */
        protected void setTypeDesignations(Set<SpecimenTypeDesignation> typeDesignations) {
                this.typeDesignations = typeDesignations;
        }       
+       /** 
+        * Adds a new {@link SpecimenTypeDesignation specimen type designation} to the set
+        * of specimen type designations assigned to this homotypical group and eventually
+        * (with a boolean parameter) also to the corresponding set of each of the
+        * taxon names belonging to this homotypical group.
+        *
+        * @param  typeDesignation      the specimen type designation to be added
+        * @param  addToAllNames        the boolean flag indicating whether the addition will also
+        *                                                      carried out for each taxon name
+        * 
+        * @see                                         TaxonNameBase#getSpecimenTypeDesignations()
+        * @see                                         SpecimenTypeDesignation
+        */
        public void addTypeDesignation(SpecimenTypeDesignation typeDesignation, boolean addToAllNames) {
                if (typeDesignation != null){
                        typeDesignation.setHomotypicalGroup(this);
index 86cdfd524062e31377c1f9ea6527c93faeb09001..88fd440c88428c4262d99d7b8126e0677e583366 100644 (file)
@@ -644,16 +644,17 @@ public abstract class TaxonNameBase<T extends TaxonNameBase, S extends INameCach
                this.nameTypeDesignations.remove(typeDesignation);
        }
        
-       /**
-        * @return the specimenTypeDesignations
+       /** 
+        * Returns the set of {@link SpecimenTypeDesignation specimen type designations}
+        * that typify this taxon name.
         */
        @ManyToMany
        @Cascade(CascadeType.SAVE_UPDATE)
        public Set<SpecimenTypeDesignation> getSpecimenTypeDesignations() {
                return specimenTypeDesignations;
        }
-       /**
-        * @param specimenTypeDesignations the specimenTypeDesignations to set
+       /** 
+        * @see #getSpecimenTypeDesignations()
         */
        protected void setSpecimenTypeDesignations(Set<SpecimenTypeDesignation> specimenTypeDesignations) {
                this.specimenTypeDesignations = specimenTypeDesignations;
@@ -719,7 +720,7 @@ public abstract class TaxonNameBase<T extends TaxonNameBase, S extends INameCach
         * @param  SpecimenTypeDesignation  the specimen type designation which should be deleted
         * @see                                                 HomotypicalGroup#getTypeDesignations()
         * @see                                                 #removeTypeDesignation(SpecimenTypeDesignation)
-        * @see                                 #removeNameTypeDesignation(NameTypeDesignation)
+        * @see                                                 #removeNameTypeDesignation(NameTypeDesignation)
         */
        protected void removeSpecimenTypeDesignation(SpecimenTypeDesignation specimenTypeDesignation) {
                this.specimenTypeDesignations.remove(specimenTypeDesignation);
@@ -837,6 +838,7 @@ public abstract class TaxonNameBase<T extends TaxonNameBase, S extends INameCach
         *
         * @param  taxonBase  the taxon base to be added
         * @see                           #getTaxonBases()
+        * @see                           #removeTaxonBase(TaxonBase)
         */
        //TODO protected
        public void addTaxonBase(TaxonBase taxonBase){