Project

General

Profile

« Previous | Next » 

Revision 9dc896c9

Added by Andreas Müller almost 7 years ago

fix #6368 rename table and class TaxonNameBase

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/SpecimenTypeDesignation.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
......
32 32
import eu.etaxonomy.cdm.model.reference.Reference;
33 33

  
34 34
/**
35
 * The class representing a typification of one or several {@link TaxonNameBase taxon names} by a
36
 * {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnit specimen or a figure}. All {@link TaxonNameBase taxon names}
35
 * The class representing a typification of one or several {@link TaxonName taxon names} by a
36
 * {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnit specimen or a figure}. All {@link TaxonName taxon names}
37 37
 * which have a {@link Rank rank} "species aggregate" or lower can only be typified
38 38
 * by specimens. Moreover each typification by a specimen (or by a figure) has a
39 39
 * {@link SpecimenTypeDesignationStatus status} like "holotype" or "isotype".
......
43 43
 * <li> Typification (partially) according to the TCS
44 44
 * <li> NomenclaturalTypeDesignation according to the ABCD schema
45 45
 * </ul>
46
 * 
46
 *
47 47
 * @see		TypeDesignationBase
48 48
 * @see		NameTypeDesignation
49 49
 * @author	m.doering
......
60 60
public class SpecimenTypeDesignation extends TypeDesignationBase<SpecimenTypeDesignationStatus> implements ITypeDesignation, Cloneable {
61 61
	private static final long serialVersionUID = 6481627446997275007L;
62 62
	private static final Logger logger = Logger.getLogger(SpecimenTypeDesignation.class);
63
	
63

  
64 64
	@XmlElement(name = "TypeSpecimen")
65 65
	@XmlIDREF
66 66
	@XmlSchemaType(name = "IDREF")
......
68 68
	@JoinColumn(name="typeSpecimen_id")
69 69
	@Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE})
70 70
	private DerivedUnit typeSpecimen;
71
	
71

  
72 72
//	/**
73 73
//	 * Creates a new specimen type designation instance
74 74
//	 * (including its {@link reference.Reference reference source} and eventually
75 75
//	 * the taxon name string originally used by this reference when establishing
76
//	 * the former designation) and adds it to the corresponding 
76
//	 * the former designation) and adds it to the corresponding
77 77
//	 * {@link HomotypicalGroup#getSpecimenTypeDesignations() specimen type designation set} of the
78 78
//	 * {@link HomotypicalGroup homotypical group}.
79
//	 * 
79
//	 *
80 80
//	 * @param specimen				the derived unit (specimen or figure) used as type
81
//	 * @param status				the type designation status 
81
//	 * @param status				the type designation status
82 82
//	 * @param citation				the reference source for the new designation
83 83
//	 * @param citationMicroReference	the string with the details describing the exact localisation within the reference
84 84
//	 * @param originalNameString	the taxon name string used originally in the reference source for the new designation
......
91 91
//		SpecimenTypeDesignation specTypeDesig = new SpecimenTypeDesignation(specimen, status, citation, citationMicroReference, originalNameString);
92 92
//		return specTypeDesig;
93 93
//	}
94
	
95
	
96
	// ************* CONSTRUCTORS *************/	
97
	/** 
94

  
95

  
96
	// ************* CONSTRUCTORS *************/
97
	/**
98 98
	 * Class constructor: creates a new empty specimen type designation.
99
	 * 
99
	 *
100 100
	 * @see	#SpecimenTypeDesignation(DerivedUnit, SpecimenTypeDesignationStatus,
101 101
	 * Reference, String, String, boolean)
102 102
	 */
103 103
	protected SpecimenTypeDesignation(){
104 104
	}
105
	
105

  
106 106
	public static SpecimenTypeDesignation NewInstance() {
107 107
		return new SpecimenTypeDesignation();
108 108
	}
109
	
109

  
110 110
	/**
111 111
	 * Class constructor: creates a new specimen type designation instance
112
	 * (including its {@link eu.etaxonomy.cdm.model.reference.Reference reference source} and 
113
	 * eventually the taxon name string originally used by this reference when 
112
	 * (including its {@link eu.etaxonomy.cdm.model.reference.Reference reference source} and
113
	 * eventually the taxon name string originally used by this reference when
114 114
	 * establishing the former designation).
115
	 * 
116
	 * @param specimen				the derived unit (specimen or figure) used 
115
	 *
116
	 * @param specimen				the derived unit (specimen or figure) used
117 117
	 * 								as type
118
	 * @param status				the type designation status 
118
	 * @param status				the type designation status
119 119
	 * @param citation				the reference source for the new designation
120
	 * @param citationMicroReference	the string with the details describing 
120
	 * @param citationMicroReference	the string with the details describing
121 121
	 * 								the exact localisation within the reference
122
	 * @param originalNameString	the taxon name string used originally in the 
122
	 * @param originalNameString	the taxon name string used originally in the
123 123
	 * 								reference source for the new designation
124
	 * @param isNotDesignated		the boolean flag indicating whether there is no specimen type at all for 
124
	 * @param isNotDesignated		the boolean flag indicating whether there is no specimen type at all for
125 125
	 * 								<i>this</i> specimen type designation
126 126
	 * @see							#SpecimenTypeDesignation()
127
	 * @see							TaxonNameBase#addSpecimenTypeDesignation(Specimen, SpecimenTypeDesignationStatus, Reference, String, String, boolean, boolean)
127
	 * @see							TaxonName#addSpecimenTypeDesignation(Specimen, SpecimenTypeDesignationStatus, Reference, String, String, boolean, boolean)
128 128
	 * @see							TypeDesignationBase#isNotDesignated()
129 129
	 * @see							eu.etaxonomy.cdm.model.occurrence.DerivedUnit
130 130
	 */
131
	protected SpecimenTypeDesignation(DerivedUnit specimen, SpecimenTypeDesignationStatus status, Reference citation, String citationMicroReference, 
131
	protected SpecimenTypeDesignation(DerivedUnit specimen, SpecimenTypeDesignationStatus status, Reference citation, String citationMicroReference,
132 132
			String originalNameString, boolean isNotDesignated) {
133 133
		super(citation, citationMicroReference, originalNameString, isNotDesignated);
134 134
		this.setTypeSpecimen(specimen);
135
		
135

  
136 136
		this.setTypeStatus(status);
137 137
	}
138
	
138

  
139 139
	//********* METHODS **************************************/
140
	
141
	
140

  
141

  
142 142
	/* (non-Javadoc)
143 143
	 * @see eu.etaxonomy.cdm.model.name.TypeDesignationBase#removeType()
144 144
	 */
......
146 146
	public void removeType() {
147 147
		this.setTypeSpecimen(null);
148 148
	}
149
	
150
	/** 
149

  
150
	/**
151 151
	 * Returns the {@link DerivedUnit.DerivedUnit derived unit} (specimen or figure) that is used
152
	 * in <i>this</i> specimen type designation to typify the {@link TaxonNameBase taxon name}.
153
	 *  
152
	 * in <i>this</i> specimen type designation to typify the {@link TaxonName taxon name}.
153
	 *
154 154
	 * @see   #getHomotypicalGroup()
155 155
	 */
156 156
	public DerivedUnit getTypeSpecimen(){
157 157
		return this.typeSpecimen;
158 158
	}
159
	
159

  
160 160
	/**
161 161
	 * @see  #getTypeSpecimen()
162 162
	 */
......
176 176
	/* (non-Javadoc)
177 177
	 * @see eu.etaxonomy.cdm.model.name.ITypeDesignation#isLectoType()
178 178
	 */
179
	@Transient
179
	@Override
180
    @Transient
180 181
	public boolean isLectoType() {
181 182
		if(getTypeStatus() == null){
182 183
			return false;
183 184
		}
184 185
		return getTypeStatus().isLectotype();
185 186
	}
186
	
187

  
187 188
//*********************** CLONE ********************************************************/
188
	
189
	/** 
189

  
190
	/**
190 191
	 * Clones <i>this</i> type specimen. This is a shortcut that enables to create
191 192
	 * a new instance that differs only slightly from <i>this</i> type specimen by
192 193
	 * modifying only some of the attributes.
193
	 * 
194
	 *
194 195
	 * @see eu.etaxonomy.cdm.model.name.TypeDesignationBase#clone()
195 196
	 * @see java.lang.Object#clone()
196 197
	 */
......
208 209
		}
209 210
	}
210 211

  
211
	
212

  
212 213
}

Also available in: Unified diff