Revision 892efc69
Added by Andreas Kohlbecker almost 14 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/SpecimenTypeDesignationStatus.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
|
14 | 14 |
|
15 |
import java.util.HashMap; |
|
16 |
import java.util.Map; |
|
15 | 17 |
import java.util.UUID; |
16 | 18 |
|
17 | 19 |
import javax.persistence.Entity; |
... | ... | |
57 | 59 |
public class SpecimenTypeDesignationStatus extends TypeDesignationStatusBase<SpecimenTypeDesignationStatus> { |
58 | 60 |
static Logger logger = Logger.getLogger(SpecimenTypeDesignationStatus.class); |
59 | 61 |
|
60 |
private static SpecimenTypeDesignationStatus PHOTOTYPE;
|
|
62 |
protected static Map<UUID, SpecimenTypeDesignationStatus> termMap = null;
|
|
61 | 63 |
|
62 |
private static SpecimenTypeDesignationStatus ICONOTYPE; |
|
63 |
|
|
64 |
private static SpecimenTypeDesignationStatus ISOEPITYPE; |
|
65 |
|
|
66 |
private static SpecimenTypeDesignationStatus PARALECTOTYPE; |
|
67 |
|
|
68 |
private static SpecimenTypeDesignationStatus SECOND_STEP_NEOTYPE; |
|
69 |
|
|
70 |
private static SpecimenTypeDesignationStatus SECOND_STEP_LECTOTYPE; |
|
71 |
|
|
72 |
private static SpecimenTypeDesignationStatus PARANEOTYPE; |
|
73 |
|
|
74 |
private static SpecimenTypeDesignationStatus ISONEOTYPE; |
|
75 |
|
|
76 |
private static SpecimenTypeDesignationStatus ISOLECTOTYPE; |
|
77 |
|
|
78 |
private static SpecimenTypeDesignationStatus PARATYPE; |
|
79 |
|
|
80 |
private static SpecimenTypeDesignationStatus SYNTYPE; |
|
81 |
|
|
82 |
private static SpecimenTypeDesignationStatus ISOTYPE; |
|
83 |
|
|
84 |
private static SpecimenTypeDesignationStatus EPITYPE; |
|
85 |
|
|
86 |
private static SpecimenTypeDesignationStatus NEOTYPE; |
|
87 |
|
|
88 |
private static SpecimenTypeDesignationStatus LECTOTYPE; |
|
89 |
|
|
90 |
private static SpecimenTypeDesignationStatus HOLOTYPE; |
|
91 |
|
|
92 |
private static SpecimenTypeDesignationStatus UNSPECIFIED; |
|
93 |
|
|
94 |
private static SpecimenTypeDesignationStatus ORIGINAL_MATERIAL; |
|
95 |
|
|
96 |
private static SpecimenTypeDesignationStatus ISOSYNTYPE; |
|
97 |
|
|
98 |
|
|
99 |
|
|
100 | 64 |
private static final UUID uuidHolotype = UUID.fromString("a407dbc7-e60c-46ff-be11-eddf4c5a970d"); |
101 | 65 |
private static final UUID uuidLectotype = UUID.fromString("05002d46-083e-4b27-8731-2e7c28a8825c"); |
102 | 66 |
private static final UUID uuidNeotype = UUID.fromString("26e13359-8f77-4e40-a85a-56c01782fce0"); |
... | ... | |
144 | 108 |
public SpecimenTypeDesignationStatus(String term, String label, String labelAbbrev) { |
145 | 109 |
super(term, label, labelAbbrev); |
146 | 110 |
} |
147 |
|
|
148 |
//********* METHODS ************************************** |
|
149 | 111 |
|
112 |
//********* METHODS ************************************** |
|
113 |
|
|
114 |
protected static SpecimenTypeDesignationStatus findTermByUuid(UUID uuid){ |
|
115 |
if (termMap == null){ |
|
116 |
return null; |
|
117 |
} |
|
118 |
return (SpecimenTypeDesignationStatus)termMap.get(uuid); |
|
119 |
} |
|
150 | 120 |
|
121 |
|
|
151 | 122 |
/** |
152 | 123 |
* Returns the boolean value indicating whether <i>this</i> type designation |
153 | 124 |
* status is itself "lectotype" or a kind of "lectotype" (true) or not |
... | ... | |
185 | 156 |
* @see NameRelationshipType#VALIDATED_BY_NAME() |
186 | 157 |
*/ |
187 | 158 |
public static final SpecimenTypeDesignationStatus HOLOTYPE(){ |
188 |
return HOLOTYPE;
|
|
159 |
return findTermByUuid(uuidHolotype);
|
|
189 | 160 |
} |
190 | 161 |
|
191 | 162 |
/** |
... | ... | |
199 | 170 |
* @see #HOLOTYPE() |
200 | 171 |
*/ |
201 | 172 |
public static final SpecimenTypeDesignationStatus LECTOTYPE(){ |
202 |
return LECTOTYPE;
|
|
173 |
return findTermByUuid(uuidLectotype);
|
|
203 | 174 |
} |
204 | 175 |
|
205 | 176 |
/** |
... | ... | |
211 | 182 |
* @see #HOLOTYPE() |
212 | 183 |
*/ |
213 | 184 |
public static final SpecimenTypeDesignationStatus NEOTYPE(){ |
214 |
return NEOTYPE;
|
|
185 |
return findTermByUuid(uuidNeotype);
|
|
215 | 186 |
} |
216 | 187 |
|
217 | 188 |
/** |
... | ... | |
229 | 200 |
* @see #NEOTYPE() |
230 | 201 |
*/ |
231 | 202 |
public static final SpecimenTypeDesignationStatus EPITYPE(){ |
232 |
return EPITYPE;
|
|
203 |
return findTermByUuid(uuidEpitype);
|
|
233 | 204 |
} |
234 | 205 |
|
235 | 206 |
/** |
... | ... | |
239 | 210 |
* @see #HOLOTYPE() |
240 | 211 |
*/ |
241 | 212 |
public static final SpecimenTypeDesignationStatus ISOTYPE(){ |
242 |
return ISOTYPE;
|
|
213 |
return findTermByUuid(uuidIsotype);
|
|
243 | 214 |
} |
244 | 215 |
|
245 | 216 |
/** |
... | ... | |
251 | 222 |
* @see #HOLOTYPE() |
252 | 223 |
*/ |
253 | 224 |
public static final SpecimenTypeDesignationStatus SYNTYPE(){ |
254 |
return SYNTYPE;
|
|
225 |
return findTermByUuid(uuidSyntype);
|
|
255 | 226 |
} |
256 | 227 |
|
257 | 228 |
/** |
... | ... | |
264 | 235 |
* @see #HOLOTYPE() |
265 | 236 |
*/ |
266 | 237 |
public static final SpecimenTypeDesignationStatus ISOSYNTYPE(){ |
267 |
return ISOSYNTYPE;
|
|
238 |
return findTermByUuid(uuidIsosyntype);
|
|
268 | 239 |
} |
269 | 240 |
|
270 | 241 |
/** |
... | ... | |
279 | 250 |
* @see #SYNTYPE() |
280 | 251 |
*/ |
281 | 252 |
public static final SpecimenTypeDesignationStatus PARATYPE(){ |
282 |
return PARATYPE;
|
|
253 |
return findTermByUuid(uuidParatype);
|
|
283 | 254 |
} |
284 | 255 |
|
285 | 256 |
/** |
... | ... | |
290 | 261 |
* @see #LECTOTYPE() |
291 | 262 |
*/ |
292 | 263 |
public static final SpecimenTypeDesignationStatus ISOLECTOTYPE(){ |
293 |
return ISOLECTOTYPE;
|
|
264 |
return findTermByUuid(uuidIsolectotype);
|
|
294 | 265 |
} |
295 | 266 |
|
296 | 267 |
/** |
... | ... | |
301 | 272 |
* @see #NEOTYPE() |
302 | 273 |
*/ |
303 | 274 |
public static final SpecimenTypeDesignationStatus ISONEOTYPE(){ |
304 |
return ISONEOTYPE;
|
|
275 |
return findTermByUuid(uuidIsoneotype);
|
|
305 | 276 |
} |
306 | 277 |
/** |
307 | 278 |
* Returns the "paraneotype" designation status. </BR> |
... | ... | |
312 | 283 |
* @see #NEOTYPE() |
313 | 284 |
*/ |
314 | 285 |
public static final SpecimenTypeDesignationStatus PARANEOTYPE(){ |
315 |
return PARANEOTYPE;
|
|
286 |
return findTermByUuid(uuidParaneotype);
|
|
316 | 287 |
} |
317 | 288 |
|
318 | 289 |
/** |
... | ... | |
323 | 294 |
* @see #LECTOTYPE() |
324 | 295 |
*/ |
325 | 296 |
public static final SpecimenTypeDesignationStatus SECOND_STEP_LECTOTYPE(){ |
326 |
return SECOND_STEP_LECTOTYPE;
|
|
297 |
return findTermByUuid(uuidSecondStepLectotype);
|
|
327 | 298 |
} |
328 | 299 |
|
329 | 300 |
/** |
... | ... | |
334 | 305 |
* @see #LECTOTYPE() |
335 | 306 |
*/ |
336 | 307 |
public static final SpecimenTypeDesignationStatus SECOND_STEP_NEOTYPE(){ |
337 |
return SECOND_STEP_NEOTYPE;
|
|
308 |
return findTermByUuid(uuidSecondStepNeotype);
|
|
338 | 309 |
} |
339 | 310 |
|
340 | 311 |
/** |
... | ... | |
345 | 316 |
* @see #LECTOTYPE() |
346 | 317 |
*/ |
347 | 318 |
public static final SpecimenTypeDesignationStatus PARALECTOTYPE(){ |
348 |
return PARALECTOTYPE;
|
|
319 |
return findTermByUuid(uuidParalectotype);
|
|
349 | 320 |
} |
350 | 321 |
|
351 | 322 |
/** |
... | ... | |
355 | 326 |
* @see #EPITYPE() |
356 | 327 |
*/ |
357 | 328 |
public static final SpecimenTypeDesignationStatus ISOEPITYPE(){ |
358 |
return ISOEPITYPE;
|
|
329 |
return findTermByUuid(uuidIsoepitype);
|
|
359 | 330 |
} |
360 | 331 |
|
361 | 332 |
/** |
... | ... | |
368 | 339 |
* @see #LECTOTYPE() |
369 | 340 |
*/ |
370 | 341 |
public static final SpecimenTypeDesignationStatus ICONOTYPE(){ |
371 |
return ICONOTYPE;
|
|
342 |
return findTermByUuid(uuidIconotype);
|
|
372 | 343 |
} |
373 | 344 |
|
374 | 345 |
/** |
... | ... | |
377 | 348 |
* |
378 | 349 |
*/ |
379 | 350 |
public static final SpecimenTypeDesignationStatus UNSPECIFIC(){ |
380 |
return UNSPECIFIED;
|
|
351 |
return findTermByUuid(uuidUnspecified);
|
|
381 | 352 |
} |
382 | 353 |
|
383 | 354 |
/** |
... | ... | |
387 | 358 |
* |
388 | 359 |
*/ |
389 | 360 |
public static final SpecimenTypeDesignationStatus ORIGINAL_MATERIAL(){ |
390 |
return ORIGINAL_MATERIAL;
|
|
361 |
return findTermByUuid(uuidOriginalMaterial);
|
|
391 | 362 |
} |
392 | 363 |
|
393 | 364 |
|
... | ... | |
397 | 368 |
* |
398 | 369 |
*/ |
399 | 370 |
public static final SpecimenTypeDesignationStatus PHOTOTYPE(){ |
400 |
return PHOTOTYPE;
|
|
371 |
return findTermByUuid(uuidPhototype);
|
|
401 | 372 |
} |
402 | 373 |
|
403 | 374 |
@Override |
404 | 375 |
protected void setDefaultTerms(TermVocabulary<SpecimenTypeDesignationStatus> termVocabulary) { |
405 |
SpecimenTypeDesignationStatus.EPITYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidEpitype); |
|
406 |
SpecimenTypeDesignationStatus.HOLOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidHolotype); |
|
407 |
SpecimenTypeDesignationStatus.ICONOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIconotype); |
|
408 |
SpecimenTypeDesignationStatus.ISOEPITYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIsoepitype); |
|
409 |
SpecimenTypeDesignationStatus.ISOLECTOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIsolectotype); |
|
410 |
SpecimenTypeDesignationStatus.ISONEOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIsoneotype); |
|
411 |
SpecimenTypeDesignationStatus.ISOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIsotype); |
|
412 |
SpecimenTypeDesignationStatus.LECTOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidLectotype); |
|
413 |
SpecimenTypeDesignationStatus.NEOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidNeotype); |
|
414 |
SpecimenTypeDesignationStatus.PARALECTOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidParalectotype); |
|
415 |
SpecimenTypeDesignationStatus.PARANEOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidParaneotype); |
|
416 |
SpecimenTypeDesignationStatus.PARATYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidParatype); |
|
417 |
SpecimenTypeDesignationStatus.PHOTOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidPhototype); |
|
418 |
SpecimenTypeDesignationStatus.SECOND_STEP_LECTOTYPE= termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidSecondStepLectotype); |
|
419 |
SpecimenTypeDesignationStatus.SECOND_STEP_NEOTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidSecondStepNeotype); |
|
420 |
SpecimenTypeDesignationStatus.SYNTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidSyntype); |
|
421 |
SpecimenTypeDesignationStatus.ISOSYNTYPE = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidIsosyntype); |
|
422 |
SpecimenTypeDesignationStatus.UNSPECIFIED = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidUnspecified); |
|
423 |
SpecimenTypeDesignationStatus.ORIGINAL_MATERIAL = termVocabulary.findTermByUuid(SpecimenTypeDesignationStatus.uuidOriginalMaterial); |
|
376 |
termMap = new HashMap<UUID, SpecimenTypeDesignationStatus>(); |
|
377 |
for (SpecimenTypeDesignationStatus term : termVocabulary.getTerms()){ |
|
378 |
termMap.put(term.getUuid(), term); |
|
379 |
} |
|
380 |
|
|
424 | 381 |
} |
425 | 382 |
|
426 | 383 |
} |
Also available in: Unified diff
merging /branches/cdmlib/SPRINT-Chichorieae1/ to trunk