Project

General

Profile

Download (23.1 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.term;
11

    
12
import java.util.Set;
13
import java.util.UUID;
14

    
15
import javax.xml.bind.annotation.XmlEnum;
16
import javax.xml.bind.annotation.XmlEnumValue;
17

    
18
import org.apache.log4j.Logger;
19

    
20
import eu.etaxonomy.cdm.model.agent.Institution;
21
import eu.etaxonomy.cdm.model.common.Language;
22
import eu.etaxonomy.cdm.model.description.CategoricalData;
23
import eu.etaxonomy.cdm.model.description.Character;
24
import eu.etaxonomy.cdm.model.description.DescriptionBase;
25
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
26
import eu.etaxonomy.cdm.model.description.Distribution;
27
import eu.etaxonomy.cdm.model.description.MeasurementUnit;
28
import eu.etaxonomy.cdm.model.description.SpecimenDescription;
29
import eu.etaxonomy.cdm.model.description.StateData;
30
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
31
import eu.etaxonomy.cdm.model.description.TaxonDescription;
32
import eu.etaxonomy.cdm.model.description.TextData;
33
import eu.etaxonomy.cdm.model.location.NamedArea;
34
import eu.etaxonomy.cdm.model.location.Point;
35
import eu.etaxonomy.cdm.model.media.Rights;
36
import eu.etaxonomy.cdm.model.molecular.Amplification;
37
import eu.etaxonomy.cdm.model.molecular.DnaQuality;
38
import eu.etaxonomy.cdm.model.name.HybridRelationship;
39
import eu.etaxonomy.cdm.model.name.NameRelationship;
40
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
41
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
42
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
43
import eu.etaxonomy.cdm.model.name.TaxonName;
44
import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
45
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
46
import eu.etaxonomy.cdm.model.taxon.Synonym;
47
import eu.etaxonomy.cdm.model.taxon.Taxon;
48
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
49
import eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation;
50
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
51

    
52

    
53
/**
54
 * The term type is used to define the type of a {@link TermBase term}, may it be a vocabulary or a defined term.<BR>
55
 * It is used to define in which context a term may be used. From v3.3 on this replaces the semantic part of the subclasses
56
 * of the class {@link DefinedTermBase}. E.g. before v3.3 a term defining a sex and a term defining a stage had to different
57
 * classes Sex and Stage. With v3.3 they both became {@link DefinedTerm}s but with different types.<BR>
58
 * The type of a term and the type of its vocabulary should be the same. Before v3.3 it was not always
59
 * possible to define what the context of an (empty) vocabulary is.
60
 * In future versions this enum may also be expressed as a term, not an enum. For now the general policy is to
61
 * transform former classes to general classes with enums as their types.
62
 *
63
 * @author a.mueller
64
 * @since 11.06.2013
65
 */
66
@XmlEnum
67
public enum TermType implements IEnumTerm<TermType>{
68

    
69
    //0
70
    /**
71
     * Unknown term type is the type to be used if no information is available about the type.
72
     * In the current model this type should never be used. However, it is a placeholder in case
73
     * we find an appropriate usage in future.
74
     */
75
    @XmlEnumValue("Unknown")
76
    Unknown(UUID.fromString("b2836c89-3b1d-4758-ba6d-568ef8d6fbc4"), "Unknown Term Type","UNK", null),
77

    
78
    //1
79
    /**
80
     * Term type to represent languages.
81
     */
82
    @XmlEnumValue("Language")
83
    Language(UUID.fromString("5591dc6c-ad1f-4abd-b6c2-4852ea8e46df"), "Language", "LA", null),
84

    
85
    //2
86
    /**
87
     * Term type for areas.
88
     */
89
    @XmlEnumValue("NamedArea")
90
    NamedArea(UUID.fromString("8c9a0bc9-da91-478d-bc8b-44b11565e160"), "Named Area", "NA", null),
91

    
92
    //3
93
    /**
94
     * Term type for taxonomic ranks.
95
     */
96
    @XmlEnumValue("Rank")
97
    Rank(UUID.fromString("8d26b6a9-8a89-45d5-8358-49c3e4f30ade"), "Rank", "RK", null),
98

    
99
    //4
100
    /**
101
     * Term type for descriptive features.
102
     * @see DescriptionElementBase
103
     */
104
    @XmlEnumValue("Feature")
105
    Feature(UUID.fromString("b866a1d6-f962-4c23-bb8e-a3b66d33aedc"), "Feature", "FE", null),
106

    
107
    //5
108
    /**
109
     * Term type for annotation types.
110
     * @see Annotation
111
     */
112
    @XmlEnumValue("AnnotationType")
113
    AnnotationType(UUID.fromString("c3aabb64-6174-4152-95b1-7cec57e485cf"), "Annotation Type", "ANT", null),
114

    
115
    //6
116
    /**
117
     * Term type for marker types.
118
     * @see Marker
119
     */
120
    @XmlEnumValue("MarkerType")
121
    MarkerType(UUID.fromString("d28a1bf8-95ed-483a-8f02-3515b14998e0"), "Marker Type", "MKT", null),
122

    
123
    //7
124
    /**
125
     * Term type for extension types.
126
     * @see Extension
127
     */
128
    @XmlEnumValue("ExtensionType")
129
    ExtensionType(UUID.fromString("12f5c03b-528a-4909-b81b-e525feabc97c"), "Extension Type", "EXT", null),
130

    
131
    //8
132
    /**
133
     * Term type for derivation event types.
134
     * @see DerivationEvent
135
     */
136
    @XmlEnumValue("DerivationEventType")
137
    DerivationEventType(UUID.fromString("ba8e4b10-c792-42e7-a3f5-874708f10094"), "Derivation Event Type", "DET", null),
138

    
139
    //9
140
    /**
141
     * Term type for presence or absence status
142
     * @see Distribution
143
     */
144
    @XmlEnumValue("PresenceAbsenceTerm")
145
    PresenceAbsenceTerm(UUID.fromString("f6b80f88-c8c5-456b-bbd6-d63ecf35606e"), "Presence or Absence Term", "PAT", null),
146

    
147
    //10
148
    /**
149
     * Term type for the taxonomic nomenclatural status of a {@link TaxonName taxon name}.
150
     * @see NomenclaturalStatus
151
     */
152
    @XmlEnumValue("NomenclaturalStatusType")
153
    NomenclaturalStatusType(UUID.fromString("c1acb71a-1d11-4305-8818-c2268d341742"), "Nomenclatural Status Type", "NST", null),
154

    
155
    //11
156
    /**
157
     * Term type for the type of a name relationship between {@link TaxonName taxon names}
158
     * @see NameRelationship
159
     */
160
    @XmlEnumValue("NameRelationshipType")
161
    NameRelationshipType(UUID.fromString("acd8189a-23b9-4a53-8f48-1d2aa270a6ba"), "Name Relationship Type", "NRT"),
162

    
163
    //12
164
    /**
165
     * Term type for the type of a hybrid relationship between {@link TaxonName taxon names}
166
     * @see HybridRelationship
167
     */
168
    @XmlEnumValue("HybridRelationshipType")
169
    HybridRelationshipType(UUID.fromString("aade9e61-eaa1-40fe-9eb1-40f9e8ae1114"), "Hybrid Relationship Type", "HRT"),
170

    
171
    //13
172
    /**
173
     * Term type for the type of a synonym relationship between 2 {@link TaxonBase taxa}
174
     * @see Synonym#getType()
175
     * @see TaxonBase
176
     */
177
    @XmlEnumValue("SynonymType")
178
    SynonymType(UUID.fromString("1eb4fee0-7716-4531-a9ed-a95327f1f4bb"), "Synonym Type", "SRT"),
179

    
180
    //14
181
    /**
182
     * Term type for the type of a taxonomic concept relationship between
183
     * 2 {@link Taxon accepted taxa}  with different secundum referece.
184
     * @see TaxonRelationship
185
     * @see Taxon
186
     */
187
    @XmlEnumValue("TaxonRelationshipType")
188
    TaxonRelationshipType(UUID.fromString("2d4b281c-142e-42c5-8eb5-1747592b54d8"), "Taxon Relationship Type", "TRT"),
189

    
190
    //15
191
    /**
192
     * Term type for the type of a typification of a taxonomic name
193
     * with a rank higher then species.
194
     * @see eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus
195
     * @see NameTypeDesignation
196
     */
197
    @XmlEnumValue("NameTypeDesignationStatus")
198
    NameTypeDesignationStatus(UUID.fromString("d3860be6-8a08-4fff-984a-6ee8b42937c9"), "Name Type Designation Status", "NTD"),
199

    
200
    //16
201
    /**
202
     * Term type for the type of a typification of a taxonomic name
203
     * with a rank equal or lower then species.
204
     * @see {@link eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus}
205
     * @see SpecimenTypeDesignation
206
     */
207
    @XmlEnumValue("SpecimenTypeDesignationStatus")
208
    SpecimenTypeDesignationStatus(UUID.fromString("4014d7d4-f2dd-4328-8015-357a1a77c1ed"), "Specimen Type Designation Status", "STD"),
209

    
210
    //17
211
    /**
212
     * Term type for an institution type.
213
     * @see Institution
214
     */
215
    @XmlEnumValue("InstitutionType")
216
    InstitutionType(UUID.fromString("09d78265-18b5-4352-b154-d2f39e84d3f3"), "Institution Type", "IT", null),
217

    
218
    //18
219
    /**
220
     * Term type for a named area type.
221
     * @see NamedArea
222
     * @see eu.etaxonomy.cdm.model.location.NamedAreaType
223
     */
224
    @XmlEnumValue("NamedAreaType")
225
    NamedAreaType(UUID.fromString("6a9aba35-6272-4373-8386-000cf95b729e"), "Named Area Type", "NAT", null),
226

    
227
    //19
228
    /**
229
     * Term type for a named area level.
230
     * @see NamedArea
231
     * @see eu.etaxonomy.cdm.model.location.NamedAreaLevel
232
     */
233
    @XmlEnumValue("NamedAreaLevel")
234
    NamedAreaLevel(UUID.fromString("62c16c74-dc79-4970-9031-bb1504be46f5"), "Named Area Level", "NAL", null),
235

    
236
    //20
237
    /**
238
     * Term type for rights.
239
     * @see Rights
240
     */
241
    @XmlEnumValue("RightsType")
242
    RightsType(UUID.fromString("80e06b04-8d0d-4bd5-bcd6-d35f73c24d55"), "Rights Type", "RT", null),
243

    
244
    //21
245
    /**
246
     * Term type for a measurement unit.
247
     * @see MeasurementUnit
248
     */
249
    @XmlEnumValue("MeasurementUnit")
250
    MeasurementUnit(UUID.fromString("f9e6c44f-f0d6-428b-9bc0-bb00a6514883"), "Measurement Unit", "MU", null),
251

    
252
    //22
253
    /**
254
     * Term type for a statistical measure.
255
     * @see eu.etaxonomy.cdm.model.description.StatisticalMeasure
256
     * @see StatisticalMeasurementValue
257
     */
258
    @XmlEnumValue("StatisticalMeasure")
259
    StatisticalMeasure(UUID.fromString("a22d19cd-a342-4af2-b156-d688a7aa8a6b"), "Statistical Measure", "SM", null),
260

    
261
    //23
262
    @XmlEnumValue("MaterialOrMethod")
263
    MaterialOrMethod(UUID.fromString("285a1406-a606-46b9-b0a4-717748296e50"), "Material or Method", "MOM"),
264

    
265
    //23a
266
    @XmlEnumValue("Material")
267
    Material(UUID.fromString("58499bc1-9808-4e03-861c-4325ca889515"), "Material", "MAT", MaterialOrMethod),
268

    
269
    //23b
270
    @XmlEnumValue("Method")
271
    Method(UUID.fromString("527fc141-7fdf-43c1-9d46-20be13c2590c"), "Method", "MET", MaterialOrMethod),
272

    
273

    
274
//	//23c TODO required??
275
//	@XmlEnumValue("PreservationMethod")   --> Method
276
//	PreservationMethod(UUID.fromString("9cadbee4-22b5-40f5-bb37-e4f5340d246e"), "Preservation method", "PRM", MaterialOrMethod),
277
//
278
//	//23d TODO required??  --> Material
279
//	@XmlEnumValue("PreservationMedium")
280
//	PreservationMedium(UUID.fromString("c6269a06-6954-4838-a7a7-7f94ba372f3d"), "Preservation medium", "PME", MaterialOrMethod),
281

    
282

    
283
    //24
284
    /**
285
     * This type represents possible modulations for the validity of
286
     * information pieces ({@link DescriptionElementBase} description elements).
287
     * It can cover probability ("perhaps"), frequency ("often") intensity ("very"),
288
     * timing ("spring") and other domains. Its instances can be grouped to build
289
     * different controlled {@link TermVocabulary term vocabularies}.
290
     * <P>
291
     * This class corresponds to GeneralModifierNLDType according to
292
     * the SDD schema.
293
     * This class is a generalization of {@link #Scope} and {@link #DeterminationModifier}
294
     *
295
     * @see DescriptionElementBase#getModifiers()
296
     * @see StateData#getModifiers()
297
     */
298
    @XmlEnumValue("Modifier")
299
    Modifier(UUID.fromString("97c4db67-ccf5-40bf-9fb8-83fb7446a364"), "Modifier", "MO", null),
300

    
301
    //25
302
    /**
303
     * The type representing restrictions for the validity of
304
     * {@link TaxonDescription taxon descriptions} and others.
305
     * This could include not only Stage (life stage) and Sex
306
     * but also for instance particular organism parts or seasons.<BR>
307
     * Scope is a specialization of {@link #Modifier} and a generalization of
308
     * {@link #Sex} and {@link #Stage}
309
     *
310
     * @see Modifier
311
     * @see DescriptionElementBase
312
     * @see TaxonDescription
313
     * @see TaxonDescription#getScopes()
314
     */
315
    @XmlEnumValue("Scope")
316
    Scope(UUID.fromString("8862b66e-9059-4ea4-885e-47a373357075"), "Scope", "SCO", Modifier),
317

    
318
    //26
319
    /** The stage type represents the restriction (scope) concerning the life stage for
320
     * the applicability of {@link TaxonDescription taxon descriptions}. The life stage of a
321
     * {@link SpecimenOrObservationBase specimen or observation}
322
     * does not belong to a {@link SpecimenDescription specimen description} but is an attribute of
323
     * the specimen itself.<BR>
324
     *
325
     * Stage is a specialization of {@link #Scope}.
326
     */
327
    @XmlEnumValue("Stage")
328
    Stage(UUID.fromString("cf411ef0-8eee-4461-99e9-c03f4f0a1656"), "Stage", "STG", Scope),
329

    
330
    //26a
331
    /** The kind-of-unit type represents the restriction (scope) concerning the part(s) of an
332
     * organism or the class of materials represented by a specimen or observation or described
333
     * by a {@link DescriptionBase taxon or specimen description}.<BR>
334
     * In a {@link DescriptionBase description} it can be used as a {@link #Modifier} or
335
     * a {@link #Scope} and therefore it is a specialization of {@link #Scope}.<BR>
336
     * The kind-of-unit of a {@link SpecimenOrObservationBase specimen or observation}
337
     * should be added as an {@link SpecimenOrObservationBase#getKindOfUnit() kindOfUnit} attribute
338
     * if the specimen is only a part of an organism and this part is described by the part-of-unit.
339
     * If only a part of a specimen is described in a {@link SpecimenDescription specimen description}
340
     * the kind-of-unit should be used as a {@link DescriptionBase description} scope
341
     * (not yet implemented for specimen descriptions) or as a modifier in a
342
     * {@link DescriptionElementBase description item}.<BR><BR>
343
     *
344
     * Value examples are: fruits, seeds, tissue, gDNA, leaves, ... <BR>
345
     *
346
     * KindOfUnit is a Specialization of {@link #Scope}.
347
     *
348
     * @see SpecimenOrObservationBase#getKindOfUnit()
349
     * @see TaxonDescription#getScopes()
350
     * @see DescriptionElementBase#getModifiers()
351
     * @see StateData#getModifiers()
352
     */
353
    @XmlEnumValue("KindOfUnit")
354
    KindOfUnit(UUID.fromString("e3edf086-ff7b-4e58-ab1c-d509352fe5f4"), "Kind of Unit", "KOU", Scope),
355

    
356

    
357
    //27
358
    /**
359
     * The type represents the restriction concerning the sex for
360
     * the applicability of {@link TaxonDescription taxon descriptions} or others. The sex of a
361
     * {@link SpecimenOrObservationBase specimen or observation}
362
     * does not belong to a {@link SpecimenDescription specimen description} but is an attribute of
363
     * the specimen itself.<BR>
364
     *
365
     * Sex is a specialization of {@link #Scope}.
366
     */
367
    @XmlEnumValue("Sex")
368
    Sex(UUID.fromString("4046f91f-063b-4b84-b34a-6245c2abc06f"), "Sex", "SEX", Scope),
369

    
370
    //28
371
    /**
372
     * Term type for a reference system of a geographic information.
373
     * @see Point
374
     * @see Point#getReferenceSystem()
375
     */
376
    @XmlEnumValue("ReferenceSystem")
377
    ReferenceSystem(UUID.fromString("b8cfa986-ef90-465e-9609-1dadae2a0f5b"), "Reference System", "RS", null),
378

    
379
    //29
380
    /**
381
     * Term type for a term representing a state for {@link CategoricalData categorical data}
382
     * @see CategoricalData#getStateData()
383
     * @see StateData#getState()
384
     */
385
    @XmlEnumValue("State")
386
    State(UUID.fromString("5e5b8b60-7300-440a-8706-72fbf31a594f"), "State", "STA", null),
387

    
388
    //30
389
    /**
390
     * Term type representing a natural language term.
391
     */
392
    @XmlEnumValue("NaturalLanguageTerm")
393
    NaturalLanguageTerm(UUID.fromString("9a42ac4e-c175-4633-8b31-74ba8203566a"), "Natural Language Term", "NLT", null),
394

    
395

    
396
    //31
397
    /**
398
     * Term type for a text format.
399
     * @see TextData
400
     */
401
    @XmlEnumValue("TextFormat")
402
    TextFormat(UUID.fromString("d26cfdb4-baeb-43d0-a51b-a3428d838790"), "Text Format", "TF", null),
403

    
404
    //32
405
    /**
406
     * TODO
407
     *
408
     * Determination modifier is a specialization of {@link #Modifier}.
409
     */
410
    @XmlEnumValue("DeterminationModifier")
411
    DeterminationModifier(UUID.fromString("ce910516-bc5d-4ac5-be4d-f3c14c27dd85"), "Determination Modifier", "DMO", Modifier),
412

    
413
    //33
414
    /**
415
     * A marker is a region on a DNA which is addressed in an {@link Amplification amplification process}.
416
     * It is very similar to a locus, a term which is often used as a synonym. However, a locus is correctly
417
     * defining one concrete place on a given DNA and therefore is more specific. As this specific information
418
     * is usually not available the marker information is provided instead.
419
     * Sometimes marker information includes multiple markers. To handle this it was decided that for such
420
     * combined markers we need to create a new "parent" marker which includes the single markers as "partOf" marker.
421
     * However, this works only if you have a distinct marker hierarchy, so futuere
422
     * @see Amplification
423
     * @see Amplification#getMarker()
424
     * @see Sequencing
425
     * @see Sequencing#getMarker()
426
     */
427
    @XmlEnumValue("DnaMarker")
428
    DnaMarker(UUID.fromString("7fdddb4f-b0ec-4ce0-bc28-dc94e30e8252"), "DNA Marker", "DMA", null),
429

    
430
  //34
431
    /**
432
     * An Identifier Type which can be used as a type in {@link Identifier#type} . It may often be a global unique identifier such as DOI, LSID, Barcode ....
433
     * But also local identifier types such Sample Designation, Catalog Number,
434
     * Accession Number, ... are allowed.
435
     * {@link Identifier#type}
436
     */
437
    @XmlEnumValue("IdentifierType")
438
    IdentifierType(UUID.fromString("d24eda99-0716-467f-aa1e-4c0f2b6c3922"), "Identifier Type", "IDE", null),
439

    
440
    //35
441
    /**
442
     * DNA Quality levels {link {@link DnaQuality#getQualityTerm()} .
443
     */
444
    @XmlEnumValue("DnaQualityType")
445
    DnaQualityType(UUID.fromString("18049372-56e6-4d45-85fc-6a403fecb881"), "DNA Quality Type", "DQT", null),
446

    
447
    //36
448
    /**
449
     * {@link TaxonNodeAgentRelation#getType() TaxonNode Agent Relation Type}.
450
     * The role an agent plays for a taxon node (classification subtree).
451
     */
452
    @XmlEnumValue("DnaQualityType")
453
    TaxonNodeAgentRelationType(UUID.fromString("8e28881a-0744-41ff-a5ed-31246125c424"), "TaxonNode Agent Relation Type", "TART", null),
454

    
455
    //37
456
    /**
457
     * {@link eu.etaxonomy.cdm.model.description.Character#getStructure() biological structure}.
458
     * The physical structure that is part of a describing {@link Character}
459
     * @see TermType#Property
460
     */
461
    @XmlEnumValue("Structure")
462
    Structure(UUID.fromString("f9bc1d2d-85e8-4eab-81f0-603816f5e972"), "Structure", "STRU", null),
463

    
464
    //38
465
    /**
466
     * {@link eu.etaxonomy.cdm.model.description.Character#getProperty() Property} of a descriptive
467
     * {@link eu.etaxonomy.cdm.model.description.Character character}.<BR>
468
     * The property that together with a biological structure makes up a descriptive {@link Character character}
469
     * @see TermType#Property
470
     */
471
    @XmlEnumValue("Property")
472
    Property(UUID.fromString("bbe4730c-4c3f-4d89-9823-d144cc43baf5"), "Property", "PROP", null),
473

    
474
    //39
475
    /**
476
     * A modifier for {@link #Structure structures} used to define
477
     * spatial and maybe other modifiers.
478
     * StructureModifier is a specialization of {@link #Modifier}.
479
     *
480
     * @see Modifier
481
     * @see Character#getStructureModifier()
482
     * @see Character#getStructure()
483
     */
484
    @XmlEnumValue("StructureModifier")
485
    StructureModifier(UUID.fromString("41617e59-17c9-47f5-8fe6-319e117447ce"), "Structure Modifier", "STMO", Modifier),
486

    
487

    
488
    //40
489
    /**
490
     * The type for {@link Character characters}. Is subtype of {@link #Feature}
491
     * @see TermType#Feature
492
     * @deprecated not yet clear if really needed, might be replaced in future
493
     * by {@value TermType#Feature}
494
     */
495
    @XmlEnumValue("Character")
496
    @Deprecated
497
    Character(UUID.fromString("70baa056-4a3c-4a79-860f-934765c626c4"), "Character", "CHA", Feature),
498

    
499
    //41
500
    /**
501
     * The type for term relationships.
502
     **/
503
    @XmlEnumValue("TermRelationType")
504
    TermRelationType(UUID.fromString("2541032f-3d24-4ce0-a414-f028054f98ef"), "Term relation type", "TERT", null),
505

    
506
    ;
507

    
508

    
509
// **************** END ENUM **********************/
510

    
511
    @SuppressWarnings("unused")
512
    private static final Logger logger = Logger.getLogger(TermType.class);
513

    
514
    private TermType(UUID uuid, String defaultString, String key){
515
        this(uuid, defaultString, key, null);
516
    }
517

    
518
    private TermType(UUID uuid, String defaultString, String key, TermType parent){
519
        delegateVocTerm = EnumeratedTermVoc.addTerm(getClass(), this, uuid, defaultString, key, parent);
520
    }
521

    
522

    
523
    /**
524
     * Returns a defined term base object corresponding to this term type object
525
     *
526
     * @return a defined term base object
527
     */
528
    public DefinedTermBase getEmptyDefinedTermBase() {
529
        switch(this) {
530
            case DeterminationModifier:
531
            case StructureModifier:
532
            case Property:
533
            case Structure:
534
            case Modifier:
535
            case Scope:
536
            case Sex:
537
            case Stage:
538
            case KindOfUnit:
539
            case IdentifierType:
540
            case DnaMarker:
541
                return DefinedTerm.NewInstance(this, null, "Untitled", null);
542
            case AnnotationType:
543
                return eu.etaxonomy.cdm.model.common.AnnotationType.NewInstance(null, "Untitled", null);
544
            case Feature:
545
                return eu.etaxonomy.cdm.model.description.Feature.NewInstance(null, "Untitled", null);
546
            case Character:
547
                return eu.etaxonomy.cdm.model.description.Character.NewInstance(null, null, null, "Untitled", null);
548
            case State:
549
                return eu.etaxonomy.cdm.model.description.State.NewInstance(null, "Untitled", null);
550
            case MarkerType:
551
                return eu.etaxonomy.cdm.model.common.MarkerType.NewInstance(null, "Untitled", null);
552
            case ExtensionType:
553
                return eu.etaxonomy.cdm.model.common.ExtensionType.NewInstance(null, "Untitled", null);
554
            case NamedArea:
555
                return eu.etaxonomy.cdm.model.location.NamedArea.NewInstance(null, "Untitled", null);
556
            case NamedAreaLevel:
557
                return eu.etaxonomy.cdm.model.location.NamedAreaLevel.NewInstance(null, "Untitled", null);
558
            case NamedAreaType:
559
                return eu.etaxonomy.cdm.model.location.NamedAreaType.NewInstance(null, "Untitled", null);
560
            case PresenceAbsenceTerm:
561
                return eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm.NewPresenceInstance(null, "Untitled", null);
562
            default:
563
                return null;
564
        }
565
    }
566

    
567

    
568
// *************************** DELEGATE **************************************/
569

    
570
    private static EnumeratedTermVoc<TermType> delegateVoc;
571
    private IEnumTerm<TermType> delegateVocTerm;
572

    
573
    static {
574
        delegateVoc = EnumeratedTermVoc.getVoc(TermType.class);
575
    }
576

    
577
    @Override
578
    public String getKey(){return delegateVocTerm.getKey();}
579

    
580
    @Override
581
    public String getLabel(){return delegateVocTerm.getLabel();}
582

    
583
    @Override
584
    public String getLabel(Language language){return delegateVocTerm.getLabel(language);}
585

    
586
    @Override
587
    public UUID getUuid() {return delegateVocTerm.getUuid();}
588

    
589
    @Override
590
    public TermType getKindOf() {return delegateVocTerm.getKindOf();}
591

    
592
    @Override
593
    public Set<TermType> getGeneralizationOf() {return delegateVocTerm.getGeneralizationOf();}
594

    
595
    @Override
596
    public boolean isKindOf(TermType ancestor) {return delegateVocTerm.isKindOf(ancestor);	}
597

    
598
    @Override
599
    public Set<TermType> getGeneralizationOf(boolean recursive) {return delegateVocTerm.getGeneralizationOf(recursive);}
600

    
601
    public static TermType getByKey(String key){return delegateVoc.getByKey(key);}
602
    public static TermType getByUuid(UUID uuid) {return delegateVoc.getByUuid(uuid);}
603

    
604
}
605

    
(30-30/33)