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
|
package eu.etaxonomy.cdm.database.update.v515_518;
|
10
|
|
11
|
import java.util.ArrayList;
|
12
|
import java.util.List;
|
13
|
import java.util.UUID;
|
14
|
|
15
|
import org.apache.log4j.Logger;
|
16
|
|
17
|
import eu.etaxonomy.cdm.database.update.ISchemaUpdater;
|
18
|
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
|
19
|
import eu.etaxonomy.cdm.database.update.SchemaUpdaterBase;
|
20
|
import eu.etaxonomy.cdm.database.update.TermRepresentationUpdater;
|
21
|
import eu.etaxonomy.cdm.model.metadata.CdmMetaData.CdmVersion;
|
22
|
|
23
|
/**
|
24
|
* @author a.mueller
|
25
|
* @date 20.10.2020
|
26
|
*/
|
27
|
public class SchemaUpdater_5183_5184 extends SchemaUpdaterBase {
|
28
|
|
29
|
@SuppressWarnings("unused")
|
30
|
private static final Logger logger = Logger.getLogger(SchemaUpdater_5183_5184.class);
|
31
|
|
32
|
private static final CdmVersion startSchemaVersion = CdmVersion.V_05_18_03;
|
33
|
private static final CdmVersion endSchemaVersion = CdmVersion.V_05_18_04;
|
34
|
|
35
|
// ********************** FACTORY METHOD *************************************
|
36
|
|
37
|
public static SchemaUpdater_5183_5184 NewInstance() {
|
38
|
return new SchemaUpdater_5183_5184();
|
39
|
}
|
40
|
|
41
|
protected SchemaUpdater_5183_5184() {
|
42
|
super(startSchemaVersion.versionString(), endSchemaVersion.versionString());
|
43
|
}
|
44
|
|
45
|
@Override
|
46
|
protected List<ISchemaUpdaterStep> getUpdaterList() {
|
47
|
|
48
|
List<ISchemaUpdaterStep> stepList = new ArrayList<>();
|
49
|
|
50
|
//#6589
|
51
|
ProtologMover.NewInstance(stepList);
|
52
|
|
53
|
//#9263 use lower case for specimen type designation status
|
54
|
updateSpecimenTypeDesignationStatus(stepList);
|
55
|
|
56
|
return stepList;
|
57
|
}
|
58
|
|
59
|
//#9263 use lower case for specimen type designation status
|
60
|
private void updateSpecimenTypeDesignationStatus(List<ISchemaUpdaterStep> stepList) {
|
61
|
|
62
|
//holotype
|
63
|
String stepName = "Holotype => holotype";
|
64
|
UUID uuidTerm = UUID.fromString("a407dbc7-e60c-46ff-be11-eddf4c5a970d");
|
65
|
UUID uuidLanguage = UUID.fromString("e9f8cdb7-6819-44e8-95d3-e2d0690c3523");
|
66
|
String label = "holotype";
|
67
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
68
|
label, label, null, uuidLanguage);
|
69
|
|
70
|
//lectotype
|
71
|
stepName = "Lectotype => lectotype";
|
72
|
uuidTerm = UUID.fromString("05002d46-083e-4b27-8731-2e7c28a8825c");
|
73
|
label = "lectotype";
|
74
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
75
|
label, label, null, uuidLanguage);
|
76
|
|
77
|
//isotype
|
78
|
stepName = "Isotype => isotype";
|
79
|
uuidTerm = UUID.fromString("93ef8257-0a08-47bb-9b36-542417ae7560");
|
80
|
label = "isotype";
|
81
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
82
|
label, label, null, uuidLanguage);
|
83
|
|
84
|
//isolectotype
|
85
|
stepName = "Isolectotype => isolectotype";
|
86
|
uuidTerm = UUID.fromString("7a1a8a53-78f4-4fc0-89f7-782e94992d08");
|
87
|
label = "isolectotype";
|
88
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
89
|
label, label, null, uuidLanguage);
|
90
|
|
91
|
//syntype
|
92
|
stepName = "Syntype => syntype";
|
93
|
uuidTerm = UUID.fromString("f3b60bdb-4638-4ca9-a0c7-36e77d8459bb");
|
94
|
label = "syntype";
|
95
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
96
|
label, label, null, uuidLanguage);
|
97
|
|
98
|
//isosyntype
|
99
|
stepName = "Isosyntype => isosyntype";
|
100
|
uuidTerm = UUID.fromString("052a5ff0-8e9a-4355-b24f-5e4bb6071f44");
|
101
|
label = "isosyntype";
|
102
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
103
|
label, label, null, uuidLanguage);
|
104
|
|
105
|
//neotype
|
106
|
stepName = "Neotype => neotype";
|
107
|
uuidTerm = UUID.fromString("26e13359-8f77-4e40-a85a-56c01782fce0");
|
108
|
label = "neotype";
|
109
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
110
|
label, label, null, uuidLanguage);
|
111
|
|
112
|
//isoneotype
|
113
|
stepName = "Isoneotype => isoneotype";
|
114
|
uuidTerm = UUID.fromString("7afc2f4f-f70a-4aa5-80a5-87764f746bde");
|
115
|
label = "isoneotype";
|
116
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
117
|
label, label, null, uuidLanguage);
|
118
|
|
119
|
//epitype
|
120
|
stepName = "Epitype => epitype";
|
121
|
uuidTerm = UUID.fromString("989a2715-71d5-4fbe-aa9a-db9168353744");
|
122
|
label = "epitype";
|
123
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
124
|
label, label, null, uuidLanguage);
|
125
|
|
126
|
//isoepitype
|
127
|
stepName = "Isoepitype => isoepitype";
|
128
|
uuidTerm = UUID.fromString("95b90696-e103-4bc0-b60b-c594983fb566");
|
129
|
label = "isoepitype";
|
130
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
131
|
label, label, null, uuidLanguage);
|
132
|
|
133
|
//paratype
|
134
|
stepName = "Paratype => paratype";
|
135
|
uuidTerm = UUID.fromString("eb7df2e5-d9a7-479d-970c-c6f2b0a761d7");
|
136
|
label = "paratype";
|
137
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
138
|
label, label, null, uuidLanguage);
|
139
|
|
140
|
//isoparatype
|
141
|
stepName = "Isoparatype => isoparatype";
|
142
|
uuidTerm = UUID.fromString("497137f3-b614-4183-8a22-97fcd6e2bdd8");
|
143
|
label = "isoparatype";
|
144
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
145
|
label, label, null, uuidLanguage);
|
146
|
|
147
|
//paralectotype
|
148
|
stepName = "Paralectotype => paralectotype";
|
149
|
uuidTerm = UUID.fromString("7244bc51-14d8-41a6-9524-7dc5303bba29");
|
150
|
label = "paralectotype";
|
151
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
152
|
label, label, null, uuidLanguage);
|
153
|
|
154
|
//paraneotype
|
155
|
stepName = "Paraneotype => paraneotype";
|
156
|
uuidTerm = UUID.fromString("0c39e2a5-2fe0-4d4f-819a-f609b5340339");
|
157
|
label = "paraneotype";
|
158
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
159
|
label, label, null, uuidLanguage);
|
160
|
|
161
|
//second step lectotype
|
162
|
stepName = "Second Step Lectotype => second step lectotype";
|
163
|
uuidTerm = UUID.fromString("01d91053-7004-4984-aa0d-9f4de59d6205");
|
164
|
label = "second step lectotype";
|
165
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
166
|
label, label, null, uuidLanguage);
|
167
|
|
168
|
//second step neotype
|
169
|
stepName = "Second Step Neotype => second step neotype";
|
170
|
uuidTerm = UUID.fromString("8d2fed1f-242e-4bcf-bbd7-e85133e479dc");
|
171
|
label = "second step neotype";
|
172
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
173
|
label, label, null, uuidLanguage);
|
174
|
|
175
|
//original material
|
176
|
stepName = "original material => original material";
|
177
|
uuidTerm = UUID.fromString("49c96cae-6be6-401e-9b36-1bc12d9dc8f9");
|
178
|
label = "original material";
|
179
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
180
|
label, label, null, uuidLanguage);
|
181
|
|
182
|
//iconotype
|
183
|
stepName = "Iconotype => iconotype";
|
184
|
uuidTerm = UUID.fromString("643513d0-32f5-46ba-840b-d9b9caf8160f");
|
185
|
label = "iconotype";
|
186
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
187
|
label, label, null, uuidLanguage);
|
188
|
|
189
|
//phototype
|
190
|
stepName = "Pphototype => phototype";
|
191
|
uuidTerm = UUID.fromString("b7807acc-f559-474e-ad4a-e7a41e085e34");
|
192
|
label = "phototype";
|
193
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
194
|
label, label, null, uuidLanguage);
|
195
|
|
196
|
//unspecified
|
197
|
stepName = "Unspecified => unspecified";
|
198
|
uuidTerm = UUID.fromString("230fd762-b143-49de-ac2e-744bcc48a63b");
|
199
|
label = "unspecified";
|
200
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
201
|
label, label, null, uuidLanguage);
|
202
|
|
203
|
//unknown type category
|
204
|
stepName = "Unknown Type Category => unknown type category";
|
205
|
uuidTerm = UUID.fromString("7194020b-a326-4b47-9bfe-9f31a30aba7f");
|
206
|
label = "unknown type category";
|
207
|
TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, uuidTerm,
|
208
|
label, label, null, uuidLanguage);
|
209
|
|
210
|
}
|
211
|
|
212
|
@Override
|
213
|
public ISchemaUpdater getPreviousUpdater() {
|
214
|
return SchemaUpdater_5182_5183.NewInstance();
|
215
|
}
|
216
|
|
217
|
@Override
|
218
|
public ISchemaUpdater getNextUpdater() {
|
219
|
return null;
|
220
|
}
|
221
|
}
|