1
|
/**
|
2
|
* Copyright (C) 2009 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.v24_25;
|
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.ITermUpdater;
|
18
|
import eu.etaxonomy.cdm.database.update.ITermUpdaterStep;
|
19
|
import eu.etaxonomy.cdm.database.update.SingleTermUpdater;
|
20
|
import eu.etaxonomy.cdm.database.update.TermUpdaterBase;
|
21
|
import eu.etaxonomy.cdm.database.update.v25_30.TermUpdater_25_30;
|
22
|
import eu.etaxonomy.cdm.model.common.Language;
|
23
|
import eu.etaxonomy.cdm.model.description.Feature;
|
24
|
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
|
25
|
|
26
|
/**
|
27
|
* @author a.mueller
|
28
|
* @date 10.09.2010
|
29
|
*
|
30
|
*/
|
31
|
public class TermUpdater_24_25 extends TermUpdaterBase implements ITermUpdater {
|
32
|
@SuppressWarnings("unused")
|
33
|
private static final Logger logger = Logger.getLogger(TermUpdater_24_25.class);
|
34
|
|
35
|
public static final String startTermVersion = "2.4.2.2.201006011715";
|
36
|
private static final String endTermVersion = "2.5.0.0.201009211255";
|
37
|
|
38
|
// *************************** FACTORY **************************************/
|
39
|
|
40
|
public static TermUpdater_24_25 NewInstance(){
|
41
|
return new TermUpdater_24_25(startTermVersion, endTermVersion);
|
42
|
}
|
43
|
|
44
|
// *************************** CONSTRUCTOR ***********************************/
|
45
|
|
46
|
protected TermUpdater_24_25(String startTermVersion, String endTermVersion) {
|
47
|
super(startTermVersion, endTermVersion);
|
48
|
}
|
49
|
|
50
|
//
|
51
|
|
52
|
/* (non-Javadoc)
|
53
|
* @see eu.etaxonomy.cdm.database.update.ICdmUpdater#invoke()
|
54
|
*/
|
55
|
@Override
|
56
|
protected List<ITermUpdaterStep> getUpdaterList() {
|
57
|
List<ITermUpdaterStep> list = new ArrayList<ITermUpdaterStep>();
|
58
|
|
59
|
// comb. illeg.
|
60
|
UUID uuidTerm = UUID.fromString("d901d455-4e01-45cb-b653-01a840b97eed");
|
61
|
String description = "Combination Illegitimate";
|
62
|
String label = "Combination Illegitimate";
|
63
|
String abbrev = "comb. illeg.";
|
64
|
String dtype = NomenclaturalStatusType.class.getSimpleName();
|
65
|
UUID uuidVocabulary = UUID.fromString("bb28cdca-2f8a-4f11-9c21-517e9ae87f1f");
|
66
|
UUID uuidAfterTerm = UUID.fromString("f858e619-7b7f-4225-913b-880a2143ec83");
|
67
|
list.add( SingleTermUpdater.NewInstance("Add comb. illeg. status", uuidTerm, description, label, abbrev, dtype, uuidVocabulary, Language.uuidLatin, true, uuidAfterTerm));
|
68
|
|
69
|
//Habitat
|
70
|
uuidTerm = UUID.fromString("fb16929f-bc9c-456f-9d40-dec987b36438");
|
71
|
description = "Habitat";
|
72
|
label = "Habitat";
|
73
|
abbrev = "Habitat";
|
74
|
dtype = Feature.class.getSimpleName();
|
75
|
uuidVocabulary = uuidFeatureVocabulary;
|
76
|
uuidAfterTerm = null;
|
77
|
list.add( SingleTermUpdater.NewInstance("Add habitat feature", uuidTerm, description, label, abbrev, dtype, uuidVocabulary, Language.uuidEnglish, false, null));
|
78
|
|
79
|
//Habitat & Ecology
|
80
|
uuidTerm = UUID.fromString("9fdc4663-4d56-47d0-90b5-c0bf251bafbb");
|
81
|
description = "Habitat & Ecology";
|
82
|
label = "Habitat & Ecology";
|
83
|
abbrev = "Hab. & Ecol.";
|
84
|
dtype = Feature.class.getSimpleName();
|
85
|
uuidVocabulary = uuidFeatureVocabulary;
|
86
|
uuidAfterTerm = null;
|
87
|
list.add( SingleTermUpdater.NewInstance("Add habitat & ecology feature", uuidTerm, description, label, abbrev, dtype, uuidVocabulary, Language.uuidEnglish, false, null));
|
88
|
|
89
|
//Chromosome Numbers
|
90
|
uuidTerm = UUID.fromString("6f677e98-d8d5-4bc5-80bf-affdb7e3945a");
|
91
|
description = "Chromosome Numbers";
|
92
|
label = "Chromosome Numbers";
|
93
|
abbrev = "Chromosome Numbers";
|
94
|
dtype = Feature.class.getSimpleName();
|
95
|
uuidVocabulary = uuidFeatureVocabulary;
|
96
|
uuidAfterTerm = null;
|
97
|
list.add( SingleTermUpdater.NewInstance("Add chromosome number feature", uuidTerm, description, label, abbrev, dtype, uuidVocabulary, Language.uuidEnglish, false, null));
|
98
|
|
99
|
return list;
|
100
|
}
|
101
|
|
102
|
@Override
|
103
|
public ITermUpdater getNextUpdater() {
|
104
|
return TermUpdater_25_30.NewInstance();
|
105
|
}
|
106
|
|
107
|
@Override
|
108
|
public ITermUpdater getPreviousUpdater() {
|
109
|
return null;
|
110
|
}
|
111
|
|
112
|
}
|