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