Project

General

Profile

Download (16.6 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.cdm.model.name;
11

    
12

    
13

    
14

    
15
import java.util.UUID;
16

    
17
import javax.persistence.Entity;
18
import javax.persistence.Transient;
19
import javax.xml.bind.annotation.XmlAccessType;
20
import javax.xml.bind.annotation.XmlAccessorType;
21
import javax.xml.bind.annotation.XmlType;
22

    
23
import org.apache.log4j.Logger;
24
import org.hibernate.envers.Audited;
25

    
26
import eu.etaxonomy.cdm.model.common.OrderedTermBase;
27
import eu.etaxonomy.cdm.model.common.TermVocabulary;
28

    
29
/**
30
 * The class representing status (categories) of {@link SpecimenTypeDesignation specimen type designations}
31
 * for a {@link TaxonNameBase taxon name} or a set of them. Within this set {@link NameRelationshipType#BASIONYM() basionyms}
32
 * or {@link NameRelationshipType#REPLACED_SYNONYM() replaced synonyms}, in case of reclassifications,
33
 * will be here referred as "type-bringing" taxon names.
34
 * <P>
35
 * The different status indicate whether the {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimens} used as types
36
 * in a designation are duplicates, replacements, related specimens etc. 
37
 * <P>
38
 * A standard (ordered) list of type designation status instances will be
39
 * automatically created as the project starts. But this class allows to extend
40
 * this standard list by creating new instances of additional type designation
41
 * status if needed. 
42
 * <P>
43
 * This class corresponds to: <ul>
44
 * <li> NomencalturalTypeTypeTerm according to the TDWG ontology
45
 * <li> NomenclaturalTypeStatusOfUnitsEnum according to the TCS
46
 * </ul>
47
 * 
48
 * @author m.doering
49
 * @version 1.0
50
 * @created 08-Nov-2007 13:07:00
51
 */
52
@XmlAccessorType(XmlAccessType.FIELD)
53
@XmlType(name = "SpecimenTypeDesignationStatus")
54
@Entity
55
@Audited
56
public class SpecimenTypeDesignationStatus extends TypeDesignationStatusBase<SpecimenTypeDesignationStatus> {
57
	static Logger logger = Logger.getLogger(SpecimenTypeDesignationStatus.class);
58

    
59
	private static SpecimenTypeDesignationStatus PHOTOTYPE;
60

    
61
	private static SpecimenTypeDesignationStatus ICONOTYPE;
62

    
63
	private static SpecimenTypeDesignationStatus ISOEPITYPE;
64

    
65
	private static SpecimenTypeDesignationStatus PARALECTOTYPE;
66

    
67
	private static SpecimenTypeDesignationStatus SECOND_STEP_NEOTYPE;
68

    
69
	private static SpecimenTypeDesignationStatus SECOND_STEP_LECTOTYPE;
70

    
71
	private static SpecimenTypeDesignationStatus PARANEOTYPE;
72

    
73
	private static SpecimenTypeDesignationStatus ISONEOTYPE;
74

    
75
	private static SpecimenTypeDesignationStatus ISOLECTOTYPE;
76

    
77
	private static SpecimenTypeDesignationStatus PARATYPE;
78

    
79
	private static SpecimenTypeDesignationStatus SYNTYPE;
80

    
81
	private static SpecimenTypeDesignationStatus ISOTYPE;
82

    
83
	private static SpecimenTypeDesignationStatus EPITYPE;
84

    
85
	private static SpecimenTypeDesignationStatus NEOTYPE;
86

    
87
	private static SpecimenTypeDesignationStatus LECTOTYPE;
88

    
89
	private static SpecimenTypeDesignationStatus HOLOTYPE;
90

    
91
	private static SpecimenTypeDesignationStatus UNSPECIFIC;
92
	
93
	private static SpecimenTypeDesignationStatus ORIGINAL_MATERIAL;
94
	
95
	private static final UUID uuidHolotype = UUID.fromString("a407dbc7-e60c-46ff-be11-eddf4c5a970d");
96
	private static final UUID uuidLectotype = UUID.fromString("05002d46-083e-4b27-8731-2e7c28a8825c");
97
	private static final UUID uuidNeotype = UUID.fromString("26e13359-8f77-4e40-a85a-56c01782fce0");
98
	private static final UUID uuidEpitype = UUID.fromString("989a2715-71d5-4fbe-aa9a-db9168353744");
99
	private static final UUID uuidIsolectotype = UUID.fromString("7a1a8a53-78f4-4fc0-89f7-782e94992d08");
100
	private static final UUID uuidIsoneotype = UUID.fromString("7afc2f4f-f70a-4aa5-80a5-87764f746bde");
101
	private static final UUID uuidIsotype = UUID.fromString("93ef8257-0a08-47bb-9b36-542417ae7560");
102
	private static final UUID uuidParaneotype = UUID.fromString("0c39e2a5-2fe0-4d4f-819a-f609b5340339");
103
	private static final UUID uuidParatype = UUID.fromString("eb7df2e5-d9a7-479d-970c-c6f2b0a761d7");
104
	private static final UUID uuidSecondStepLectotype = UUID.fromString("01d91053-7004-4984-aa0d-9f4de59d6205");
105
	private static final UUID uuidSecondStepNeotype = UUID.fromString("8d2fed1f-242e-4bcf-bbd7-e85133e479dc");
106
	private static final UUID uuidSyntype = UUID.fromString("f3b60bdb-4638-4ca9-a0c7-36e77d8459bb");
107
	private static final UUID uuidParalectotype = UUID.fromString("7244bc51-14d8-41a6-9524-7dc5303bba29");
108
	private static final UUID uuidIsoepitype = UUID.fromString("95b90696-e103-4bc0-b60b-c594983fb566");
109
	private static final UUID uuidIconotype = UUID.fromString("643513d0-32f5-46ba-840b-d9b9caf8160f");
110
	private static final UUID uuidPhototype = UUID.fromString("b7807acc-f559-474e-ad4a-e7a41e085e34");
111
	private static final UUID uuidUnspecific = UUID.fromString("230fd762-b143-49de-ac2e-744bcc48a63b");
112
	private static final UUID uuidOriginalMaterial = UUID.fromString("49c96cae-6be6-401e-9b36-1bc12d9dc8f9");
113

    
114
	
115
	// ************* CONSTRUCTORS *************/	
116
	/** 
117
	 * Class constructor: creates a new empty type designation status instance.
118
	 * 
119
	 * @see 	#TypeDesignationStatus(String, String, String)
120
	 */
121
	public SpecimenTypeDesignationStatus() {
122
	}
123

    
124

    
125
	/** 
126
	 * Class constructor: creates an additional type designation status instance
127
	 * with a description (in the {@link eu.etaxonomy.cdm.model.common.Language#DEFAULT() default language}), a label
128
	 * and a label abbreviation.
129
	 * 
130
	 * @param	term  		 the string (in the default language) describing the
131
	 * 						 new type designation status to be created 
132
	 * @param	label  		 the string identifying the new type designation
133
	 * 						 status to be created
134
	 * @param	labelAbbrev  the string identifying (in abbreviated form) the
135
	 * 						 new type designation status to be created
136
	 * @see 				 #TypeDesignationStatus()
137
	 */
138
	public SpecimenTypeDesignationStatus(String term, String label, String labelAbbrev) {
139
		super(term, label, labelAbbrev);
140
	}
141

    
142
	//********* METHODS **************************************
143
	
144

    
145
	/**
146
	 * Returns the boolean value indicating whether <i>this</i> type designation
147
	 * status is itself "lectotype" or a kind of "lectotype" (true) or not
148
	 * (false). Returns false if <i>this</i> type designation status is null.<BR>
149
	 * A lectotype is a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase specimen or illustration} designated as the
150
	 * nomenclatural type, when no holotype was indicated at the time of
151
	 * publication of the "type-bringing" {@link TaxonNameBase taxon name}, when the
152
	 * holotype is found to be assigned to taxon names belonging to more than
153
	 * one {@link HomotypicalGroup homotypical group}, or as long as it is missing.
154
	 *
155
	 * @see  #LECTOTYPE()
156
	 * @see  #HOLOTYPE()
157
	 * @see  eu.etaxonomy.cdm.model.common.DefinedTermBase#getKindOf()
158
	 */
159
	@Transient
160
	public boolean isLectotype(){
161
		if (this.equals(LECTOTYPE()) ||
162
				this.equals(ISOLECTOTYPE()) ||
163
				this.equals(SECOND_STEP_LECTOTYPE()) ||
164
				this.equals(PARALECTOTYPE()) ){
165
			return true;
166
		}else{
167
			return false;
168
		}
169
	}
170

    
171
	
172
	/**
173
	 * Returns the "holotype" designation status. A holotype of a
174
	 * set of names is the one {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase specimen or illustration}
175
	 * designated as the nomenclatural type by the {@link NonViralName#getCombinationAuthorTeam() author} of the
176
	 * "type-bringing" {@link TaxonNameBase taxon name} (or by the author of a later validated
177
	 * "invalid" taxon name).
178
	 * 
179
	 * @see		NameRelationshipType#VALIDATED_BY_NAME()
180
	 */
181
	public static final SpecimenTypeDesignationStatus HOLOTYPE(){
182
		return HOLOTYPE;
183
	}
184

    
185
	/**
186
	 * Returns the "lectotype" designation status. A lectotype is a
187
	 * {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase specimen or illustration} designated as the nomenclatural type,
188
	 * when no holotype was indicated at the time of publication of the
189
	 * "type-bringing" {@link TaxonNameBase taxon name}, when the
190
	 * holotype is found to to be assigned to taxon names belonging to more than one
191
	 * {@link HomotypicalGroup homotypical group}, or as long as it is missing.
192
	 * 
193
	 * @see	#HOLOTYPE()
194
	 */
195
	public static final SpecimenTypeDesignationStatus LECTOTYPE(){
196
		return LECTOTYPE;
197
	}
198

    
199
	/**
200
	 * Returns the "neotype" designation status. A neotype is a
201
	 * {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase specimen or illustration} selected to serve as nomenclatural type
202
	 * as long as all of the material on which the "type-bringing" {@link TaxonNameBase taxon name} was based
203
	 * is missing. 
204
	 * 
205
	 * @see	#HOLOTYPE()
206
	 */
207
	public static final SpecimenTypeDesignationStatus NEOTYPE(){
208
		return NEOTYPE;
209
	}
210

    
211
	/**
212
	 * Returns the "epitype" designation status. An epitype is a
213
	 * {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase specimen or illustration} selected to serve as an interpretative type
214
	 * when the holotype, lectotype or previously designated neotype, or all
215
	 * original material associated with the {@link NomenclaturalStatusType#VALID() validly} published "type-bringing"
216
	 * {@link TaxonNameBase taxon name}, is demonstrably ambiguous and cannot be critically
217
	 * identified for purposes of the precise application of the taxon name.
218
	 * When an epitype is designated, the holotype, lectotype or neotype that
219
	 * the epitype supports must be explicitly cited.
220
	 *
221
	 * @see	#HOLOTYPE()
222
	 * @see	#LECTOTYPE()
223
	 * @see	#NEOTYPE()
224
	 */
225
	public static final SpecimenTypeDesignationStatus EPITYPE(){
226
		return EPITYPE;
227
	}
228

    
229
	/**
230
	 * Returns the "isotype" designation status. An isotype is any duplicate of
231
	 * the holotype; it is always a {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimen}.
232
	 * 
233
	 * @see	#HOLOTYPE()
234
	 */
235
	public static final SpecimenTypeDesignationStatus ISOTYPE(){
236
		return ISOTYPE;
237
	}
238

    
239
	/**
240
	 * Returns the "syntype" designation status. A syntype is any one of two or
241
	 * more {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimens} cited in the {@link TaxonNameBase#getNomenclaturalReference() protologue} of the
242
	 * "type-bringing" {@link TaxonNameBase taxon name} when no holotype was designated,
243
	 * or any one of two or more specimens simultaneously designated as types.
244
	 * 
245
	 * @see	#HOLOTYPE()
246
	 */
247
	public static final SpecimenTypeDesignationStatus SYNTYPE(){
248
		return SYNTYPE;
249
	}
250

    
251
	/**
252
	 * Returns the "paratype" designation status. A paratype is a {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimen}
253
	 * cited in the {@link TaxonNameBase#getNomenclaturalReference() protologue} of the "type-bringing"
254
	 * {@link TaxonNameBase taxon name} that is neither the holotype nor an isotype,
255
	 * nor one of the syntypes if two or more specimens were simultaneously
256
	 * designated as types.
257
	 * 
258
	 * @see	#HOLOTYPE()
259
	 * @see	#ISOTYPE()
260
	 * @see	#SYNTYPE()
261
	 */
262
	public static final SpecimenTypeDesignationStatus PARATYPE(){
263
		return PARATYPE;
264
	}
265

    
266
	/**
267
	 * Returns the "isolectotype" designation status. An isolectotype is any
268
	 * duplicate of the lectotype; it is always a {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimen}.
269
	 * 
270
	 * @see	#LECTOTYPE()
271
	 */
272
	public static final SpecimenTypeDesignationStatus ISOLECTOTYPE(){
273
		return ISOLECTOTYPE;
274
	}
275

    
276
	/**
277
	 * Returns the "isoneotype" designation status. An isoneotype is any
278
	 * duplicate of the neotype; it is always a {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimen}.
279
	 * 
280
	 * @see	#NEOTYPE()
281
	 */
282
	public static final SpecimenTypeDesignationStatus ISONEOTYPE(){
283
		return ISONEOTYPE;
284
	}
285
	/**
286
	 * Returns the "paraneotype" designation status. A paraneotype is a {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimen},
287
	 * cited when selecting a neotype, other than the neotype itself. Also
288
	 * called "neoparatype" in zoology.
289
	 * 
290
	 * @see	#NEOTYPE()
291
	 */
292
	public static final SpecimenTypeDesignationStatus PARANEOTYPE(){
293
		return PARANEOTYPE;
294
	}
295

    
296
	/**
297
	 * Returns the "second step lectotype" designation status. A second step
298
	 * lectotype is a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase specimen or illustration}, designated as lectotype
299
	 * in order to substitute another already existing lectotype.
300
	 * 
301
	 * @see	#LECTOTYPE()
302
	 */
303
	public static final SpecimenTypeDesignationStatus SECOND_STEP_LECTOTYPE(){
304
		return SECOND_STEP_LECTOTYPE;
305
	}
306

    
307
	/**
308
	 * Returns the "second step neotype" designation status. A second step
309
	 * neotype is a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase specimen or illustration}, designated as neotype
310
	 * in order to substitute another already existing neotype.
311
	 * 
312
	 * @see	#LECTOTYPE()
313
	 */
314
	public static final SpecimenTypeDesignationStatus SECOND_STEP_NEOTYPE(){
315
		return SECOND_STEP_NEOTYPE;
316
	}
317

    
318
	/**
319
	 * Returns the "paralectotype" designation status. A paralectotype is a
320
	 * {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimen}, cited when designating a lectotype, other than
321
	 * the lectotype itself. Also called "lectoparatype" in zoology.
322
	 * 
323
	 * @see	#LECTOTYPE()
324
	 */
325
	public static final SpecimenTypeDesignationStatus PARALECTOTYPE(){
326
		return PARALECTOTYPE;
327
	}
328

    
329
	/**
330
	 * Returns the "isoepitype" designation status. An isoepitype is any
331
	 * duplicate of the epitype; it is always a {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimen}.
332
	 * 
333
	 * @see	#EPITYPE()
334
	 */
335
	public static final SpecimenTypeDesignationStatus ISOEPITYPE(){
336
		return ISOEPITYPE;
337
	}
338

    
339
	/**
340
	 * Returns the "iconotype" designation status. An iconotype is a holotype or
341
	 * a lectotype that is a {@link eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase drawing}
342
	 * and not a {@link eu.etaxonomy.cdm.model.occurrence.Specimen specimen}.
343
	 * "Iconotype" does not have type status according to the ICBN.
344
	 * 
345
	 * @see	#HOLOTYPE()
346
	 * @see	#LECTOTYPE()
347
	 */
348
	public static final SpecimenTypeDesignationStatus ICONOTYPE(){
349
		return ICONOTYPE;
350
	}
351

    
352
	/**
353
	 * Returns the "unspecific" type designation status. Used if from literature where it is not 
354
	 * clear if it refers to another publication not cited or if it is a new designation.
355
	 * 
356
	 */
357
	public static final SpecimenTypeDesignationStatus UNSPECIFIC(){
358
		return UNSPECIFIC;
359
	}
360

    
361
	/**
362
	 * Returns the "original material" type designation status.
363
	 * Botanical term for material from which a lectotype can be designated.
364
	 * "Original material" does not have type status according to the ICBN.
365
	 * 
366
	 */
367
	public static final SpecimenTypeDesignationStatus ORIGINAL_MATERIAL(){
368
		return ORIGINAL_MATERIAL;
369
	}
370
	
371
	
372
	/**
373
	 * Returns the "phototype" type designation status.
374
	 * "Phototype" does not have type status according to the ICBN.
375
	 * 
376
	 */
377
	public static final SpecimenTypeDesignationStatus PHOTOTYPE(){
378
		return PHOTOTYPE;
379
	}
380
	
381
	@Override
382
	protected void setDefaultTerms(TermVocabulary<SpecimenTypeDesignationStatus> termVocabulary) {
383
		SpecimenTypeDesignationStatus.EPITYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidEpitype);
384
		SpecimenTypeDesignationStatus.HOLOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidHolotype);
385
		SpecimenTypeDesignationStatus.ICONOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIconotype);
386
		SpecimenTypeDesignationStatus.ISOEPITYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIsoepitype);
387
		SpecimenTypeDesignationStatus.ISOLECTOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIsolectotype);
388
		SpecimenTypeDesignationStatus.ISONEOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIsoneotype);
389
		SpecimenTypeDesignationStatus.ISOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIsotype);
390
		SpecimenTypeDesignationStatus.LECTOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidLectotype);
391
		SpecimenTypeDesignationStatus.NEOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidNeotype);
392
		SpecimenTypeDesignationStatus.PARALECTOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidParalectotype);
393
		SpecimenTypeDesignationStatus.PARANEOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidParaneotype);
394
		SpecimenTypeDesignationStatus.PARATYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidParatype);
395
		SpecimenTypeDesignationStatus.PHOTOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidPhototype);
396
		SpecimenTypeDesignationStatus.SECOND_STEP_LECTOTYPE= termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidSecondStepLectotype);
397
		SpecimenTypeDesignationStatus.SECOND_STEP_NEOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidSecondStepNeotype);
398
		SpecimenTypeDesignationStatus.SYNTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidSyntype);		
399
		SpecimenTypeDesignationStatus.UNSPECIFIC = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidUnspecific);		
400
		SpecimenTypeDesignationStatus.ORIGINAL_MATERIAL = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidOriginalMaterial);		
401
	}
402

    
403
}
(18-18/25)