1
|
/**
|
2
|
* Copyright (C) 2017 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
|
package eu.etaxonomy.cdm.vaadin.model.registration;
|
10
|
|
11
|
import java.util.UUID;
|
12
|
|
13
|
import eu.etaxonomy.cdm.model.common.DefinedTerm;
|
14
|
import eu.etaxonomy.cdm.model.common.TermType;
|
15
|
import eu.etaxonomy.cdm.model.common.TermVocabulary;
|
16
|
|
17
|
/**
|
18
|
* Terms to be used as kindOfUnit for {@link SpecimenOrObservationBase#setKindOfUnit()}.
|
19
|
* These terms are specific to the phycobank project but are temporarily necessary in
|
20
|
* cdmlib-services for {@link SpecimenTypeDesignationDTO}
|
21
|
*
|
22
|
*
|
23
|
* @author a.kohlbecker
|
24
|
* @since Jun 20, 2017
|
25
|
*
|
26
|
*/
|
27
|
public class KindOfUnitTerms {
|
28
|
|
29
|
private static final UUID UUID_SPECIMEN = UUID.fromString("0944290a-1ac1-479b-9826-22d68d9418d1");
|
30
|
private static final UUID UUID_PUBLISHED_IMAGE = UUID.fromString("2f1aaff2-0af5-468a-890f-6de219f6c6fd");
|
31
|
private static final UUID UUID_UNPUBLISHED_IMAGE = UUID.fromString("87adcd8d-ce69-4d16-ac35-4e77fb698e00");
|
32
|
private static final UUID UUID_CULTURE_METABOLIC_INACTIVE = UUID.fromString("fc1ac3b2-fde4-43c0-a100-48053b88c550");
|
33
|
|
34
|
private static final UUID UUID_KIND_OF_UNIT_VOCAB = UUID.fromString("88b7e7ab-ab99-4760-9b66-c070b98148fc");
|
35
|
|
36
|
private static DefinedTerm specimen = null;
|
37
|
private static DefinedTerm publishedImage = null;
|
38
|
private static DefinedTerm unpublishedImage = null;
|
39
|
private static DefinedTerm cultureMetabolicInactive = null;
|
40
|
|
41
|
private static TermVocabulary<DefinedTerm> kindOfUnitVocabulary = null;
|
42
|
|
43
|
public static DefinedTerm SPECIMEN() {
|
44
|
if(specimen == null){
|
45
|
specimen = DefinedTerm.NewInstance(TermType.KindOfUnit, "Specimen", "Specimen", "");
|
46
|
specimen.setUuid(UUID_SPECIMEN);
|
47
|
}
|
48
|
return specimen;
|
49
|
}
|
50
|
|
51
|
public static DefinedTerm PUBLISHED_IMAGE() {
|
52
|
if(publishedImage == null){
|
53
|
publishedImage = DefinedTerm.NewInstance(TermType.KindOfUnit, "Published image", "Published image", "");
|
54
|
publishedImage.setUuid(UUID_PUBLISHED_IMAGE);
|
55
|
}
|
56
|
return publishedImage;
|
57
|
}
|
58
|
|
59
|
public static DefinedTerm UNPUBLISHED_IMAGE() {
|
60
|
if(unpublishedImage == null){
|
61
|
unpublishedImage = DefinedTerm.NewInstance(TermType.KindOfUnit, "Unpublished image", "Unpublished image", "");
|
62
|
unpublishedImage.setUuid(UUID_UNPUBLISHED_IMAGE);
|
63
|
}
|
64
|
return unpublishedImage;
|
65
|
}
|
66
|
|
67
|
public static DefinedTerm CULTURE_METABOLIC_INACTIVE() {
|
68
|
if(cultureMetabolicInactive == null){
|
69
|
cultureMetabolicInactive = DefinedTerm.NewInstance(TermType.KindOfUnit, "Metabolic inactive cuture", "Metabolic inactive cuture", "");
|
70
|
cultureMetabolicInactive.setUuid(UUID_CULTURE_METABOLIC_INACTIVE);
|
71
|
}
|
72
|
return cultureMetabolicInactive;
|
73
|
}
|
74
|
|
75
|
public static TermVocabulary<DefinedTerm> KIND_OF_UNIT_VOCABULARY() {
|
76
|
if(kindOfUnitVocabulary == null){
|
77
|
kindOfUnitVocabulary = TermVocabulary.NewInstance(TermType.KindOfUnit);
|
78
|
kindOfUnitVocabulary.setTitleCache("Registration Kind-of-Units", true);
|
79
|
kindOfUnitVocabulary.setUuid(UUID_KIND_OF_UNIT_VOCAB);
|
80
|
}
|
81
|
return kindOfUnitVocabulary;
|
82
|
}
|
83
|
|
84
|
}
|