Project

General

Profile

« Previous | Next » 

Revision 781c0880

Added by Andreas Müller 6 months ago

fix #10163 fix labels for "Orthography Conserved" and "Conserved Desig"

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/metadata/CdmMetaData.java
74 74
        V_05_27_00("5.27.0.0.20210913"),
75 75
        V_05_27_01("5.27.1.0.20210922"),
76 76
        V_05_29_00("5.29.0.0.20211122"),
77
        V_05_32_00("5.32.0.0.20220807")
77
        V_05_32_00("5.32.0.0.20220807"),
78
        V_05_33_00("5.33.0.0.20220807")
78 79
        ;
79 80
        private String versionString;
80 81
	    private CdmVersion(String versionString){
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v532_533/SchemaUpdater_5320_5330.java
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.v532_533;
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.v529_532.SchemaUpdater_5290_5320;
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 30.09.2022
29
 */
30
public class SchemaUpdater_5320_5330 extends SchemaUpdaterBase {
31

  
32
	@SuppressWarnings("unused")
33
	private static final Logger logger = LogManager.getLogger(SchemaUpdater_5320_5330.class);
34

  
35
	private static final CdmVersion startSchemaVersion = CdmVersion.V_05_22_00;
36
	private static final CdmVersion endSchemaVersion = CdmVersion.V_05_33_00;
37

  
38
// ********************** FACTORY METHOD *************************************
39

  
40
	public static SchemaUpdater_5320_5330 NewInstance() {
41
		return new SchemaUpdater_5320_5330();
42
	}
43

  
44
	protected SchemaUpdater_5320_5330() {
45
		super(startSchemaVersion.versionString(), endSchemaVersion.versionString());
46
	}
47

  
48
    @Override
49
    public ISchemaUpdater getPreviousUpdater() {
50
        return SchemaUpdater_5290_5320.NewInstance();
51
    }
52

  
53
    @Override
54
	protected List<ISchemaUpdaterStep> getUpdaterList() {
55

  
56
		String stepName;
57

  
58
		List<ISchemaUpdaterStep> stepList = new ArrayList<>();
59

  
60
		//#10163
61
        stepName = "Change label + desc. 'Conserved Desig' => 'Conservation Designated'";
62
        String uuidTerm = "4e9c9702-a74d-4033-9d47-792ad123712c";
63
        String description = "Conservation Designated";
64
        String label = "Conservation designated";
65
        String abbrev = null;
66
        UUID uuidLatin = Language.uuidLatin;  //not really true but all nom. status currently use Latin representations
67
        TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, UUID.fromString(uuidTerm), description, label, abbrev, uuidLatin);
68

  
69
        stepName = "Revert label + desc. for orth. cons. from incorrect 'Conservation Designated' => 'Orthography Conserved'";
70
        uuidTerm = "34a7d383-988b-4117-b8c0-52b947f8c711";
71
        description = "Orthography Conserved";
72
        label = "Orthography Conserved";
73
//        abbrev = null;
74
        uuidLatin = Language.uuidLatin;  //not really true but all nom. status currently use Latin representations
75
        TermRepresentationUpdater.NewInstanceWithTitleCache(stepList, stepName, UUID.fromString(uuidTerm), description, label, abbrev, uuidLatin);
76

  
77
		return stepList;
78
    }
79
}

Also available in: Unified diff