+
+ /**
+ * @return the specimenTypeDesignations
+ */
+ @ManyToMany
+ @Cascade(CascadeType.SAVE_UPDATE)
+ public Set<SpecimenTypeDesignation> getSpecimenTypeDesignations() {
+ return specimenTypeDesignations;
+ }
+ /**
+ * @param specimenTypeDesignations the specimenTypeDesignations to set
+ */
+ protected void setSpecimenTypeDesignations(Set<SpecimenTypeDesignation> specimenTypeDesignations) {
+ this.specimenTypeDesignations = specimenTypeDesignations;
+ }
+
+ /**
+ * Returns the set of {@link SpecimenTypeDesignation specimen type designations} assigned
+ * indirectly to this taxon name through its {@link HomotypicalGroup homotypical group}.
+ * The rank of this taxon name is generally "species" or below.
+ * The specimen type designations include all the specimens on which
+ * the typification of this name is based (and which are common to all
+ * taxon names belonging to the homotypical group) and eventually
+ * the status of these designations.
+ *
+ * @see SpecimenTypeDesignation
+ * @see NameTypeDesignation
+ */
+ @Transient
+ public Set<SpecimenTypeDesignation> getSpecimenTypeDesignationsOfHomotypicalGroup() {
+ return this.getHomotypicalGroup().getTypeDesignations();
+ }
+
+ /**
+ * Adds a new {@link SpecimenTypeDesignation specimen type designation}
+ * to the set of specimen type designations assigned to the
+ * {@link HomotypicalGroup homotypical group} to which this taxon name belongs.
+ *
+ * @param typeSpecimen the specimen to be used as a type for this taxon name's homotypical group
+ * @param status the specimen type designation status
+ * @param citation the reference for this new specimen type designation
+ * @param citationMicroReference the string with the details (generally pages) within the reference
+ * @param originalNameString the taxon name used in the reference to assert this designation
+ * @see HomotypicalGroup#getTypeDesignations()
+ * @see #addTypeDesignation(TaxonNameBase, ReferenceBase, String, String, boolean, boolean)
+ * @see TypeDesignationStatus
+ */
+ public void addSpecimenTypeDesignation(Specimen typeSpecimen, TypeDesignationStatus status, ReferenceBase citation, String citationMicroReference, String originalNameString, boolean addToAllNames) {
+ SpecimenTypeDesignation specimenTypeDesignation =
+ SpecimenTypeDesignation.NewInstance(typeSpecimen, status, citation, citationMicroReference, originalNameString);
+ this.getHomotypicalGroup().addTypeDesignation(specimenTypeDesignation, addToAllNames);
+ }
+
+ //only to be used for xxx
+ protected void addSpecimenTypeDesignation(SpecimenTypeDesignation specimenTypeDesignation) {
+ this.specimenTypeDesignations.add(specimenTypeDesignation);
+ }
+
+ //only to be used for xxx
+ protected void removeSpecimenTypeDesignation(SpecimenTypeDesignation specimenTypeDesignation) {
+ this.specimenTypeDesignations.remove(specimenTypeDesignation);
+ }
+
+ /**
+ * Removes one element from the set of {@link SpecimenTypeDesignation specimen type designations} assigned to the
+ * {@link HomotypicalGroup homotypical group} to which this taxon name belongs.
+ * The specimen type designation itself will be nullified.
+ *
+ * @param typeDesignation the specimen type designation which should be deleted
+ * @see HomotypicalGroup#getTypeDesignations()
+ * @see #removeTypeDesignation(NameTypeDesignation)
+ */