2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.cdm
.database
.update
.v500_535
;
11 import java
.util
.ArrayList
;
12 import java
.util
.List
;
13 import java
.util
.UUID
;
15 import eu
.etaxonomy
.cdm
.database
.update
.ISchemaUpdater
;
16 import eu
.etaxonomy
.cdm
.database
.update
.ISchemaUpdaterStep
;
17 import eu
.etaxonomy
.cdm
.database
.update
.SchemaUpdaterBase
;
18 import eu
.etaxonomy
.cdm
.database
.update
.TermRepresentationUpdater
;
19 import eu
.etaxonomy
.cdm
.model
.metadata
.CdmMetaData
.CdmVersion
;
25 public class SchemaUpdater_5183_5184
extends SchemaUpdaterBase
{
27 private static final CdmVersion startSchemaVersion
= CdmVersion
.V_05_18_03
;
28 private static final CdmVersion endSchemaVersion
= CdmVersion
.V_05_18_04
;
30 // ********************** FACTORY METHOD *************************************
32 public static SchemaUpdater_5183_5184
NewInstance() {
33 return new SchemaUpdater_5183_5184();
36 protected SchemaUpdater_5183_5184() {
37 super(startSchemaVersion
.versionString(), endSchemaVersion
.versionString());
41 protected List
<ISchemaUpdaterStep
> getUpdaterList() {
43 List
<ISchemaUpdaterStep
> stepList
= new ArrayList
<>();
46 ProtologMover
.NewInstance(stepList
);
48 //#9263 use lower case for specimen type designation status
49 updateSpecimenTypeDesignationStatus(stepList
);
54 //#9263 use lower case for specimen type designation status
55 private void updateSpecimenTypeDesignationStatus(List
<ISchemaUpdaterStep
> stepList
) {
58 String stepName
= "Holotype => holotype";
59 UUID uuidTerm
= UUID
.fromString("a407dbc7-e60c-46ff-be11-eddf4c5a970d");
60 UUID uuidLanguage
= UUID
.fromString("e9f8cdb7-6819-44e8-95d3-e2d0690c3523");
61 String label
= "holotype";
62 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
63 label
, label
, null, uuidLanguage
);
66 stepName
= "Lectotype => lectotype";
67 uuidTerm
= UUID
.fromString("05002d46-083e-4b27-8731-2e7c28a8825c");
69 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
70 label
, label
, null, uuidLanguage
);
73 stepName
= "Isotype => isotype";
74 uuidTerm
= UUID
.fromString("93ef8257-0a08-47bb-9b36-542417ae7560");
76 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
77 label
, label
, null, uuidLanguage
);
80 stepName
= "Isolectotype => isolectotype";
81 uuidTerm
= UUID
.fromString("7a1a8a53-78f4-4fc0-89f7-782e94992d08");
82 label
= "isolectotype";
83 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
84 label
, label
, null, uuidLanguage
);
87 stepName
= "Syntype => syntype";
88 uuidTerm
= UUID
.fromString("f3b60bdb-4638-4ca9-a0c7-36e77d8459bb");
90 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
91 label
, label
, null, uuidLanguage
);
94 stepName
= "Isosyntype => isosyntype";
95 uuidTerm
= UUID
.fromString("052a5ff0-8e9a-4355-b24f-5e4bb6071f44");
97 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
98 label
, label
, null, uuidLanguage
);
101 stepName
= "Neotype => neotype";
102 uuidTerm
= UUID
.fromString("26e13359-8f77-4e40-a85a-56c01782fce0");
104 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
105 label
, label
, null, uuidLanguage
);
108 stepName
= "Isoneotype => isoneotype";
109 uuidTerm
= UUID
.fromString("7afc2f4f-f70a-4aa5-80a5-87764f746bde");
110 label
= "isoneotype";
111 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
112 label
, label
, null, uuidLanguage
);
115 stepName
= "Epitype => epitype";
116 uuidTerm
= UUID
.fromString("989a2715-71d5-4fbe-aa9a-db9168353744");
118 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
119 label
, label
, null, uuidLanguage
);
122 stepName
= "Isoepitype => isoepitype";
123 uuidTerm
= UUID
.fromString("95b90696-e103-4bc0-b60b-c594983fb566");
124 label
= "isoepitype";
125 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
126 label
, label
, null, uuidLanguage
);
129 stepName
= "Paratype => paratype";
130 uuidTerm
= UUID
.fromString("eb7df2e5-d9a7-479d-970c-c6f2b0a761d7");
132 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
133 label
, label
, null, uuidLanguage
);
136 stepName
= "Isoparatype => isoparatype";
137 uuidTerm
= UUID
.fromString("497137f3-b614-4183-8a22-97fcd6e2bdd8");
138 label
= "isoparatype";
139 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
140 label
, label
, null, uuidLanguage
);
143 stepName
= "Paralectotype => paralectotype";
144 uuidTerm
= UUID
.fromString("7244bc51-14d8-41a6-9524-7dc5303bba29");
145 label
= "paralectotype";
146 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
147 label
, label
, null, uuidLanguage
);
150 stepName
= "Paraneotype => paraneotype";
151 uuidTerm
= UUID
.fromString("0c39e2a5-2fe0-4d4f-819a-f609b5340339");
152 label
= "paraneotype";
153 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
154 label
, label
, null, uuidLanguage
);
156 //second step lectotype
157 stepName
= "Second Step Lectotype => second step lectotype";
158 uuidTerm
= UUID
.fromString("01d91053-7004-4984-aa0d-9f4de59d6205");
159 label
= "second step lectotype";
160 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
161 label
, label
, null, uuidLanguage
);
163 //second step neotype
164 stepName
= "Second Step Neotype => second step neotype";
165 uuidTerm
= UUID
.fromString("8d2fed1f-242e-4bcf-bbd7-e85133e479dc");
166 label
= "second step neotype";
167 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
168 label
, label
, null, uuidLanguage
);
171 stepName
= "original material => original material";
172 uuidTerm
= UUID
.fromString("49c96cae-6be6-401e-9b36-1bc12d9dc8f9");
173 label
= "original material";
174 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
175 label
, label
, null, uuidLanguage
);
178 stepName
= "Iconotype => iconotype";
179 uuidTerm
= UUID
.fromString("643513d0-32f5-46ba-840b-d9b9caf8160f");
181 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
182 label
, label
, null, uuidLanguage
);
185 stepName
= "Pphototype => phototype";
186 uuidTerm
= UUID
.fromString("b7807acc-f559-474e-ad4a-e7a41e085e34");
188 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
189 label
, label
, null, uuidLanguage
);
192 stepName
= "Unspecified => unspecified";
193 uuidTerm
= UUID
.fromString("230fd762-b143-49de-ac2e-744bcc48a63b");
194 label
= "unspecified";
195 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
196 label
, label
, null, uuidLanguage
);
198 //unknown type category
199 stepName
= "Unknown Type Category => unknown type category";
200 uuidTerm
= UUID
.fromString("7194020b-a326-4b47-9bfe-9f31a30aba7f");
201 label
= "unknown type category";
202 TermRepresentationUpdater
.NewInstanceWithTitleCache(stepList
, stepName
, uuidTerm
,
203 label
, label
, null, uuidLanguage
);
208 public ISchemaUpdater
getPreviousUpdater() {
209 return SchemaUpdater_5182_5183
.NewInstance();