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
|
|
10
|
package eu.etaxonomy.cdm.io.pesi.erms;
|
11
|
|
12
|
import java.util.HashMap;
|
13
|
import java.util.Map;
|
14
|
import java.util.UUID;
|
15
|
|
16
|
import org.apache.commons.lang.StringUtils;
|
17
|
import org.apache.log4j.Logger;
|
18
|
|
19
|
import eu.etaxonomy.cdm.io.common.DbImportStateBase;
|
20
|
import eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase;
|
21
|
import eu.etaxonomy.cdm.io.common.mapping.UndefinedTransformerMethodException;
|
22
|
import eu.etaxonomy.cdm.model.common.ExtensionType;
|
23
|
import eu.etaxonomy.cdm.model.common.Language;
|
24
|
import eu.etaxonomy.cdm.model.common.RelationshipTermBase;
|
25
|
import eu.etaxonomy.cdm.model.description.Feature;
|
26
|
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
|
27
|
import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
|
28
|
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
|
29
|
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
|
30
|
import eu.etaxonomy.cdm.model.taxon.SynonymType;
|
31
|
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
|
32
|
import eu.etaxonomy.cdm.model.term.TermType;
|
33
|
import eu.etaxonomy.cdm.model.term.TermVocabulary;
|
34
|
|
35
|
/**
|
36
|
* @author a.mueller
|
37
|
* @since 01.03.2010
|
38
|
*/
|
39
|
public final class ErmsTransformer extends InputTransformerBase {
|
40
|
|
41
|
private static final long serialVersionUID = 1777919792691129468L;
|
42
|
private static final Logger logger = Logger.getLogger(ErmsTransformer.class);
|
43
|
|
44
|
public static final int SOURCE_USE_ORIGINAL_DESCRIPTION = 1;
|
45
|
public static final int SOURCE_USE_BASIS_OF_RECORD = 2;
|
46
|
public static final int SOURCE_USE_ADDITIONAL_SOURCE = 3;
|
47
|
public static final int SOURCE_USE_SOURCE_OF_SYNONYMY = 4;
|
48
|
public static final int SOURCE_USE_REDESCRIPTION = 5;
|
49
|
public static final int SOURCE_USE_NEW_COMBINATION_REFERENCE = 6;
|
50
|
public static final int SOURCE_USE_STATUS_SOURCE = 7;
|
51
|
public static final int SOURCE_USE_EMENDATION = 8;
|
52
|
|
53
|
public static final String SOURCE_USE_STR_BASIS_OF_RECORD = "basis of record";
|
54
|
|
55
|
//nomenclatural status tpye uuids
|
56
|
public static final UUID uuidNomStatusSpeciesInquirenda = UUID.fromString("7790a4e2-d071-499c-8f25-a5ae34fd2dfb");
|
57
|
public static final UUID uuidNomStatusAlternateRepresentation = UUID.fromString("bb746f99-5c46-4b6b-963a-8aff1b04f22b");
|
58
|
|
59
|
//rank uuids
|
60
|
public static final UUID uuidRankSuperdomain = UUID.fromString("66d4d773-4946-4e02-b758-8903563eaa26");
|
61
|
public static final UUID uuidRankSubterclass = UUID.fromString("39257363-913b-4b3a-a536-b415360dfc8c");
|
62
|
public static final UUID uuidRankParvorder = UUID.fromString("d26b8cae-96f9-4aee-81f2-98e36f1db7c3");
|
63
|
|
64
|
//area uuids
|
65
|
public static final UUID uuidVocErmsAreas = UUID.fromString("7e6daf5e-f536-4c0c-8967-1400a45f7b4a");
|
66
|
public static final UUID uuidAdriaticSea = UUID.fromString("da376165-f970-4f0c-99db-773686d66591");
|
67
|
public static final UUID uuidAegeanSea = UUID.fromString("65d6c443-225f-4ac0-9c86-da51502b46df");
|
68
|
public static final UUID uuidArchipelagoSea = UUID.fromString("d9ea9d63-ec4d-4b01-967d-13f28b09a715");
|
69
|
public static final UUID uuidBalticProper = UUID.fromString("12ddfcad-bf8f-43d8-a772-15ae69d37b20");
|
70
|
public static final UUID uuidBalearSea = UUID.fromString("478f30f0-01b1-4772-9d01-3a0a571f41c3");
|
71
|
public static final UUID uuidBalticSea = UUID.fromString("0031cda2-4b27-49de-afa3-fdec75ee5060");
|
72
|
public static final UUID uuidBarentszSea = UUID.fromString("b6fd9a4d-0ad0-4481-a0b4-5dd71c8fda8b");
|
73
|
public static final UUID uuidBelgianExclusiveEconomicZone = UUID.fromString("02138b0f-cee1-4c56-ae12-72a5b36839af");
|
74
|
public static final UUID uuidBaeltSea = UUID.fromString("780f4144-f157-45e8-ae42-cacb3ec369ba");
|
75
|
public static final UUID uuidBiscayBay = UUID.fromString("36ffc01e-85a2-4f71-91fd-012d0b1eeff5");
|
76
|
public static final UUID uuidBlackSea = UUID.fromString("1f110909-7462-4ee8-a7ff-9f976701dd1d");
|
77
|
public static final UUID uuidBothnianSea = UUID.fromString("926f7fa3-b0a4-4763-85eb-4c3804a72333");
|
78
|
public static final UUID uuidBulgarianExclusiveEconomicZone = UUID.fromString("13e5aa21-3971-4d06-bc34-ed75a31c2f66");
|
79
|
public static final UUID uuidCaspianSea = UUID.fromString("0d3c3850-0cec-48d0-ac0d-9cbcc2c60552");
|
80
|
public static final UUID uuidCroatianExclusiveEconomicZone = UUID.fromString("028b045a-b1bd-4a72-a4c2-a3d0473b8257");
|
81
|
public static final UUID uuidDanishExclusiveEconomicZone = UUID.fromString("53d5a8bd-804b-4cbb-b5ad-f47ff6433db0");
|
82
|
public static final UUID uuidDutchExclusiveEconomicZone = UUID.fromString("a1bd019e-e2af-41c8-a5e4-c7245b575759");
|
83
|
public static final UUID uuidEgyptianExclusiveEconomicZone = UUID.fromString("e542bcfd-0ff1-49ac-a6ae-c0b3db39e560");
|
84
|
public static final UUID uuidEnglishChannel = UUID.fromString("3ed96112-bb4a-47df-b489-2c198d6f0fd2");
|
85
|
public static final UUID uuidEstonianExclusiveEconomicZone = UUID.fromString("ed17f07b-357f-4b4a-9653-3a564fdd32e5");
|
86
|
public static final UUID uuidEuropeanMarineWaters = UUID.fromString("47389e42-3b3c-4873-bded-ac030db86462");
|
87
|
public static final UUID uuidFrenchExclusiveEconomicZone = UUID.fromString("9f6a61c0-c329-4a61-a47a-f5f383737c36");
|
88
|
public static final UUID uuidGermanExclusiveEconomicZone = UUID.fromString("a6dbea03-090f-4f5f-bf5e-27a00ab4cc1d");
|
89
|
public static final UUID uuidIcelandicExclusiveEconomicZone = UUID.fromString("a121a8fb-6287-4661-9228-0816affdf3f5");
|
90
|
public static final UUID uuidIrishExclusiveeconomicZone = UUID.fromString("c8fe2626-53d2-4eaa-962b-99662470b96e");
|
91
|
public static final UUID uuidIrishSea = UUID.fromString("9e972ad5-b153-419e-ab7e-935b93ff881b");
|
92
|
public static final UUID uuidItalianExclusiveEconomicZone = UUID.fromString("10557c6f-a33f-443a-ad8b-cd31c105bddd");
|
93
|
public static final UUID uuidLebaneseExclusiveEconomicZone = UUID.fromString("d9f7dc8b-9041-4206-bf5f-5226c42a5978");
|
94
|
public static final UUID uuidMadeiranExclusiveEconomicZone = UUID.fromString("c00f442a-4c08-4452-b979-825fa3ff97b2");
|
95
|
public static final UUID uuidMarmaraSea = UUID.fromString("3db5d470-3265-4187-ba5a-01ecfb94ce6e");
|
96
|
public static final UUID uuidMediterraneanSea = UUID.fromString("bde8a624-23c4-4ac3-b381-11287f5d656a");
|
97
|
public static final UUID uuidMoroccanExclusiveEconomicZone = UUID.fromString("e62e5cc2-922f-4807-abd6-1b4bffbced49");
|
98
|
public static final UUID uuidNorthBalticproper = UUID.fromString("183ec305-1e9e-4cb1-93cc-703bd64de28f");
|
99
|
public static final UUID uuidNorthSea = UUID.fromString("d5ea2d46-ed97-4996-8702-0619231626b6");
|
100
|
public static final UUID uuidNorwegianSea = UUID.fromString("c6c44372-a963-41b2-8c12-a0b46425c523");
|
101
|
public static final UUID uuidNorwegianExclusiveEconomicZone = UUID.fromString("bd317f3e-9719-4943-ae3e-19ff0c9761be");
|
102
|
public static final UUID uuidPortugueseExclusiveEconomicZone = UUID.fromString("642336f3-41cb-4546-9a1c-ffeccbad2ef5");
|
103
|
public static final UUID uuidSeaofAzov = UUID.fromString("5b02cb7e-8a83-446c-af47-936a2ea31a8a");
|
104
|
public static final UUID uuidSkagerrak = UUID.fromString("5f63ece2-d112-4b39-80a0-bffb6c78654c");
|
105
|
public static final UUID uuidSouthBalticproper = UUID.fromString("1c2a672d-4948-455d-9877-42a8da1ff1d0");
|
106
|
public static final UUID uuidSpanishExclusiveEconomicZone = UUID.fromString("68c2823a-2173-4c31-89e8-bc1439abf448");
|
107
|
public static final UUID uuidSpanishExclusiveEconomicZoneMediterraneanpart = UUID.fromString("94ccf304-9687-41b6-a14b-019509adb723");
|
108
|
public static final UUID uuidSwedishExclusiveEconomicZone = UUID.fromString("94b0e605-d241-44e1-a301-d8911c34fdef");
|
109
|
public static final UUID uuidTirrenoSea = UUID.fromString("6e4f8a9d-ca6e-4b23-9211-446fac35a052");
|
110
|
public static final UUID uuidTunisianExclusiveEconomicZone = UUID.fromString("b5972b59-6a36-45ea-88f7-0c520c99b99d");
|
111
|
public static final UUID uuidTurkishExclusiveEconomicZone = UUID.fromString("3d552e73-2bf5-4f36-8a91-94fbead970e5");
|
112
|
public static final UUID uuidUkrainianExclusiveEconomicZone = UUID.fromString("b7335968-e34f-412c-91a5-5dc0b73310e7");
|
113
|
public static final UUID uuidUnitedKingdomExclusiveEconomicZone = UUID.fromString("18ab29c0-3104-4102-ada8-6711fcdbdbb8");
|
114
|
public static final UUID uuidWaddenSea = UUID.fromString("ae0c4555-8e19-479d-8a4f-e1b62939c09b");
|
115
|
public static final UUID uuidWhiteSea = UUID.fromString("bf14bfb6-8925-4696-911c-56d3e90d4491");
|
116
|
|
117
|
|
118
|
public static final UUID uuidAfghanistan = UUID.fromString("9ecbc81b-9150-45b5-953d-1051cd519dd0");
|
119
|
public static final UUID uuidAlboranSea = UUID.fromString("a4f1ef1e-0bda-4be0-95f9-59ed4f536fb6");
|
120
|
public static final UUID uuidAlgeria = UUID.fromString("d254b5bb-e24c-4f79-88dd-80a75cd935db");
|
121
|
public static final UUID uuidAngola = UUID.fromString("fdb74fd7-e6a1-48ff-8721-f1db6e0d93ee");
|
122
|
public static final UUID uuidArcticOcean = UUID.fromString("4e68ddce-4472-4ae0-b6c3-406f39bf86ec");
|
123
|
public static final UUID uuidAustralianExclusiveEconomicZone = UUID.fromString("de8f70b9-3cac-48d5-b456-5cd489df5c26");
|
124
|
public static final UUID uuidAzoresExclusiveEconomicZone = UUID.fromString("e0297e2c-d28a-46aa-8b30-694148b0640d");
|
125
|
public static final UUID uuidBahamas = UUID.fromString("3e7eb2e5-975b-433c-9dc0-106ba16fd6e4");
|
126
|
public static final UUID uuidBalearicSea = UUID.fromString("f2eb56e0-0eac-4def-8143-c87f8bd04613");
|
127
|
public static final UUID uuidBayOfBiscay = UUID.fromString("36ffc01e-85a2-4f71-91fd-012d0b1eeff5");
|
128
|
public static final UUID uuidBelgium = UUID.fromString("4480742d-d760-4ec8-8ee6-24b889143ec1");
|
129
|
public static final UUID uuidBelize = UUID.fromString("d70dcf11-143c-48ce-bb8d-436600e3eb64");
|
130
|
public static final UUID uuidBrazil = UUID.fromString("597c66d5-528f-4eaa-aa71-c4ffc7d3d226");
|
131
|
public static final UUID uuidBulgaria = UUID.fromString("27dc2a12-943a-4e9f-88ac-70896f857bc5");
|
132
|
public static final UUID uuidCanada = UUID.fromString("65dd3c29-3cd0-4233-bd0e-b112bb27e519");
|
133
|
public static final UUID uuidCaribbeanSea = UUID.fromString("a1f1d511-2e62-4a73-a399-90bfffd8af56");
|
134
|
public static final UUID uuidCapeVerde = UUID.fromString("4704c7ff-cd3d-4460-81d6-a925b81657e1");
|
135
|
public static final UUID uuidCapeVerdeanExclusiveEconomicZone = UUID.fromString("1c951957-630a-4467-87be-ac9daba184a4");
|
136
|
public static final UUID uuidChile = UUID.fromString("a191ee04-2a58-47fd-aa12-566c9f16ee02");
|
137
|
public static final UUID uuidColombia = UUID.fromString("b1719057-9f4a-4042-8f85-7097afca2ba8");
|
138
|
public static final UUID uuidCostaRica = UUID.fromString("acbe3731-8568-400c-b666-dfdbc8f5cc9f");
|
139
|
public static final UUID uuidCroatia = UUID.fromString("f9d6a5ac-590e-4618-8fe1-a047fd9e1b32");
|
140
|
public static final UUID uuidCuba = UUID.fromString("17ae1220-7cc2-4dc5-bdd5-b852889b7dda");
|
141
|
public static final UUID uuidDenmark = UUID.fromString("3338dd30-98cd-4469-96b1-d8b79ae42ed5");
|
142
|
public static final UUID uuidEgypt = UUID.fromString("830d2178-722e-4668-922b-380501b031dd");
|
143
|
public static final UUID uuidEstonia = UUID.fromString("7b2953cc-7ee7-45cf-b0e6-db229b0d88a3");
|
144
|
public static final UUID uuidFaeroeExclusiveEconomicZone = UUID.fromString("b9a80017-0177-4d1e-83e2-d93d2e764b92");
|
145
|
public static final UUID uuidFrance = UUID.fromString("b7876595-230d-4ac8-bbcf-0a271221aeb0");
|
146
|
public static final UUID uuidGhana = UUID.fromString("b550ba30-41b8-485a-a1de-ba79b4b6e152");
|
147
|
public static final UUID uuidGreece = UUID.fromString("c004a689-048b-4541-9371-063bca1ab20e");
|
148
|
public static final UUID uuidGermany = UUID.fromString("55d23f99-c517-49ef-936b-3815c10b6303");
|
149
|
public static final UUID uuidGreekExclusiveEconomicZone = UUID.fromString("6e587a2b-d681-46d3-bede-30411b0707a9");
|
150
|
public static final UUID uuidGulfOfBothnia = UUID.fromString("e0126fd6-a163-4483-92e4-abe1a96ed025");
|
151
|
public static final UUID uuidGulfOfFinland = UUID.fromString("d312ff30-18d0-4f8a-9c80-3a06772cefbb");
|
152
|
public static final UUID uuidGulfOfGuinea = UUID.fromString("ea6f3983-64ad-46c4-832a-51bed6507d95");
|
153
|
public static final UUID uuidGulfOfMexico = UUID.fromString("9693deb4-82ed-40fa-822c-b5016d7fccf0");
|
154
|
public static final UUID uuidGulfOfRiga = UUID.fromString("c16dd324-850a-4dfc-8f3b-6718c8614cae");
|
155
|
public static final UUID uuidIceland = UUID.fromString("c3075a02-2aad-4745-9d40-45c498599b72");
|
156
|
public static final UUID uuidIonianSea = UUID.fromString("ff4fa153-5174-48fb-9eaa-0b391ba96153");
|
157
|
public static final UUID uuidIreland = UUID.fromString("f8e878b1-517d-420d-9445-cf92e7c8f986");
|
158
|
public static final UUID uuidIsraeliExclusiveEconomicZone = UUID.fromString("2eb96b7c-4634-44be-a68b-1ea36593ba4a");
|
159
|
public static final UUID uuidItaly = UUID.fromString("a8b1ade2-a70c-4902-b375-670d779a5078");
|
160
|
public static final UUID uuidJamaica = UUID.fromString("3a0b6181-3c91-44b6-8844-a61242adddd2");
|
161
|
public static final UUID uuidKattegat = UUID.fromString("c96bcfa2-20fc-4a23-9b1b-0da899b389c2");
|
162
|
public static final UUID uuidLevantineSea = UUID.fromString("04fd2746-5a6e-4392-9881-0e75a2f060e9");
|
163
|
public static final UUID uuidLigurianSea = UUID.fromString("9dcbf18e-3483-4ba8-84a4-c3c7ca2be297");
|
164
|
public static final UUID uuidMalteseExclusiveEconomicZone = UUID.fromString("450a1f9b-6d63-4c9f-9488-b800547c5c21");
|
165
|
public static final UUID uuidMauritanianExclusiveEconomicZone = UUID.fromString("7e9a12c3-31ee-4e09-bec0-dce173d1096e");
|
166
|
public static final UUID uuidMediterraneanSea_EasternBasin = UUID.fromString("a67dfa4d-4a96-403b-a64c-1e294826c2ed");
|
167
|
public static final UUID uuidMediterraneanSea_WesternBasin = UUID.fromString("b3e81fa7-ee7a-45d2-965c-88020f9ee1ea");
|
168
|
public static final UUID uuidMexico = UUID.fromString("a9be5a5c-99ec-4627-9892-104a0c175118");
|
169
|
public static final UUID uuidMongolia = UUID.fromString("0385e6b1-4796-4e9f-8656-b6092c97c58f");
|
170
|
public static final UUID uuidMorocco = UUID.fromString("4948e1ef-f61e-462f-9920-ab44c71ca2ae");
|
171
|
public static final UUID uuidNetherlands = UUID.fromString("8d4152fb-bf29-4a24-a772-62ccb4a8c02f");
|
172
|
public static final UUID uuidNewZealand = UUID.fromString("f3ff8497-00e0-4d45-9d14-eb80fea0fee0");
|
173
|
public static final UUID uuidNewZealandExclusiveEconomicZone = UUID.fromString("b10d2637-4b44-44d5-8742-fe8576859926");
|
174
|
public static final UUID uuidNorthAtlanticOcean = UUID.fromString("628354d1-1ded-4f3d-887e-4f90d43e0f14");
|
175
|
public static final UUID uuidNorway = UUID.fromString("d76b5b8b-2e1e-4241-b4f1-eb3acdfc12fd");
|
176
|
public static final UUID uuidPanama = UUID.fromString("796ed240-94bd-4558-bb99-7b1facdbc435");
|
177
|
public static final UUID uuidPanamanianExclusiveEconomicZone = UUID.fromString("49e40b33-30d0-4905-adea-b3ce05a40450");
|
178
|
public static final UUID uuidPolishExclusiveEconomicZone = UUID.fromString("dc7f8339-528b-49ec-a8d9-c2be0441e933");
|
179
|
public static final UUID uuidPortugal = UUID.fromString("4a04d8fd-3f2f-43ec-a5c4-684c8028e6c6");
|
180
|
public static final UUID uuidPortugueseExclusiveEconomicZone_Azores = UUID.fromString("33672f3d-dc4e-43ca-8b46-1e7d292c2fae");
|
181
|
public static final UUID uuidPortugueseExclusiveEconomicZone_Madeira = UUID.fromString("8308b767-09be-459a-9281-67b15fb59380");
|
182
|
public static final UUID uuidRedSea = UUID.fromString("6470eda4-738a-411d-9af7-0fd791dc9195");
|
183
|
public static final UUID uuidRussianExclusiveEconomicZone = UUID.fromString("cb7b047e-562d-4a1e-be08-872f0679dd1f");
|
184
|
public static final UUID uuidSeaOfMarmara = UUID.fromString("4b9dce18-0e4a-46e1-b8a0-634284f3fa18");
|
185
|
public static final UUID uuidSenegaleseExclusiveEconomicZone = UUID.fromString("05a4a971-ed53-4133-8999-8c96ddd20e22");
|
186
|
public static final UUID uuidSingapore = UUID.fromString("f68a178f-093f-427b-9431-ed2564516e90");
|
187
|
public static final UUID uuidSlovenianExclusiveEconomicZone = UUID.fromString("b5b06645-da20-4fc3-b964-09e4bbb63337");
|
188
|
public static final UUID uuidSouthAfrica = UUID.fromString("0004d255-7dbe-47e2-9acc-6086a5ac6719");
|
189
|
public static final UUID uuidSouthAfricanExclusiveEconomicZone = UUID.fromString("cba99c12-040b-4e17-9b20-2350ec4201c2");
|
190
|
public static final UUID uuidSouthChinaSea = UUID.fromString("b91b1cae-0c9d-4d73-b3c7-98312664f4b4");
|
191
|
public static final UUID uuidSpain = UUID.fromString("36b5a55c-6fd8-4fab-bd01-d776fb1f357e");
|
192
|
public static final UUID uuidSpanishExclusiveEconomicZone_CanaryIslands = UUID.fromString("30404044-c1e5-4757-92fd-0b1851c7d801");
|
193
|
public static final UUID uuidSriLankanExclusiveEconomicZone = UUID.fromString("be08163d-9e4c-44ad-b1f6-0592497724e1");
|
194
|
public static final UUID uuidStraitOfGibraltar = UUID.fromString("0cdd58d4-cf46-4ea2-b841-bcfcb1ee2195");
|
195
|
public static final UUID uuidSweden = UUID.fromString("dade7b65-d408-4017-a16c-f5ea7aeb3783");
|
196
|
public static final UUID uuidTunisia = UUID.fromString("e7caa4b3-cf79-4ea0-8468-2438c2a201c6");
|
197
|
public static final UUID uuidTurkey = UUID.fromString("0fbbf26a-7743-44d3-a7e4-2783016a37ed");
|
198
|
public static final UUID uuidTyrrhenianSea = UUID.fromString("26c39604-b7fd-425a-93a5-958774261d04");
|
199
|
public static final UUID uuidUnitedKingdom = UUID.fromString("a066c48c-6821-4acb-a454-3e1564e17cfe");
|
200
|
public static final UUID uuidUnitedStates = UUID.fromString("44d0c16c-b9d0-4db2-8776-34d230222caa");
|
201
|
public static final UUID uuidUnitedStatesExclusiveEconomicZone_Alaska = UUID.fromString("2d7d93fe-68ac-43d1-9d3a-92ccb8000ae6");
|
202
|
public static final UUID uuidVenezuela = UUID.fromString("c19956af-02e6-4868-97ef-135db405cc75");
|
203
|
|
204
|
//feature uuids
|
205
|
public static final UUID uuidRemark = UUID.fromString("648eab77-8469-4139-bbf4-3fb26ec15864");
|
206
|
public static final UUID uuidAdditionalinformation = UUID.fromString("ef00c304-ce33-45ef-9543-0b9336a2b6eb");
|
207
|
public static final UUID uuidSpelling = UUID.fromString("536594a1-21a5-4d99-aa46-132bc7b31316");
|
208
|
public static final UUID uuidPublicationdate = UUID.fromString("b996b34f-1313-4575-bf46-732676674290");
|
209
|
public static final UUID uuidSystematics = UUID.fromString("caac0f7f-f43e-4b7c-b296-ec2d930c4d05");
|
210
|
public static final UUID uuidClassification = UUID.fromString("aa9bffd3-1fa8-4bd7-9e25-e2d162177b3d");
|
211
|
public static final UUID uuidEnvironment = UUID.fromString("4f8ea10d-2242-443f-9d7d-4ecccdee4953");
|
212
|
public static final UUID uuidHabitat = UUID.fromString("b7387877-51e3-4192-b9e4-025a359f4b59");
|
213
|
public static final UUID uuidAuthority = UUID.fromString("9c7f8908-2530-4900-8da9-d328f7ac9031");
|
214
|
public static final UUID uuidMorphology = UUID.fromString("5be1f948-d85f-497f-a0d5-4e5f3b227274");
|
215
|
public static final UUID uuidTaxonomicRemarks = UUID.fromString("cc863aee-8da9-448b-82cd-47e3af942998");
|
216
|
public static final UUID uuidNote = UUID.fromString("2c66d35f-c76e-40e0-951b-f2c340e5973f");
|
217
|
public static final UUID uuidTaxonomy = UUID.fromString("d5734631-c86b-4212-9b8d-cb62f813e0a0");
|
218
|
public static final UUID uuidTaxonomicstatus = UUID.fromString("ffbadab5-a8bc-4fb6-a6b3-d1f2593187ff");
|
219
|
public static final UUID uuidStatus = UUID.fromString("fcc50853-bcff-4d0f-bc9a-123d7f175490");
|
220
|
public static final UUID uuidRank = UUID.fromString("cabada57-a098-47fc-929f-31c8c910f6cf");
|
221
|
public static final UUID uuidHomonymy = UUID.fromString("2791a14f-49b2-417f-a248-84c3d022d75f");
|
222
|
public static final UUID uuidNomenclature = UUID.fromString("15fe184f-4aab-4076-8bbb-3415d6f1f27f");
|
223
|
public static final UUID uuidTypespecies = UUID.fromString("cf674b0d-76e2-4628-952c-2cd06e209c6e");
|
224
|
public static final UUID uuidTaxonomicRemark = UUID.fromString("044e7c4e-aab8-4f44-bfa5-0339e7576c74");
|
225
|
public static final UUID uuidAcknowledgments = UUID.fromString("3b2fd495-3f9a-480e-986a-7643741177da");
|
226
|
public static final UUID uuidOriginalpublication = UUID.fromString("ea9b7e53-0487-499f-a281-3d82d10e76dd");
|
227
|
public static final UUID uuidTypelocality = UUID.fromString("7c1c5779-2b4b-467b-b2ca-5ca2e029e116");
|
228
|
public static final UUID uuidValidity = UUID.fromString("bd066f25-935b-4b4e-a2eb-3fbfcd5e608f");
|
229
|
public static final UUID uuidIdentification = UUID.fromString("dec3cd5b-0690-4035-825d-bda9aee96bc1");
|
230
|
public static final UUID uuidSynonymy = UUID.fromString("f5c8be5f-8d33-47df-838e-55fc7999fc81");
|
231
|
public static final UUID uuidSourceOfSynonymy = UUID.fromString("cf217b3f-360a-42e4-b447-ec87db1d3806");
|
232
|
public static final UUID uuidDepthRange = UUID.fromString("e5c799a9-87ac-4171-8dfb-8c5c39f9f635");
|
233
|
public static final UUID uuidFossilRange = UUID.fromString("5c68f42a-5c66-4e2a-8754-8922be104f6e");
|
234
|
public static final UUID uuidGrammaticalGender = UUID.fromString("ec1ca718-1ef0-41de-87e7-d6b464bf0c24");
|
235
|
public static final UUID uuidIntroducedSpeciesRemark = UUID.fromString("c60327b7-3333-436f-9aea-c02acaffdf94");
|
236
|
public static final UUID uuidAlienSpecies = UUID.fromString("03cd2316-e428-45bd-b336-c67137bbcd6a");
|
237
|
public static final UUID uuidDimensions = UUID.fromString("e2ffd374-b147-4014-a3aa-05394448e59f");
|
238
|
public static final UUID uuidDiet = UUID.fromString("17e22a59-6fea-4eb2-8e0c-4578f633cd0a");
|
239
|
public static final UUID uuidReproduction = UUID.fromString("fffdc170-db89-4ef6-9d21-f9dff19b4fb4");
|
240
|
|
241
|
public static final UUID uuidNewCombination = UUID.fromString("f51f71c7-4a07-491d-b04a-ac5360173ab9");
|
242
|
public static final UUID uuidTypeMaterial = UUID.fromString("5df1ad63-5f8c-43f9-812d-4448f30ddd0a");
|
243
|
public static final UUID uuidOriginalCombination = UUID.fromString("1c8e5637-1024-452f-9ebe-28058a5c6473");
|
244
|
public static final UUID uuidTypeSpecimen = UUID.fromString("0e74bee7-8a83-4f07-a6e9-05e5b1358411");
|
245
|
public static final UUID uuidOriginalDescription = UUID.fromString("bf7b3d4b-90e1-4eb2-b3ae-4f89e27b126f");
|
246
|
public static final UUID uuidSpecimen = UUID.fromString("a08e8158-d39d-4897-a6a0-ded4186d4ed0");
|
247
|
public static final UUID uuidEditorsComment = UUID.fromString("b46ad912-8c61-4c76-ad89-d38451d650e9");
|
248
|
public static final UUID uuidSyntype = UUID.fromString("6d0989a1-7467-43ec-a087-4838fa8246de");
|
249
|
public static final UUID uuidBiology = UUID.fromString("af5c6832-74f3-4b87-bac9-6fdfc68ffada");
|
250
|
|
251
|
//extension type uuids
|
252
|
public static final UUID uuidErmsTaxonStatus = UUID.fromString("859eee7f-5240-48a0-8edc-7af63557fa6e");
|
253
|
public static final UUID uuidExtGazetteer = UUID.fromString("dcfa124a-1028-49cd-aea5-fdf9bd396c1a");
|
254
|
public static final UUID uuidExtImis = UUID.fromString("ee2ac2ca-b60c-4e6f-9cad-720fcdb0a6ae");
|
255
|
public static final UUID uuidExtFossilStatus = UUID.fromString("ec3dffbe-a0c8-4d76-845f-5fc166a33d5b");
|
256
|
public static final UUID uuidExtTsn = UUID.fromString("6b0df02b-7278-4ce0-8fc9-0e6523832eb5");
|
257
|
public static final UUID uuidExtDisplayName = UUID.fromString("cd72225d-32c7-4b2d-a973-a95184392690");
|
258
|
public static final UUID uuidExtFuzzyName = UUID.fromString("8870dc69-d3a4-425f-a5a8-093a79f527a8");
|
259
|
public static final UUID uuidExtCredibility = UUID.fromString("909a3886-8744-49dc-b9cc-277378b81b42");
|
260
|
public static final UUID uuidExtCompleteness = UUID.fromString("141f4816-78c0-4da1-8a79-5c9031e6b149");
|
261
|
public static final UUID uuidExtUnacceptReason = UUID.fromString("3883fb79-374d-4120-964b-9666307e3567");
|
262
|
public static final UUID uuidExtQualityStatus = UUID.fromString("4de84c6e-41bd-4a0e-894d-77e9ec3103d2");
|
263
|
public static final UUID uuidExtAuthor = UUID.fromString("85387300-281f-47bc-8499-7008075dc8e0");
|
264
|
public static final UUID uuidExtErmsLink = UUID.fromString("b2d6ee54-1363-4641-9658-75a1843b84ff");
|
265
|
|
266
|
//AnnotationType
|
267
|
public static final UUID uuidAnnSpeciesExpertName = UUID.fromString("4d8abf02-3d92-4c65-b30b-0393a1f4818b");
|
268
|
|
269
|
//MarkerTypes
|
270
|
public static final UUID uuidMarkerMarine = UUID.fromString("5da78a28-5668-4ed5-b788-10c69343f91e");
|
271
|
public static final UUID uuidMarkerBrackish = UUID.fromString("2da39f5d-67d6-4779-b40d-923dca85fe14");
|
272
|
public static final UUID uuidMarkerFreshwater = UUID.fromString("1190b182-e1d3-4986-8cc3-a6de3c115cf7");
|
273
|
public static final UUID uuidMarkerTerrestrial = UUID.fromString("5ed92edb-e2c6-48da-8367-6e82071c888f");
|
274
|
|
275
|
public static final UUID uuidMarkerRefPublication = UUID.fromString("cdc1e38a-7b80-450a-8eb9-78035a51f33c");
|
276
|
public static final UUID uuidMarkerRefInformal = UUID.fromString("296a10f1-596d-4799-9624-34f9c5f54dc6");
|
277
|
public static final UUID uuidMarkerRefTypeI = UUID.fromString("1632d9e4-d921-4835-8915-d0d6ad298c7e");
|
278
|
|
279
|
|
280
|
public static NomenclaturalCode kingdomId2NomCode(Integer kingdomId){
|
281
|
switch (kingdomId){
|
282
|
case 1: return null;
|
283
|
case 2: return NomenclaturalCode.ICZN; //Animalia
|
284
|
case 3: return NomenclaturalCode.ICNAFP; //Plantae
|
285
|
case 4: return NomenclaturalCode.ICNAFP; //Fungi
|
286
|
case 5: return NomenclaturalCode.ICNAFP ; //Protozoa, not sure if correct, they have "subsp."
|
287
|
case 6: return NomenclaturalCode.ICNB ; //Bacteria
|
288
|
case 7: return NomenclaturalCode.ICNAFP; //Chromista??, not sure if correct, they have "subsp."
|
289
|
case 147415: return NomenclaturalCode.ICNB; //Monera, it is only an alternative name for Bacteria and should not be handled as separate kingdom
|
290
|
//-> formatting of infrageneric taxa and available ranks (rank table) let me assume that ICZN is most suitable
|
291
|
//at the same time formatting of subsp. (with marker!) behaves like ICNAFP so this is unclear
|
292
|
default: return null;
|
293
|
}
|
294
|
}
|
295
|
|
296
|
@Override
|
297
|
public NameTypeDesignationStatus getNameTypeDesignationStatusByKey(String key) throws UndefinedTransformerMethodException {
|
298
|
if (key == null){
|
299
|
return null;
|
300
|
}
|
301
|
Integer intDesignationId = Integer.valueOf(key);
|
302
|
switch (intDesignationId){
|
303
|
case 1: return NameTypeDesignationStatus.ORIGINAL_DESIGNATION();
|
304
|
case 2: return NameTypeDesignationStatus.SUBSEQUENT_DESIGNATION();
|
305
|
case 3: return NameTypeDesignationStatus.MONOTYPY();
|
306
|
default:
|
307
|
String warning = "Unknown name type designation status id " + key;
|
308
|
logger.warn(warning);
|
309
|
return null;
|
310
|
}
|
311
|
}
|
312
|
|
313
|
@Override
|
314
|
public UUID getNameTypeDesignationStatusUuid(String key) throws UndefinedTransformerMethodException {
|
315
|
//not needed
|
316
|
return super.getNameTypeDesignationStatusUuid(key);
|
317
|
}
|
318
|
|
319
|
private Map<String, Language> iso639_3_languages;
|
320
|
|
321
|
@Override
|
322
|
public Language getLanguageByKey(String ermsAbbrev) throws IllegalArgumentException {
|
323
|
if(iso639_3_languages == null){
|
324
|
fillIso639_3_languages();
|
325
|
}
|
326
|
// Set<String> unhandledLanguages = new HashSet<>();
|
327
|
if (StringUtils.isBlank(ermsAbbrev)){
|
328
|
return null;
|
329
|
}else if (iso639_3_languages.get(ermsAbbrev)!= null){
|
330
|
return iso639_3_languages.get(ermsAbbrev);
|
331
|
}else if ("fra".equals(ermsAbbrev)){
|
332
|
return Language.FRENCH();
|
333
|
}else if ("deu".equals(ermsAbbrev)){
|
334
|
return Language.GERMAN();
|
335
|
}else if ("eng".equals(ermsAbbrev)){
|
336
|
return Language.ENGLISH();
|
337
|
}else{
|
338
|
//unhandledLanguage.add(xxx);
|
339
|
// if (unhandledLanguages.contains(ermsAbbrev)){
|
340
|
// logger.warn("Unhandled language '" + ermsAbbrev + "' replaced by 'UNDETERMINED'" );
|
341
|
// return Language.UNDETERMINED();
|
342
|
// }
|
343
|
String warning = "New language abbreviation " + ermsAbbrev;
|
344
|
logger.warn(warning);
|
345
|
try {
|
346
|
throw new IllegalArgumentException(warning);
|
347
|
} catch (Exception e) {
|
348
|
e.printStackTrace();
|
349
|
throw e;
|
350
|
}
|
351
|
}
|
352
|
}
|
353
|
|
354
|
private void fillIso639_3_languages() {
|
355
|
iso639_3_languages = new HashMap<>();
|
356
|
TermVocabulary<Language> voc639_3 = TermVocabulary.NewInstance(TermType.Language,
|
357
|
Language.class, "ISO 639-3 language subset", "ISO 639-3 languages", "ISO 639-3", null);
|
358
|
voc639_3.setUuid(Language.uuidLanguageIso639_3Vocabulary);
|
359
|
|
360
|
addIso639_3_language(voc639_3, "swh", Language.uuidLangKiswahiliSwahili, "Kiswahili, Swahili");
|
361
|
addIso639_3_language(voc639_3, "zlm", Language.uuidLangMalay, "Malay");
|
362
|
addIso639_3_language(voc639_3, "bcc", Language.uuidLangSouthernBalochi, "Southern Balochi");
|
363
|
addIso639_3_language(voc639_3, "lij", Language.uuidLangLigurian, "Ligurian");
|
364
|
addIso639_3_language(voc639_3, "mey", Language.uuidLangHassaniyya, "Hassaniyya");
|
365
|
addIso639_3_language(voc639_3, "kri", Language.uuidLangKrio, "Krio");
|
366
|
addIso639_3_language(voc639_3, "evn", Language.uuidLangEvenki, "Evenki");
|
367
|
addIso639_3_language(voc639_3, "kpy", Language.uuidLangKoryak, "Koryak");
|
368
|
addIso639_3_language(voc639_3, "eve", Language.uuidLangEven, "Even");
|
369
|
addIso639_3_language(voc639_3, "yrk", Language.uuidLangNenets, "Nenets");
|
370
|
addIso639_3_language(voc639_3, "ckt", Language.uuidLangChukot, "Chukot");
|
371
|
addIso639_3_language(voc639_3, "aeb", Language.uuidLangTunisianArabic, "Tunisian Arabic");
|
372
|
addIso639_3_language(voc639_3, "auq", Language.uuidLangAnusKorur, "Anus, Korur");
|
373
|
addIso639_3_language(voc639_3, "kca", Language.uuidLangKhanty, "Khanty");
|
374
|
addIso639_3_language(voc639_3, "vls", Language.uuidLangVlaams, "Vlaams");
|
375
|
}
|
376
|
|
377
|
private void addIso639_3_language(TermVocabulary<Language> voc, String abbrev, UUID uuid, String label) {
|
378
|
Language lang = Language.NewInstance(uuid, label, abbrev);
|
379
|
voc.addTerm(lang);
|
380
|
lang.setIdInVocabulary(abbrev);
|
381
|
iso639_3_languages.put(abbrev, lang);
|
382
|
}
|
383
|
|
384
|
@Override
|
385
|
public ExtensionType getExtensionTypeByKey(String key) throws UndefinedTransformerMethodException {
|
386
|
if (key == null){return null;
|
387
|
}
|
388
|
return null;
|
389
|
}
|
390
|
|
391
|
@Override
|
392
|
public UUID getExtensionTypeUuid(String key)
|
393
|
throws UndefinedTransformerMethodException {
|
394
|
if (key == null){return null;
|
395
|
// }else if (key.equalsIgnoreCase("recent only")){return uuidRecentOnly;
|
396
|
// }else if (key.equalsIgnoreCase("recent + fossil")){return uuidRecentAndFossil;
|
397
|
// }else if (key.equalsIgnoreCase("fossil only")){return uuidFossilOnly;
|
398
|
}
|
399
|
return null;
|
400
|
}
|
401
|
|
402
|
public static UUID uuidFromGuName(String guName){
|
403
|
if (StringUtils.isBlank(guName)){return null;
|
404
|
}else if (guName.equalsIgnoreCase("Adriatic Sea")){ return uuidAdriaticSea;
|
405
|
}else if (guName.equalsIgnoreCase("Aegean Sea")){ return uuidAegeanSea;
|
406
|
}else if (guName.equalsIgnoreCase("Archipelago Sea")){ return uuidArchipelagoSea;
|
407
|
}else if (guName.equalsIgnoreCase("Balear Sea")){ return uuidBalearSea;
|
408
|
}else if (guName.equalsIgnoreCase("Baltic Proper")){ return uuidBalticProper;
|
409
|
}else if (guName.equalsIgnoreCase("Baltic Sea")){ return uuidBalticSea;
|
410
|
}else if (guName.equalsIgnoreCase("Barentsz Sea")){ return uuidBarentszSea;
|
411
|
}else if (guName.equalsIgnoreCase("Belgian Exclusive Economic Zone")){ return uuidBelgianExclusiveEconomicZone;
|
412
|
}else if (guName.equalsIgnoreCase("Baelt Sea")){ return uuidBaeltSea;
|
413
|
}else if (guName.equalsIgnoreCase("Biscay Bay")){ return uuidBiscayBay;
|
414
|
}else if (guName.equalsIgnoreCase("Black Sea")){ return uuidBlackSea;
|
415
|
}else if (guName.equalsIgnoreCase("Bothnian Sea")){ return uuidBothnianSea;
|
416
|
}else if (guName.equalsIgnoreCase("Bulgarian Exclusive Economic Zone")){ return uuidBulgarianExclusiveEconomicZone;
|
417
|
}else if (guName.equalsIgnoreCase("Caspian Sea")){ return uuidCaspianSea;
|
418
|
}else if (guName.equalsIgnoreCase("Croatian Exclusive Economic Zone")){ return uuidCroatianExclusiveEconomicZone;
|
419
|
}else if (guName.equalsIgnoreCase("Danish Exclusive Economic Zone")){ return uuidDanishExclusiveEconomicZone;
|
420
|
}else if (guName.equalsIgnoreCase("Dutch Exclusive Economic Zone")){ return uuidDutchExclusiveEconomicZone;
|
421
|
}else if (guName.equalsIgnoreCase("Egyptian Exclusive Economic Zone")){ return uuidEgyptianExclusiveEconomicZone;
|
422
|
}else if (guName.equalsIgnoreCase("English Channel")){ return uuidEnglishChannel;
|
423
|
}else if (guName.equalsIgnoreCase("Estonian Exclusive Economic Zone")){ return uuidEstonianExclusiveEconomicZone;
|
424
|
}else if (guName.equalsIgnoreCase("European Marine Waters")){ return uuidEuropeanMarineWaters;
|
425
|
}else if (guName.equalsIgnoreCase("French Exclusive Economic Zone")){ return uuidFrenchExclusiveEconomicZone;
|
426
|
}else if (guName.equalsIgnoreCase("German Exclusive Economic Zone")){ return uuidGermanExclusiveEconomicZone;
|
427
|
}else if (guName.equalsIgnoreCase("Icelandic Exclusive Economic Zone")){ return uuidIcelandicExclusiveEconomicZone;
|
428
|
}else if (guName.equalsIgnoreCase("Irish Exclusive economic Zone")){ return uuidIrishExclusiveeconomicZone;
|
429
|
}else if (guName.equalsIgnoreCase("Irish Sea")||
|
430
|
guName.equalsIgnoreCase("Irish Sea and St. George's Channel")){ return uuidIrishSea;
|
431
|
}else if (guName.equalsIgnoreCase("Italian Exclusive Economic Zone")){ return uuidItalianExclusiveEconomicZone;
|
432
|
}else if (guName.equalsIgnoreCase("Lebanese Exclusive Economic Zone")){ return uuidLebaneseExclusiveEconomicZone;
|
433
|
}else if (guName.equalsIgnoreCase("Madeiran Exclusive Economic Zone")){ return uuidMadeiranExclusiveEconomicZone;
|
434
|
}else if (guName.equalsIgnoreCase("Marmara Sea")){ return uuidMarmaraSea;
|
435
|
}else if (guName.equalsIgnoreCase("Mediterranean Sea")){ return uuidMediterraneanSea;
|
436
|
}else if (guName.equalsIgnoreCase("Moroccan Exclusive Economic Zone")){ return uuidMoroccanExclusiveEconomicZone;
|
437
|
}else if (guName.equalsIgnoreCase("North Baltic proper")){ return uuidNorthBalticproper;
|
438
|
}else if (guName.equalsIgnoreCase("North Sea")){ return uuidNorthSea;
|
439
|
}else if (guName.equalsIgnoreCase("Norwegian Exclusive Economic Zone")){ return uuidNorwegianExclusiveEconomicZone;
|
440
|
}else if (guName.equalsIgnoreCase("Norwegian Sea")){ return uuidNorwegianSea;
|
441
|
}else if (guName.equalsIgnoreCase("Portuguese Exclusive Economic Zone")){ return uuidPortugueseExclusiveEconomicZone;
|
442
|
}else if (guName.equalsIgnoreCase("Sea of Azov")){ return uuidSeaofAzov;
|
443
|
}else if (guName.equalsIgnoreCase("Skagerrak")){ return uuidSkagerrak;
|
444
|
}else if (guName.equalsIgnoreCase("South Baltic proper")){ return uuidSouthBalticproper;
|
445
|
}else if (guName.equalsIgnoreCase("Spanish Exclusive Economic Zone")){ return uuidSpanishExclusiveEconomicZone;
|
446
|
}else if (guName.equalsIgnoreCase("Spanish Exclusive Economic Zone [Mediterranean part]")){ return uuidSpanishExclusiveEconomicZoneMediterraneanpart;
|
447
|
}else if (guName.equalsIgnoreCase("Swedish Exclusive Economic Zone")){ return uuidSwedishExclusiveEconomicZone;
|
448
|
}else if (guName.equalsIgnoreCase("Tirreno Sea")){ return uuidTirrenoSea;
|
449
|
}else if (guName.equalsIgnoreCase("Tunisian Exclusive Economic Zone")){ return uuidTunisianExclusiveEconomicZone;
|
450
|
}else if (guName.equalsIgnoreCase("Turkish Exclusive Economic Zone")){ return uuidTurkishExclusiveEconomicZone;
|
451
|
}else if (guName.equalsIgnoreCase("Ukrainian Exclusive Economic Zone")||
|
452
|
guName.equalsIgnoreCase("Overlapping claim Ukrainian Exclusive Economic Zone")){ return uuidUkrainianExclusiveEconomicZone;
|
453
|
}else if (guName.equalsIgnoreCase("United Kingdom Exclusive Economic Zone")){ return uuidUnitedKingdomExclusiveEconomicZone;
|
454
|
}else if (guName.equalsIgnoreCase("Wadden Sea")){ return uuidWaddenSea;
|
455
|
}else if (guName.equalsIgnoreCase("White Sea")){ return uuidWhiteSea;
|
456
|
|
457
|
}else if (guName.equalsIgnoreCase("Azores Exclusive Economic Zone")){ return uuidAzoresExclusiveEconomicZone;
|
458
|
}else if (guName.equalsIgnoreCase("Bay of Biscay")){ return uuidBayOfBiscay;
|
459
|
}else if (guName.equalsIgnoreCase("Greek Exclusive Economic Zone")){ return uuidGreekExclusiveEconomicZone;
|
460
|
}else if (guName.equalsIgnoreCase("Polish Exclusive Economic Zone")){ return uuidPolishExclusiveEconomicZone;
|
461
|
}else if (guName.equalsIgnoreCase("Tyrrhenian Sea")){ return uuidTyrrhenianSea;
|
462
|
|
463
|
}else if (guName.equalsIgnoreCase("Afghanistan")){ return uuidAfghanistan;
|
464
|
}else if (guName.equalsIgnoreCase("Alboran Sea")){ return uuidAlboranSea;
|
465
|
}else if (guName.equalsIgnoreCase("Algeria")){ return uuidAlgeria;
|
466
|
}else if (guName.equalsIgnoreCase("Angola")){ return uuidAngola;
|
467
|
}else if (guName.equalsIgnoreCase("Arctic Ocean")){ return uuidArcticOcean;
|
468
|
}else if (guName.equalsIgnoreCase("Australian Exclusive Economic Zone")){ return uuidAustralianExclusiveEconomicZone;
|
469
|
}else if (guName.equalsIgnoreCase("Bahamas")){ return uuidBahamas;
|
470
|
}else if (guName.equalsIgnoreCase("Balearic Sea")){ return uuidBalearicSea;
|
471
|
}else if (guName.equalsIgnoreCase("Belgium")){ return uuidBelgium;
|
472
|
}else if (guName.equalsIgnoreCase("Belize")){ return uuidBelize;
|
473
|
}else if (guName.equalsIgnoreCase("Brazil")){ return uuidBrazil;
|
474
|
}else if (guName.equalsIgnoreCase("Bulgaria")){ return uuidBulgaria;
|
475
|
}else if (guName.equalsIgnoreCase("Canada")){ return uuidCanada;
|
476
|
}else if (guName.equalsIgnoreCase("Caribbean Sea")){ return uuidCaribbeanSea;
|
477
|
}else if (guName.equalsIgnoreCase("Cape Verde")){ return uuidCapeVerde;
|
478
|
}else if (guName.equalsIgnoreCase("Cape Verdean Exclusive Economic Zone")){ return uuidCapeVerdeanExclusiveEconomicZone;
|
479
|
}else if (guName.equalsIgnoreCase("Chile")){ return uuidChile;
|
480
|
}else if (guName.equalsIgnoreCase("Colombia")){ return uuidColombia;
|
481
|
}else if (guName.equalsIgnoreCase("Costa Rica")){ return uuidCostaRica;
|
482
|
}else if (guName.equalsIgnoreCase("Croatia")){ return uuidCroatia;
|
483
|
}else if (guName.equalsIgnoreCase("Cuba")){ return uuidCuba;
|
484
|
}else if (guName.equalsIgnoreCase("Denmark")){ return uuidDenmark;
|
485
|
}else if (guName.equalsIgnoreCase("Egypt")){ return uuidEgypt;
|
486
|
}else if (guName.equalsIgnoreCase("Estonia")){ return uuidEstonia;
|
487
|
}else if (guName.equalsIgnoreCase("Faeroe Exclusive Economic Zone")){ return uuidFaeroeExclusiveEconomicZone;
|
488
|
}else if (guName.equalsIgnoreCase("France")){ return uuidFrance;
|
489
|
}else if (guName.equalsIgnoreCase("Ghana")){ return uuidGhana;
|
490
|
}else if (guName.equalsIgnoreCase("Greece")){ return uuidGreece;
|
491
|
}else if (guName.equalsIgnoreCase("Germany")){ return uuidGermany;
|
492
|
}else if (guName.equalsIgnoreCase("Gulf of Bothnia")){ return uuidGulfOfBothnia;
|
493
|
}else if (guName.equalsIgnoreCase("Gulf of Finland")){ return uuidGulfOfFinland;
|
494
|
}else if (guName.equalsIgnoreCase("Gulf of Guinea")){ return uuidGulfOfGuinea;
|
495
|
}else if (guName.equalsIgnoreCase("Gulf of Mexico")){ return uuidGulfOfMexico;
|
496
|
}else if (guName.equalsIgnoreCase("Gulf of Riga")){ return uuidGulfOfRiga;
|
497
|
}else if (guName.equalsIgnoreCase("Iceland")){ return uuidIceland;
|
498
|
}else if (guName.equalsIgnoreCase("Ionian Sea")){ return uuidIonianSea;
|
499
|
}else if (guName.equalsIgnoreCase("Ireland")){ return uuidIreland;
|
500
|
}else if (guName.equalsIgnoreCase("Israeli Exclusive Economic Zone")){return uuidIsraeliExclusiveEconomicZone;
|
501
|
}else if (guName.equalsIgnoreCase("Italy")){ return uuidItaly;
|
502
|
}else if (guName.equalsIgnoreCase("Jamaica")){ return uuidJamaica;
|
503
|
}else if (guName.equalsIgnoreCase("Kattegat")){ return uuidKattegat;
|
504
|
}else if (guName.equalsIgnoreCase("Levantine Sea")){ return uuidLevantineSea;
|
505
|
}else if (guName.equalsIgnoreCase("Ligurian Sea")){ return uuidLigurianSea;
|
506
|
}else if (guName.equalsIgnoreCase("Maltese Exclusive Economic Zone")){ return uuidMalteseExclusiveEconomicZone;
|
507
|
}else if (guName.equalsIgnoreCase("Mauritanian Exclusive Economic Zone")){ return uuidMauritanianExclusiveEconomicZone;
|
508
|
}else if (guName.equalsIgnoreCase("Mediterranean Sea - Eastern Basin")){ return uuidMediterraneanSea_EasternBasin;
|
509
|
}else if (guName.equalsIgnoreCase("Mediterranean Sea - Western Basin")){ return uuidMediterraneanSea_WesternBasin;
|
510
|
}else if (guName.equalsIgnoreCase("Mexico")){ return uuidMexico;
|
511
|
}else if (guName.equalsIgnoreCase("Mongolia")){ return uuidMongolia;
|
512
|
}else if (guName.equalsIgnoreCase("Morocco")){ return uuidMorocco;
|
513
|
}else if (guName.equalsIgnoreCase("Netherlands")){ return uuidNetherlands;
|
514
|
}else if (guName.equalsIgnoreCase("New Zealand")){ return uuidNewZealand;
|
515
|
}else if (guName.equalsIgnoreCase("New Zealand Exclusive Economic Zone")){ return uuidNewZealandExclusiveEconomicZone;
|
516
|
}else if (guName.equalsIgnoreCase("North Atlantic Ocean")){ return uuidNorthAtlanticOcean;
|
517
|
}else if (guName.equalsIgnoreCase("Norway")){ return uuidNorway;
|
518
|
}else if (guName.equalsIgnoreCase("Panama")){ return uuidPanama;
|
519
|
}else if (guName.equalsIgnoreCase("Panamanian Exclusive Economic Zone")){ return uuidPanamanianExclusiveEconomicZone;
|
520
|
}else if (guName.equalsIgnoreCase("Portugal")){ return uuidPortugal;
|
521
|
}else if (guName.equalsIgnoreCase("Portuguese Exclusive Economic Zone (Azores)")){ return uuidPortugueseExclusiveEconomicZone_Azores;
|
522
|
}else if (guName.equalsIgnoreCase("Portuguese Exclusive Economic Zone (Madeira)")){ return uuidPortugueseExclusiveEconomicZone_Madeira;
|
523
|
}else if (guName.equalsIgnoreCase("Red Sea")){ return uuidRedSea;
|
524
|
}else if (guName.equalsIgnoreCase("Russian Exclusive economic Zone")){ return uuidRussianExclusiveEconomicZone;
|
525
|
}else if (guName.equalsIgnoreCase("Sea of Marmara")){ return uuidSeaOfMarmara;
|
526
|
}else if (guName.equalsIgnoreCase("Senegalese Exclusive Economic Zone")){ return uuidSenegaleseExclusiveEconomicZone;
|
527
|
}else if (guName.equalsIgnoreCase("Singapore")){ return uuidSingapore;
|
528
|
}else if (guName.equalsIgnoreCase("Slovenian Exclusive Economic Zone")){ return uuidSlovenianExclusiveEconomicZone;
|
529
|
}else if (guName.equalsIgnoreCase("South Africa")){ return uuidSouthAfrica;
|
530
|
}else if (guName.equalsIgnoreCase("South African Exclusive Economic Zone")){ return uuidSouthAfricanExclusiveEconomicZone;
|
531
|
}else if (guName.equalsIgnoreCase("South China Sea")){ return uuidSouthChinaSea;
|
532
|
}else if (guName.equalsIgnoreCase("Spain")){ return uuidSpain;
|
533
|
}else if (guName.equalsIgnoreCase("Spanish Exclusive Economic Zone (Canary Islands)")){ return uuidSpanishExclusiveEconomicZone_CanaryIslands;
|
534
|
}else if (guName.equalsIgnoreCase("Sri Lankan Exclusive Economic Zone")){ return uuidSriLankanExclusiveEconomicZone;
|
535
|
}else if (guName.equalsIgnoreCase("Strait of Gibraltar")){ return uuidStraitOfGibraltar;
|
536
|
}else if (guName.equalsIgnoreCase("Sweden")){ return uuidSweden;
|
537
|
}else if (guName.equalsIgnoreCase("Tunisia")){ return uuidTunisia;
|
538
|
}else if (guName.equalsIgnoreCase("Turkey")){ return uuidTurkey;
|
539
|
}else if (guName.equalsIgnoreCase("United Kingdom")){ return uuidUnitedKingdom;
|
540
|
}else if (guName.equalsIgnoreCase("United States")){ return uuidUnitedStates;
|
541
|
}else if (guName.equalsIgnoreCase("United States Exclusive Economic Zone (Alaska)")){ return uuidUnitedStatesExclusiveEconomicZone_Alaska;
|
542
|
}else if (guName.equalsIgnoreCase("Venezuela")){ return uuidVenezuela;
|
543
|
|
544
|
}else{
|
545
|
throw new IllegalArgumentException("Unknown area " + guName);
|
546
|
}
|
547
|
}
|
548
|
|
549
|
public static Feature noteType2Feature(String type){
|
550
|
if (StringUtils.isBlank(type)){return null;
|
551
|
}else if (type.equals("Remark")){return Feature.UNKNOWN();
|
552
|
}else if (type.equals("Additional information")){return Feature.UNKNOWN();
|
553
|
}else if (type.equals("Spelling")){return Feature.UNKNOWN();
|
554
|
}else if (type.equals("Publication date")){return Feature.UNKNOWN();
|
555
|
}else if (type.equals("Systematics")){return Feature.UNKNOWN();
|
556
|
}else if (type.equals("Classification")){return Feature.UNKNOWN();
|
557
|
}else if (type.equals("Environment")){return Feature.UNKNOWN();
|
558
|
}else if (type.equals("Habitat")){return Feature.UNKNOWN();
|
559
|
}else if (type.equals("Authority")){return Feature.UNKNOWN();
|
560
|
}else if (type.equals("Ecology")){return Feature.UNKNOWN();
|
561
|
}else if (type.equals("Morphology")){return Feature.UNKNOWN();
|
562
|
}else if (type.equals("Taxonomic Remarks")){return Feature.UNKNOWN();
|
563
|
}else if (type.equals("NULL")){return Feature.UNKNOWN();
|
564
|
}else if (type.equals("Distribution")){return Feature.UNKNOWN();
|
565
|
}else if (type.equals("Note")){return Feature.UNKNOWN();
|
566
|
}else if (type.equals("Taxonomy")){return Feature.UNKNOWN();
|
567
|
}else if (type.equals("Taxonomic status")){return Feature.UNKNOWN();
|
568
|
}else if (type.equals("Status")){return Feature.UNKNOWN();
|
569
|
}else if (type.equals("Rank")){return Feature.UNKNOWN();
|
570
|
}else if (type.equals("Homonymy")){return Feature.UNKNOWN();
|
571
|
}else if (type.equals("Nomenclature")){return Feature.UNKNOWN();
|
572
|
}else if (type.equals("Type species")){return Feature.UNKNOWN();
|
573
|
}else if (type.equals("Taxonomic Remark")){return Feature.UNKNOWN();
|
574
|
}else if (type.equals("Diagnosis")){return Feature.UNKNOWN();
|
575
|
}else if (type.equals("Date of Publication")){return Feature.UNKNOWN();
|
576
|
}else if (type.equals("Acknowledgments")){return Feature.UNKNOWN();
|
577
|
}else if (type.equals("Biology")){return Feature.UNKNOWN();
|
578
|
}else if (type.equals("Original publication")){return Feature.UNKNOWN();
|
579
|
}else if (type.equals("Type locality")){return Feature.UNKNOWN();
|
580
|
}else if (type.equals("Host")){return Feature.UNKNOWN();
|
581
|
}else if (type.equals("Validity")){return Feature.UNKNOWN();
|
582
|
}else if (type.equals("Identification")){return Feature.UNKNOWN();
|
583
|
}else if (type.equals("Synonymy")){return Feature.UNKNOWN();
|
584
|
}else{
|
585
|
throw new IllegalArgumentException("Unknown note type " + type);
|
586
|
}
|
587
|
}
|
588
|
|
589
|
@Override
|
590
|
public Feature getFeatureByKey(String key) throws UndefinedTransformerMethodException {
|
591
|
if (StringUtils.isBlank(key)){return null;
|
592
|
}else if (key.equalsIgnoreCase("Distribution")){return Feature.DISTRIBUTION();
|
593
|
}else if (key.equalsIgnoreCase("Ecology")){return Feature.ECOLOGY();
|
594
|
}else if (key.equalsIgnoreCase("Diagnosis")){return Feature.DIAGNOSIS();
|
595
|
}else if (key.equalsIgnoreCase("Host")){return Feature.HOSTPLANT();
|
596
|
}else if (key.equalsIgnoreCase("Etymology")){return Feature.ETYMOLOGY();
|
597
|
}else{
|
598
|
return null;
|
599
|
}
|
600
|
}
|
601
|
|
602
|
@Override
|
603
|
public UUID getFeatureUuid(String key)
|
604
|
throws UndefinedTransformerMethodException {
|
605
|
if (StringUtils.isBlank(key)){return null;
|
606
|
}else if (key.equalsIgnoreCase("Remark")){return uuidRemark;
|
607
|
}else if (key.equalsIgnoreCase("Additional information")){return uuidAdditionalinformation;
|
608
|
}else if (key.equalsIgnoreCase("Spelling")){return uuidSpelling;
|
609
|
}else if (key.equalsIgnoreCase("Publication date")){return uuidPublicationdate;
|
610
|
}else if (key.equalsIgnoreCase("Systematics")){return uuidSystematics;
|
611
|
}else if (key.equalsIgnoreCase("Classification")){return uuidClassification;
|
612
|
}else if (key.equalsIgnoreCase("Environment")){return uuidEnvironment;
|
613
|
}else if (key.equalsIgnoreCase("Habitat")){return uuidHabitat;
|
614
|
}else if (key.equalsIgnoreCase("Authority")){return uuidAuthority;
|
615
|
}else if (key.equalsIgnoreCase("Morphology")){return uuidMorphology;
|
616
|
}else if (key.equalsIgnoreCase("Taxonomic Remarks")){return uuidTaxonomicRemarks;
|
617
|
}else if (key.equalsIgnoreCase("Note")){return uuidNote;
|
618
|
}else if (key.equalsIgnoreCase("Taxonomy")){return uuidTaxonomy;
|
619
|
}else if (key.equalsIgnoreCase("Taxonomic status")){return uuidTaxonomicstatus;
|
620
|
}else if (key.equalsIgnoreCase("Status")){return uuidStatus;
|
621
|
}else if (key.equalsIgnoreCase("Rank")){return uuidRank;
|
622
|
}else if (key.equalsIgnoreCase("Homonymy")){return uuidHomonymy;
|
623
|
}else if (key.equalsIgnoreCase("Nomenclature")){return uuidNomenclature;
|
624
|
}else if (key.equalsIgnoreCase("Type species")){return uuidTypespecies;
|
625
|
}else if (key.equalsIgnoreCase("Taxonomic Remark")){return uuidTaxonomicRemark;
|
626
|
}else if (key.equalsIgnoreCase("Date of Publication")){return uuidPublicationdate;
|
627
|
}else if (key.equalsIgnoreCase("Acknowledgments")){return uuidAcknowledgments;
|
628
|
}else if (key.equalsIgnoreCase("Original publication")){return uuidOriginalpublication;
|
629
|
}else if (key.equalsIgnoreCase("Type locality")){return uuidTypelocality;
|
630
|
}else if (key.equalsIgnoreCase("Validity")){return uuidValidity;
|
631
|
}else if (key.equalsIgnoreCase("Identification")){return uuidIdentification;
|
632
|
}else if (key.equalsIgnoreCase("Synonymy")){return uuidSynonymy;
|
633
|
}else if (key.equalsIgnoreCase("Depth range")){return uuidDepthRange;
|
634
|
}else if (key.equalsIgnoreCase("Fossil range")){return uuidFossilRange;
|
635
|
}else if (key.equalsIgnoreCase("Grammatical gender")){return uuidGrammaticalGender;
|
636
|
}else if (key.equalsIgnoreCase("Introduced species remark")){return uuidIntroducedSpeciesRemark;
|
637
|
}else if (key.equalsIgnoreCase("Alien species")){return uuidAlienSpecies;
|
638
|
}else if (key.equalsIgnoreCase("Dimensions")){return uuidDimensions;
|
639
|
}else if (key.equalsIgnoreCase("Diet")){return uuidDiet;
|
640
|
}else if (key.equalsIgnoreCase("Reproduction")){return uuidReproduction;
|
641
|
}else if (key.equalsIgnoreCase("New combination")){return uuidNewCombination;
|
642
|
}else if (key.equalsIgnoreCase("Type material")){return uuidTypeMaterial;
|
643
|
}else if (key.equalsIgnoreCase("Original Combination")){return uuidOriginalCombination;
|
644
|
}else if (key.equalsIgnoreCase("Type specimen")){return uuidTypeSpecimen;
|
645
|
}else if (key.equalsIgnoreCase("Original description")){return uuidOriginalDescription;
|
646
|
}else if (key.equalsIgnoreCase("Specimen")){return uuidSpecimen;
|
647
|
}else if (key.equalsIgnoreCase("Original description")){return uuidOriginalDescription;
|
648
|
}else if (key.equalsIgnoreCase("Editor's comment")){return uuidEditorsComment;
|
649
|
}else if (key.equalsIgnoreCase("Original description")){return uuidOriginalDescription;
|
650
|
}else if (key.equalsIgnoreCase("Syntype")){return uuidSyntype;
|
651
|
}else if (key.equalsIgnoreCase("Biology")){return uuidBiology;
|
652
|
|
653
|
}else{
|
654
|
logger.warn("Feature key " + key + " not yet supported by ERMS transformer");
|
655
|
return null;
|
656
|
}
|
657
|
}
|
658
|
|
659
|
//handles the nomstatus type of unaccept reason
|
660
|
@Override
|
661
|
public NomenclaturalStatusType getNomenclaturalStatusByKey(String key) throws UndefinedTransformerMethodException{
|
662
|
if (isBlank(key)){
|
663
|
return null;
|
664
|
}else if (key.matches("(?i).*inval.*")){
|
665
|
return NomenclaturalStatusType.INVALID(); //1, test if correct for zoological names
|
666
|
}else if (key.matches("(?i).*not val*")){
|
667
|
return NomenclaturalStatusType.INVALID(); //1, test if correct for zoological names
|
668
|
}else if (key.matches("(?i).*illeg.*")){
|
669
|
return NomenclaturalStatusType.ILLEGITIMATE(); //2
|
670
|
}else if (key.matches("(?i).*nud.*")){
|
671
|
return NomenclaturalStatusType.NUDUM(); //3
|
672
|
}else if (key.matches("(?i).*rej\\..*")){
|
673
|
return NomenclaturalStatusType.REJECTED(); //4
|
674
|
}else if (key.matches("(?i).*superfl.*")){
|
675
|
return NomenclaturalStatusType.SUPERFLUOUS(); //12
|
676
|
}else if (key.matches("(?i).*Comb\\. nov.*")){
|
677
|
//??
|
678
|
return NomenclaturalStatusType.NOVUM(); // 16
|
679
|
}else if (key.matches("(?i).*New name.*")){
|
680
|
//??
|
681
|
return NomenclaturalStatusType.NOVUM(); // 16
|
682
|
}else if (key.matches("(?i)new combination")){
|
683
|
//TODO better use BerlinModelTransformer.uuidNomStatusCombIned, see also comment on NomenclaturalStatusType.COMB_NOV()
|
684
|
return NomenclaturalStatusType.COMB_NOV(); //comb. ined./21
|
685
|
}else{
|
686
|
return null;
|
687
|
}
|
688
|
}
|
689
|
|
690
|
@Override
|
691
|
public RelationshipTermBase<?>[] getSynonymRelationTypesByKey(String unacceptreason, DbImportStateBase<?,?> state) {
|
692
|
|
693
|
RelationshipTermBase<?>[] result = new RelationshipTermBase[4];
|
694
|
SynonymType synType = SynonymType.SYNONYM_OF();
|
695
|
TaxonRelationshipType taxonRelType = getSynTaxonRelType(state);
|
696
|
NameRelationshipType nameType = null;
|
697
|
// HybridRelationshipType hybridType = null;
|
698
|
|
699
|
//according to SQL script erms300_Match_Relation&Status.sql
|
700
|
|
701
|
unacceptreason = unacceptreason == null? null: unacceptreason.trim();
|
702
|
boolean handled = false;
|
703
|
if (unacceptreason == null || isBlank(unacceptreason)){
|
704
|
handled = true; //no change
|
705
|
}else if (unacceptreason.matches("(?i)(synonym|superseded recombination|transferred to .*)")){
|
706
|
handled = true; //no change
|
707
|
}else{
|
708
|
if (unacceptreason.matches("(?i)(.*bas[iy][no].*ny.*|.*homot.*syn.*|objective syny?onym)")){
|
709
|
synType = SynonymType.HOMOTYPIC_SYNONYM_OF();
|
710
|
taxonRelType = getHomoSynTaxonRelType(state);
|
711
|
}else if (unacceptreason.matches("(?i)(heterotypic|subjective) synonym")){
|
712
|
synType = SynonymType.HETEROTYPIC_SYNONYM_OF();
|
713
|
// taxonRelType = getHeteroSynTaxRelType(state); //do nothing
|
714
|
}else if (unacceptreason.matches("(?i)part.*\\s+synonym.*")){
|
715
|
synType = null;
|
716
|
taxonRelType = TaxonRelationshipType.PRO_PARTE_SYNONYM_FOR();
|
717
|
}else if (unacceptreason.matches("(?i)(misidentifications?|misapplied .*name|.*misapplication.*|incorrect identification)")){
|
718
|
//see ErmsTaxonImport.getAcceptedTaxaKeys()
|
719
|
synType = null;
|
720
|
taxonRelType = TaxonRelationshipType.MISAPPLIED_NAME_FOR();
|
721
|
}else if (unacceptreason.matches("(?i)(.*jun.*syn.*|\\(synonym\\)|reverted genus transfer)")){
|
722
|
handled = true; //no change
|
723
|
}else if (unacceptreason.matches("(?i)(currently (placed|held)|sy).*")){
|
724
|
handled = true; //no change
|
725
|
}
|
726
|
|
727
|
//name relations
|
728
|
if (unacceptreason.matches("(?i)(.*spell.*|lapsus .*)")){
|
729
|
nameType = NameRelationshipType.ORTHOGRAPHIC_VARIANT();
|
730
|
}else if (unacceptreason.matches("(?i).*homon.*")){
|
731
|
nameType = NameRelationshipType.LATER_HOMONYM();
|
732
|
}else if (unacceptreason.matches("(?i)(.*genus transfer.*|genus change)")){
|
733
|
//TODO check with above (synonym relations) reverted genus transfer
|
734
|
nameType = NameRelationshipType.BASIONYM();
|
735
|
}else if (unacceptreason.matches("(?i)(original combination|Subsequent combination)")){
|
736
|
nameType = NameRelationshipType.BASIONYM();
|
737
|
}else if (unacceptreason.matches("(?i).*bas[iy][no].*ny.*")){
|
738
|
nameType = NameRelationshipType.BASIONYM();
|
739
|
}
|
740
|
|
741
|
if(handled == false && SynonymType.SYNONYM_OF().equals(synType) &&
|
742
|
getSynTaxonRelType(state).equals(taxonRelType) && nameType == null){
|
743
|
logger.warn("Unaccept reason not yet handled: " + unacceptreason);
|
744
|
}
|
745
|
}
|
746
|
// update Match_RelStat set RelTaxon = 1 where tu_unacceptreason like '%bas[iy][no]%ny%'
|
747
|
// update Match_RelStat set RelTaxon = 1 where tu_unacceptreason = 'original combination' or tu_unacceptreason = 'Subsequent combination'
|
748
|
// update Match_RelStat set RelTaxon = 1 where tu_unacceptreason like '%genus transfer%' or tu_unacceptreason = 'genus change'
|
749
|
// update Match_RelStat set RelTaxon = 2 where tu_unacceptreason like '%homon%'
|
750
|
// update Match_RelStat set RelTaxon = 16 where tu_unacceptreason like '%spell%'
|
751
|
// update Match_RelStat set RelTaxon = 16 where tu_unacceptreason like 'lapsus calami%' --AM: lapsus% should be enough
|
752
|
|
753
|
// update Match_RelStat set RelTaxon = 102 where tu_unacceptreason like 'currently placed%'
|
754
|
// update Match_RelStat set RelTaxon = 102 where tu_unacceptreason like 'currently held%'
|
755
|
// update Match_RelStat set RelTaxon = 102 where tu_unacceptreason like 'sy%' or tu_unacceptreason like '%jun%syn%'
|
756
|
// update Match_RelStat set RelTaxon = 102 where tu_unacceptreason = '(synonym)'
|
757
|
// update Match_RelStat set RelTaxon = 102 where tu_unacceptreason = 'reverted genus transfer'
|
758
|
// update Match_RelStat set RelTaxon = 103 where tu_unacceptreason like 'misapplied%'
|
759
|
// update Match_RelStat set RelTaxon = 104 where tu_unacceptreason like 'part% synonym%'
|
760
|
// update Match_RelStat set RelTaxon = 106 where tu_unacceptreason = 'heterotypic synonym' or tu_unacceptreason = 'subjective synonym'
|
761
|
// update Match_RelStat set RelTaxon = 107 where tu_unacceptreason like '%homot%syn%' or tu_unacceptreason = 'objective synonym'
|
762
|
// update Match_RelStat set RelTaxon = 107 where tu_unacceptreason like '%bas[iy][no]%ny%'
|
763
|
//
|
764
|
|
765
|
if (synType != null){
|
766
|
result[0]= synType;
|
767
|
}
|
768
|
if (taxonRelType != null){
|
769
|
result[1]= taxonRelType;
|
770
|
}
|
771
|
if (nameType != null){
|
772
|
result[2]= nameType;
|
773
|
}
|
774
|
// if (hybridType != null){
|
775
|
// result[3]= hybridType;
|
776
|
// }
|
777
|
|
778
|
return result;
|
779
|
}
|
780
|
|
781
|
private TaxonRelationshipType getSynTaxonRelType(DbImportStateBase<?, ?> state) {
|
782
|
@SuppressWarnings("unchecked")
|
783
|
TaxonRelationshipType result = state.getCurrentIO().getTaxonRelationshipType(state,
|
784
|
TaxonRelationshipType.uuidSynonymOfTaxonRelationship,
|
785
|
"is taxon synonym of",
|
786
|
"is synonym of relation used by synonym that are of class Taxon as they can not be handled differently",
|
787
|
null, null);
|
788
|
return result;
|
789
|
}
|
790
|
|
791
|
private TaxonRelationshipType getHomoSynTaxonRelType(DbImportStateBase<?, ?> state) {
|
792
|
String labelHomoRel = "Heterotypic synonym taxon relationship";
|
793
|
@SuppressWarnings("unchecked")
|
794
|
TaxonRelationshipType result = state.getCurrentIO().getTaxonRelationshipType(
|
795
|
state, TaxonRelationshipType.uuidHomotypicSynonymTaxonRelationship, labelHomoRel, labelHomoRel, null, null);
|
796
|
return result;
|
797
|
}
|
798
|
|
799
|
private TaxonRelationshipType getHeteroSynTaxRelType(DbImportStateBase<?, ?> state) {
|
800
|
String labelHeteroRel = "Heterotypic synonym taxon relationship";
|
801
|
@SuppressWarnings("unchecked")
|
802
|
TaxonRelationshipType result = state.getCurrentIO().getTaxonRelationshipType(
|
803
|
state, TaxonRelationshipType.uuidHeterotypicSynonymTaxonRelationship, labelHeteroRel, labelHeteroRel, null, null);
|
804
|
return result;
|
805
|
}
|
806
|
|
807
|
|
808
|
}
|