|
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.v529_532;
|
|
10 |
|
|
11 |
import java.util.ArrayList;
|
|
12 |
import java.util.List;
|
|
13 |
import java.util.UUID;
|
|
14 |
|
|
15 |
import org.apache.logging.log4j.LogManager;
|
|
16 |
import org.apache.logging.log4j.Logger;
|
|
17 |
|
|
18 |
import eu.etaxonomy.cdm.database.update.ISchemaUpdater;
|
|
19 |
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
|
|
20 |
import eu.etaxonomy.cdm.database.update.SchemaUpdaterBase;
|
|
21 |
import eu.etaxonomy.cdm.database.update.TermRepresentationUpdater;
|
|
22 |
import eu.etaxonomy.cdm.database.update.v527_529.SchemaUpdater_5271_5290;
|
|
23 |
import eu.etaxonomy.cdm.model.common.Language;
|
|
24 |
import eu.etaxonomy.cdm.model.metadata.CdmMetaData.CdmVersion;
|
|
25 |
|
|
26 |
/**
|
|
27 |
* @author a.mueller
|
|
28 |
* @date 08.07.2022
|
|
29 |
*/
|
|
30 |
public class SchemaUpdater_5290_5320 extends SchemaUpdaterBase {
|
|
31 |
|
|
32 |
@SuppressWarnings("unused")
|
|
33 |
private static final Logger logger = LogManager.getLogger(SchemaUpdater_5290_5320.class);
|
|
34 |
|
|
35 |
private static final CdmVersion startSchemaVersion = CdmVersion.V_05_29_00;
|
|
36 |
private static final CdmVersion endSchemaVersion = CdmVersion.V_05_32_00;
|
|
37 |
|
|
38 |
// ********************** FACTORY METHOD *************************************
|
|
39 |
|
|
40 |
public static SchemaUpdater_5290_5320 NewInstance() {
|
|
41 |
return new SchemaUpdater_5290_5320();
|
|
42 |
}
|
|
43 |
|
|
44 |
protected SchemaUpdater_5290_5320() {
|
|
45 |
super(startSchemaVersion.versionString(), endSchemaVersion.versionString());
|
|
46 |
}
|
|
47 |
|
|
48 |
@Override
|
|
49 |
public ISchemaUpdater getPreviousUpdater() {
|
|
50 |
return SchemaUpdater_5271_5290.NewInstance();
|
|
51 |
}
|
|
52 |
|
|
53 |
@Override
|
|
54 |
protected List<ISchemaUpdaterStep> getUpdaterList() {
|
|
55 |
|
|
56 |
String stepName;
|
|
57 |
String tableName;
|
|
58 |
|
|
59 |
List<ISchemaUpdaterStep> stepList = new ArrayList<>();
|
|
60 |
|
|
61 |
//#10083 Update inverse representation of 'is blocking name for'
|
|
62 |
stepName = "Update inverse representation of 'is blocking name for'";
|
|
63 |
UUID uuidTerm = UUID.fromString("1dab357f-2e12-4511-97a4-e5153589e6a6");
|
|
64 |
String description = "has blocking name";
|
|
65 |
String label = "has blocking name";
|
|
66 |
String abbrev = null;
|
|
67 |
UUID uuidEnglish = Language.uuidEnglish;
|
|
68 |
TermRepresentationUpdater.NewInverseInstance(stepList, stepName, uuidTerm, description, label, abbrev, uuidEnglish);
|
|
69 |
|
|
70 |
|
|
71 |
return stepList;
|
|
72 |
}
|
|
73 |
}
|
ref #10083 update script for blocking reverse label and schema updater for v5.32