Project

General

Profile

Revision 0621ff28

ID0621ff2871f64a634877abc0e4bc1c3cbedb81ef
Parent 51771266
Child 32dc6dc8

Added by Andreas Müller over 3 years ago

fix #7144 Add area level to countries

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/VocabularyEnum.java
42 42

  
43 43
	Language("45ac7043-7f5e-4f37-92f2-3874aaaef2de", Language.class),
44 44
	UndefinedLanguage("7fd1e6d0-2e76-4dfa-bad9-2673dd042c28", Language.class),
45
	Continent("e72cbcb6-58f8-4201-9774-15d0c6abc128", NamedArea.class),
45
	NamedAreaType("e51d52d6-965b-4f7d-900f-4ba9c6f5dd33", NamedAreaType.class),
46
    NamedAreaLevel("49034253-27c8-4219-97e8-f8d987d3d122", NamedAreaLevel.class),
47
    Continent("e72cbcb6-58f8-4201-9774-15d0c6abc128", NamedArea.class),
46 48
	Country("006b1870-7347-4624-990f-e5ed78484a1a", Country.class),
47 49
	Waterbody("35a62b25-f541-4f12-a7c7-17d90dec3e03", NamedArea.class),
48 50
	Rank("ef0d1ce1-26e3-4e83-b47b-ca74eed40b1b", Rank.class),
......
55 57
	TaxonRelationshipType("15db0cf7-7afc-4a86-a7d4-221c73b0c9ac", TaxonRelationshipType.class),
56 58
	MarkerType("19dffff7-e142-429c-a420-5d28e4ebe305", MarkerType.class),
57 59
	AnnotationType("ca04609b-1ba0-4d31-9c2e-aa8eb2f4e62d", AnnotationType.class),
58
	NamedAreaType("e51d52d6-965b-4f7d-900f-4ba9c6f5dd33", NamedAreaType.class),
59
	NamedAreaLevel("49034253-27c8-4219-97e8-f8d987d3d122", NamedAreaLevel.class),
60 60
	Feature("b187d555-f06f-4d65-9e53-da7c93f8eaa8", Feature.class),
61 61
	NameFeature("a7ca3eef-4092-49e1-beec-ed5096193e5e", Feature.class),
62 62
	TdwgArea("1fb40504-d1d7-44b0-9731-374fbe6cac77", NamedArea.class),
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/location/Country.java
636 636
			String text = csvLine.get(3).trim();
637 637
			String abbreviatedLabel = csvLine.get(2);
638 638
			newInstance.addRepresentation(Representation.NewInstance(text, label, abbreviatedLabel, lang) );
639
			newInstance.setLevel(NamedAreaLevel.COUNTRY());
639 640

  
640 641
			// iso codes extra
641 642
			newInstance.setIso3166_A2(csvLine.get(4).trim());
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v47_49/SchemaUpdater_47_49.java
213 213

  
214 214
        updateSpecimenTypeDesignationStatusOrder(stepList);
215 215

  
216
        //#7144 Set Country area level
217
        stepName = "Set Country area level";
218
        query = " UPDATE @@DefinedTermBase@@ " +
219
                " SET areaLevel_id = (SELECT id FROM DefinedTermBase WHERE uuid = '79db63a4-1563-461e-8e41-48f5722feca4') " +
220
                " WHERE DTYPE = 'Country' ";
221
        step = SimpleSchemaUpdaterStep.NewNonAuditedInstance(stepName, query, -99);
222
        stepList.add(step);
223

  
224

  
225

  
216 226
        //7276  Make User.emailAddress a unique field
217 227
        //TODO H2 / PostGreSQL / SQL Server
218 228
        //User.email unique

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)