2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.io
.berlinModel
;
12 import java
.sql
.ResultSet
;
13 import java
.sql
.SQLException
;
14 import java
.util
.UUID
;
16 import org
.apache
.log4j
.Logger
;
18 import eu
.etaxonomy
.cdm
.common
.ResultWrapper
;
19 import eu
.etaxonomy
.cdm
.io
.common
.mapping
.UndefinedTransformerMethodException
;
20 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
21 import eu
.etaxonomy
.cdm
.model
.common
.OrderedTermVocabulary
;
22 import eu
.etaxonomy
.cdm
.model
.common
.RelationshipBase
;
23 import eu
.etaxonomy
.cdm
.model
.common
.RelationshipTermBase
;
24 import eu
.etaxonomy
.cdm
.model
.common
.Representation
;
25 import eu
.etaxonomy
.cdm
.model
.description
.AbsenceTerm
;
26 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
27 import eu
.etaxonomy
.cdm
.model
.description
.PresenceAbsenceTermBase
;
28 import eu
.etaxonomy
.cdm
.model
.description
.PresenceTerm
;
29 import eu
.etaxonomy
.cdm
.model
.name
.HybridRelationshipType
;
30 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationshipType
;
31 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
32 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatusType
;
33 import eu
.etaxonomy
.cdm
.model
.name
.Rank
;
34 import eu
.etaxonomy
.cdm
.model
.name
.RankClass
;
35 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignationStatus
;
36 import eu
.etaxonomy
.cdm
.model
.reference
.ISectionBase
;
37 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
38 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceType
;
39 import eu
.etaxonomy
.cdm
.model
.taxon
.Synonym
;
40 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationshipType
;
41 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
42 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
43 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationshipType
;
44 import eu
.etaxonomy
.cdm
.strategy
.exceptions
.UnknownCdmTypeException
;
51 public class BerlinModelTransformer
{
52 private static final Logger logger
= Logger
.getLogger(BerlinModelTransformer
.class);
55 public static UUID uuidRankCollSpecies
= UUID
.fromString("e14630ee-9446-4bb4-a7b7-4c3881bc5d94");
56 public static UUID uuidRankProles
= UUID
.fromString("8810d1ba-6a34-4ae3-a355-919ccd1cd1a5");
57 public static UUID uuidRankRace
= UUID
.fromString("196dee39-cfd8-4460-8bf0-88b83da27f62");
58 public static UUID uuidRankSublusus
= UUID
.fromString("1fafa596-a8e7-4e62-a378-3cc8cb3627ca");
61 public static UUID euroMedUuid
= UUID
.fromString("9fe09988-58c0-4c06-8474-f660a0c50014");
63 public static UUID uuidEasternEuropeanRussia
= UUID
.fromString("3f013375-0e0a-40c3-8a14-84c0535fab40");
64 public static UUID uuidSerbiaMontenegro
= UUID
.fromString("8926dbe6-863e-47a9-98a0-7dc9ed2c57f7");
65 public static UUID uuidSerbia
= UUID
.fromString("4ffed197-3d7e-4cd9-8984-e64b8dee9512");
66 public static UUID uuidLebanonSyria
= UUID
.fromString("0c45f250-99da-4b19-aa89-c3e56cfdf103");
67 public static UUID uuidUssr
= UUID
.fromString("a512e00a-45f3-4be5-82fa-bba8d675696f");
68 public static UUID uuidSicilyMalta
= UUID
.fromString("424d81ee-d272-4ae8-9600-0a334049cd72");
70 public static UUID uuidDesertas
= UUID
.fromString("36f5e93e-34e8-45b5-a401-f0e0faad21cf");
71 public static UUID uuidMadeira
= UUID
.fromString("086e27ee-78ff-4236-aca9-9850850cd355");
72 public static UUID uuidPortoSanto
= UUID
.fromString("1f9ab6a0-a402-4dfe-8c5b-b1844eb4d8e5");
74 public static UUID uuidFlores
= UUID
.fromString("ef0067c2-8bbb-4e37-8462-97b03f51ba43");
75 public static UUID uuidCorvo
= UUID
.fromString("b1e6117c-2be1-43a3-9233-227dd90bdee9");
76 public static UUID uuidFaial
= UUID
.fromString("14f6dcdb-6524-4700-b80c-66424952ef2b");
77 public static UUID uuidGraciosa
= UUID
.fromString("05f93a7b-d813-4833-864f-eedbba747133");
78 public static UUID uuidSaoJorge
= UUID
.fromString("578e0ecd-b5e3-4c87-8ecc-0fc4c7e217d9");
79 public static UUID uuidSaoMiguel
= UUID
.fromString("0e2f6ad8-7afb-4f01-b134-4f71991e877a");
80 public static UUID uuidPico
= UUID
.fromString("98cc566f-4110-43d5-830f-68436a009f49");
81 public static UUID uuidSantaMaria
= UUID
.fromString("bd5e5d4a-22b7-41aa-8e58-1d1d73a9954d");
82 public static UUID uuidTerceira
= UUID
.fromString("6fc257c0-a131-41f0-b6c3-51ef9c4fa962");
84 public static UUID uuidGranCanaria
= UUID
.fromString("a0240c35-0e05-4157-8321-67ba8e31fdb9");
85 public static UUID uuidFuerteventura
= UUID
.fromString("549ce2c1-6d49-4bf3-b75d-cf3f4b5a1398");
86 public static UUID uuidGomera
= UUID
.fromString("895fab09-7478-4210-b42a-423d23c6f85e");
87 public static UUID uuidHierro
= UUID
.fromString("d137b6a5-31bc-418c-9403-f042017dc04b");
88 public static UUID uuidLanzaroteWithGraciosa
= UUID
.fromString("c9b08dc1-f301-4d9d-b447-b8744602c776");
89 public static UUID uuidLaPalma
= UUID
.fromString("fdb3f2b2-f154-4f04-9f31-240a47a0e780");
90 public static UUID uuidTenerife
= UUID
.fromString("73658c7e-a568-465e-bd84-4554fc93ca56");
92 public static UUID uuidIbizaWithFormentera
= UUID
.fromString("1cda2a33-3469-49d5-8e77-cb5451110519");
93 public static UUID uuidMallorca
= UUID
.fromString("a10cba04-b4b5-4a4b-b69a-fcd4b3916fec");
94 public static UUID uuidMenorca
= UUID
.fromString("9f6ede48-27f8-4270-bf4e-c97eaa86aab7");
97 public static UUID uuidRussiaNorthern
= UUID
.fromString("c23bc1c9-a775-4426-b883-07d4d7d47eed");
98 public static UUID uuidRussiaBaltic
= UUID
.fromString("579dad44-9439-4b19-8716-ab90d8f27944");
99 public static UUID uuidRussiaCentral
= UUID
.fromString("8bbc8c6a-2ef2-4024-ad51-66fe34c70092");
100 public static UUID uuidRussiaSouthWest
= UUID
.fromString("daa5c207-5567-4690-8742-5e4d153b6a64");
101 public static UUID uuidRussiaSouthEast
= UUID
.fromString("e8516598-b529-489e-9ee8-63bbbd295c1b");
102 public static UUID uuidEastAegeanIslands
= UUID
.fromString("1c429593-c493-46e6-971a-0d70be690da8");
103 public static UUID uuidTurkishEastAegeanIslands
= UUID
.fromString("ba35dba3-ac70-41ae-81c2-2070943f44f2");
104 public static UUID uuidBalticStates
= UUID
.fromString("bf9d64f6-3183-4fa5-8e90-73090e7a2282");
105 public static final UUID uuidTurkey
= UUID
.fromString("d344ee2c-14c8-438d-b03d-11538edb1268");
106 public static final UUID uuidCaucasia
= UUID
.fromString("ebfd3fd1-3859-4e5e-95c7-f66010599d7e");
109 public static final UUID uuidUkraineAndCrimea
= UUID
.fromString("99d4d1c2-09f6-416e-86a3-bdde5cae52af");
110 public static final UUID uuidAzerbaijanNakhichevan
= UUID
.fromString("232fbef0-9f4a-4cab-8ac1-e14c717e9de6");
113 public static final UUID uuidMisappliedCommonName
= UUID
.fromString("25f5cfc3-16ab-4aba-a008-0db0f2cf7f9d");
116 public static final UUID uuidSpeciesExpertName
= UUID
.fromString("2e8153d2-7412-49e4-87e1-5c38f4c5153a");
117 public static final UUID uuidExpertName
= UUID
.fromString("24becb79-a90c-47d3-be35-efc87bb48fd3");
119 public static final UUID DETAIL_EXT_UUID
= UUID
.fromString("c3959b4f-d876-4b7a-a739-9260f4cafd1c");
120 public static final UUID ID_IN_SOURCE_EXT_UUID
= UUID
.fromString("23dac094-e793-40a4-bad9-649fc4fcfd44");
123 public static final UUID uuidLangMajorcan
= UUID
.fromString("82d696d7-cb4e-49de-ac89-63a0e12ca766");
126 public static int REF_ARTICLE
= 1;
127 public static int REF_PART_OF_OTHER_TITLE
= 2;
128 public static int REF_BOOK
= 3;
129 public static int REF_DATABASE
= 4;
130 public static int REF_INFORMAL
= 5;
131 public static int REF_NOT_APPLICABLE
= 6;
132 public static int REF_WEBSITE
= 7;
133 public static int REF_CD
= 8;
134 public static int REF_JOURNAL
= 9;
135 public static int REF_UNKNOWN
= 10;
136 public static int REF_PRINT_SERIES
= 55;
137 public static int REF_CONFERENCE_PROCEEDINGS
= 56;
138 public static int REF_JOURNAL_VOLUME
= 57;
143 public static int NAME_ST_NOM_INVAL
= 1;
144 public static int NAME_ST_NOM_ILLEG
= 2;
145 public static int NAME_ST_NOM_NUD
= 3;
146 public static int NAME_ST_NOM_REJ
= 4;
147 public static int NAME_ST_NOM_REJ_PROP
= 5;
148 public static int NAME_ST_NOM_UTIQUE_REJ
= 6;
149 public static int NAME_ST_NOM_UTIQUE_REJ_PROP
= 7;
150 public static int NAME_ST_NOM_CONS
= 8;
151 public static int NAME_ST_NOM_CONS_PROP
= 9;
152 public static int NAME_ST_ORTH_CONS
= 10;
153 public static int NAME_ST_ORTH_CONS_PROP
= 11;
154 public static int NAME_ST_NOM_SUPERFL
= 12;
155 public static int NAME_ST_NOM_AMBIG
= 13;
156 public static int NAME_ST_NOM_PROVIS
= 14;
157 public static int NAME_ST_NOM_DUB
= 15;
158 public static int NAME_ST_NOM_NOV
= 16;
159 public static int NAME_ST_NOM_CONFUS
= 17;
160 public static int NAME_ST_NOM_ALTERN
= 18;
161 public static int NAME_ST_COMB_INVAL
= 19;
165 public static int NAME_REL_IS_BASIONYM_FOR
= 1;
166 public static int NAME_REL_IS_LATER_HOMONYM_OF
= 2;
167 public static int NAME_REL_IS_REPLACED_SYNONYM_FOR
= 3;
168 public static int NAME_REL_IS_VALIDATION_OF
= 4;
169 public static int NAME_REL_IS_LATER_VALIDATION_OF
= 5;
170 public static int NAME_REL_IS_TYPE_OF
= 6;
171 public static int NAME_REL_IS_CONSERVED_TYPE_OF
=7;
172 public static int NAME_REL_IS_REJECTED_TYPE_OF
= 8;
173 public static int NAME_REL_IS_FIRST_PARENT_OF
= 9;
174 public static int NAME_REL_IS_SECOND_PARENT_OF
= 10;
175 public static int NAME_REL_IS_FEMALE_PARENT_OF
= 11;
176 public static int NAME_REL_IS_MALE_PARENT_OF
= 12;
177 public static int NAME_REL_IS_CONSERVED_AGAINST
=13;
178 public static int NAME_REL_IS_REJECTED_IN_FAVOUR_OF
= 14;
179 public static int NAME_REL_IS_TREATED_AS_LATER_HOMONYM_OF
= 15;
180 public static int NAME_REL_IS_ORTHOGRAPHIC_VARIANT_OF
= 16;
181 public static int NAME_REL_IS_ALTERNATIVE_NAME_FOR
= 17;
182 public static int NAME_REL_HAS_SAME_TYPE_AS
= 18;
183 public static int NAME_REL_IS_LECTOTYPE_OF
= 61;
184 public static int NAME_REL_TYPE_NOT_DESIGNATED
= 62;
187 public static String NAME_FACT_PROTOLOGUE
= "Protologue";
188 public static String NAME_FACT_ALSO_PUBLISHED_IN
= "Also published in";
189 public static String NAME_FACT_BIBLIOGRAPHY
= "Bibliography";
192 public static int TAX_REL_IS_INCLUDED_IN
= 1;
193 public static int TAX_REL_IS_SYNONYM_OF
= 2;
194 public static int TAX_REL_IS_MISAPPLIED_NAME_OF
= 3;
195 public static int TAX_REL_IS_PROPARTE_SYN_OF
= 4;
196 public static int TAX_REL_IS_PARTIAL_SYN_OF
= 5;
197 public static int TAX_REL_IS_HETEROTYPIC_SYNONYM_OF
= 6;
198 public static int TAX_REL_IS_HOMOTYPIC_SYNONYM_OF
= 7;
199 public static int TAX_REL_IS_PROPARTE_HOMOTYPIC_SYNONYM_OF
= 101;
200 public static int TAX_REL_IS_PROPARTE_HETEROTYPIC_SYNONYM_OF
= 102;
201 public static int TAX_REL_IS_PARTIAL_HOMOTYPIC_SYNONYM_OF
= 103;
202 public static int TAX_REL_IS_PARTIAL_HETEROTYPIC_SYNONYM_OF
= 104;
207 public static int T_STATUS_ACCEPTED
= 1;
208 public static int T_STATUS_SYNONYM
= 2;
209 public static int T_STATUS_PARTIAL_SYN
= 3;
210 public static int T_STATUS_PRO_PARTE_SYN
= 4;
211 public static int T_STATUS_UNRESOLVED
= 5;
212 public static int T_STATUS_ORPHANED
= 6;
216 public static int FACT_DESCRIPTION
= 1;
217 public static int FACT_GROWTH_FORM
= 2;
218 public static int FACT_HARDINESS
= 3;
219 public static int FACT_ECOLOGY
= 4;
220 public static int FACT_PHENOLOGY
= 5;
221 public static int FACT_KARYOLOGY
= 6;
222 public static int FACT_ILLUSTRATION
= 7;
223 public static int FACT_IDENTIFICATION
= 8;
224 public static int FACT_OBSERVATION
= 9;
225 public static int FACT_DISTRIBUTION_EM
= 10;
226 public static int FACT_DISTRIBUTION_WORLD
= 11;
228 public static final UUID uuidFeatureMaps
= UUID
.fromString("8367730e-f3c3-4361-8360-a2057e4295ed");
229 public static final UUID uuidFeatureConservationStatus
= UUID
.fromString("a32f33cd-1966-4a22-986c-94c5e688bbd1");
230 public static final UUID uuidFeatureUse
= UUID
.fromString("199bbbd8-2db6-4335-b454-2e92ae02b699");
231 public static final UUID uuidFeatureComments
= UUID
.fromString("31cc2b92-5cad-44e9-b50f-b8af591a527c");
232 public static final UUID uuidFeatureDistrEM
= UUID
.fromString("a5ba7e7f-ca7f-4f50-afc7-73e76b3231d4");
233 public static final UUID uuidFeatureDistrWorld
= UUID
.fromString("e4e24080-7017-47e6-924e-d2560fa68fb8");
234 public static final UUID uuidFeatureEditorBrackets
= UUID
.fromString("b3b5bc1a-7ba8-4a39-9c0d-63ba599eb5d8");
235 public static final UUID uuidFeatureEditorParenthesis
= UUID
.fromString("6ee10a2e-ff02-4cf4-a520-89630edc5b44");
236 public static final UUID uuidFeatureInedited
= UUID
.fromString("c93e2968-bc52-4165-9755-ce37611faf01");
237 public static final UUID uuidFeatureCommentsEditing
= UUID
.fromString("7a155021-158a-48bb-81d0-9a72b718e2de");
241 public static UUID uuidNomStatusCombIned
= UUID
.fromString("dde8a2e7-bf9e-42ec-b186-d5bde9c9c128");
242 public static UUID uuidNomStatusSpNovIned
= UUID
.fromString("1a359ca1-9364-43bc-93e4-834bdcd52b72");
243 public static UUID uuidNomStatusNomOrthCons
= UUID
.fromString("0f838183-ffa0-4014-928e-0e3a27eb3918");
245 static NomenclaturalStatusType nomStatusCombIned
;
246 static NomenclaturalStatusType nomStatusSpNovIned
;
247 static NomenclaturalStatusType nomStatusNomOrthCons
;
249 public static NomenclaturalStatusType
nomStatusTypeAbbrev2NewNomStatusType(String nomStatus
){
250 NomenclaturalStatusType result
= null;
251 if (nomStatus
== null){
253 }else if (nomStatus
.equalsIgnoreCase("comb. ined.")){
254 if (nomStatusCombIned
== null){
255 nomStatusCombIned
= new NomenclaturalStatusType();
256 Representation representation
= Representation
.NewInstance("comb. ined.", "comb. ined.", "comb. ined.", Language
.LATIN());
257 nomStatusCombIned
.addRepresentation(representation
);
258 nomStatusCombIned
.setUuid(uuidNomStatusCombIned
);
259 NomenclaturalStatusType
.ALTERNATIVE().getVocabulary().addTerm(nomStatusCombIned
);
261 result
= nomStatusCombIned
;
262 }else if (nomStatus
.equalsIgnoreCase("sp. nov. ined.")){
263 if (nomStatusSpNovIned
== null){
264 nomStatusSpNovIned
= new NomenclaturalStatusType();
265 Representation representation
= Representation
.NewInstance("sp. nov. ined.", "sp. nov. ined.", "sp. nov. ined.", Language
.LATIN());
266 nomStatusSpNovIned
.addRepresentation(representation
);
267 nomStatusSpNovIned
.setUuid(uuidNomStatusSpNovIned
);
268 NomenclaturalStatusType
.ALTERNATIVE().getVocabulary().addTerm(nomStatusSpNovIned
);
270 result
= nomStatusSpNovIned
;
271 }else if (nomStatus
.equalsIgnoreCase("nom. & orth. cons.")){
272 if (nomStatusNomOrthCons
== null){
273 nomStatusNomOrthCons
= new NomenclaturalStatusType();
274 Representation representation
= Representation
.NewInstance("nom. & orth. cons.", "nom. & orth. cons.", "nom. & orth. cons.", Language
.LATIN());
275 nomStatusNomOrthCons
.addRepresentation(representation
);
276 nomStatusNomOrthCons
.setUuid(uuidNomStatusNomOrthCons
);
277 NomenclaturalStatusType
.ALTERNATIVE().getVocabulary().addTerm(nomStatusNomOrthCons
);
279 result
= nomStatusNomOrthCons
;
285 public static NomenclaturalStatus
nomStatusFkToNomStatus(int nomStatusFk
, String nomStatusLabel
) throws UnknownCdmTypeException
{
286 if (nomStatusFk
== NAME_ST_NOM_INVAL
){
287 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.INVALID());
288 }else if (nomStatusFk
== NAME_ST_NOM_ILLEG
){
289 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.ILLEGITIMATE());
290 }else if (nomStatusFk
== NAME_ST_NOM_NUD
){
291 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.NUDUM());
292 }else if (nomStatusFk
== NAME_ST_NOM_REJ
){
293 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.REJECTED());
294 }else if (nomStatusFk
== NAME_ST_NOM_REJ_PROP
){
295 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.REJECTED_PROP());
296 }else if (nomStatusFk
== NAME_ST_NOM_UTIQUE_REJ
){
297 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.UTIQUE_REJECTED());
298 }else if (nomStatusFk
== NAME_ST_NOM_UTIQUE_REJ_PROP
){
299 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.UTIQUE_REJECTED_PROP());
300 }else if (nomStatusFk
== NAME_ST_NOM_CONS
){
301 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.CONSERVED());
302 }else if (nomStatusFk
== NAME_ST_NOM_CONS_PROP
){
303 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.CONSERVED_PROP());
304 }else if (nomStatusFk
== NAME_ST_ORTH_CONS
){
305 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.ORTHOGRAPHY_CONSERVED());
306 }else if (nomStatusFk
== NAME_ST_ORTH_CONS_PROP
){
307 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.ORTHOGRAPHY_CONSERVED_PROP());
308 }else if (nomStatusFk
== NAME_ST_NOM_SUPERFL
){
309 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.SUPERFLUOUS());
310 }else if (nomStatusFk
== NAME_ST_NOM_AMBIG
){
311 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.AMBIGUOUS());
312 }else if (nomStatusFk
== NAME_ST_NOM_PROVIS
){
313 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.PROVISIONAL());
314 }else if (nomStatusFk
== NAME_ST_NOM_DUB
){
315 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.DOUBTFUL());
316 }else if (nomStatusFk
== NAME_ST_NOM_NOV
){
317 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.NOVUM());
318 }else if (nomStatusFk
== NAME_ST_NOM_CONFUS
){
319 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.CONFUSUM());
320 }else if (nomStatusFk
== NAME_ST_NOM_ALTERN
){
321 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.ALTERNATIVE());
322 }else if (nomStatusFk
== NAME_ST_COMB_INVAL
){
323 return NomenclaturalStatus
.NewInstance(NomenclaturalStatusType
.COMBINATION_INVALID());
325 NomenclaturalStatusType statusType
= nomStatusTypeAbbrev2NewNomStatusType(nomStatusLabel
);
326 NomenclaturalStatus result
= NomenclaturalStatus
.NewInstance(statusType
);
330 throw new UnknownCdmTypeException("Unknown NomenclaturalStatus (id=" + Integer
.valueOf(nomStatusFk
).toString() + ")");
336 public static SpecimenTypeDesignationStatus
typeStatusId2TypeStatus (int typeStatusId
) throws UnknownCdmTypeException
{
337 switch (typeStatusId
){
339 case 1: return SpecimenTypeDesignationStatus
.HOLOTYPE();
340 case 2: return SpecimenTypeDesignationStatus
.LECTOTYPE();
341 case 3: return SpecimenTypeDesignationStatus
.NEOTYPE();
342 case 4: return SpecimenTypeDesignationStatus
.EPITYPE();
343 case 5: return SpecimenTypeDesignationStatus
.ISOLECTOTYPE();
344 case 6: return SpecimenTypeDesignationStatus
.ISONEOTYPE();
345 case 7: return SpecimenTypeDesignationStatus
.ISOTYPE();
346 case 8: return SpecimenTypeDesignationStatus
.PARANEOTYPE();
347 case 9: return SpecimenTypeDesignationStatus
.PARATYPE();
348 case 10: return SpecimenTypeDesignationStatus
.SECOND_STEP_LECTOTYPE();
349 case 11: return SpecimenTypeDesignationStatus
.SECOND_STEP_NEOTYPE();
350 case 12: return SpecimenTypeDesignationStatus
.SYNTYPE();
351 case 21: return SpecimenTypeDesignationStatus
.ICONOTYPE();
352 case 22: return SpecimenTypeDesignationStatus
.PHOTOTYPE();
354 throw new UnknownCdmTypeException("Unknown TypeDesignationStatus (id=" + Integer
.valueOf(typeStatusId
).toString() + ")");
360 public static TaxonRelationshipType
taxonRelId2TaxonRelType (int relTaxonTypeId
, ResultWrapper
<Boolean
> isInverse
) throws UnknownCdmTypeException
{
361 isInverse
.setValue(false);
362 switch (relTaxonTypeId
){
364 case 11: return TaxonRelationshipType
.CONGRUENT_TO();
365 case 12: isInverse
.setValue(true); return TaxonRelationshipType
.INCLUDES();
366 case 13: isInverse
.setValue(true); return TaxonRelationshipType
.CONGRUENT_OR_INCLUDES();
367 case 14: return TaxonRelationshipType
.INCLUDES();
368 case 15: return TaxonRelationshipType
.CONGRUENT_OR_INCLUDES();
369 case 16: return TaxonRelationshipType
.INCLUDED_OR_INCLUDES();
370 case 17: return TaxonRelationshipType
.CONGRUENT_OR_INCLUDED_OR_INCLUDES();
371 case 18: return TaxonRelationshipType
.OVERLAPS();
372 case 19: return TaxonRelationshipType
.CONGRUENT_OR_OVERLAPS();
373 case 20: isInverse
.setValue(true); return TaxonRelationshipType
.INCLUDES_OR_OVERLAPS();
374 case 21: isInverse
.setValue(true); return TaxonRelationshipType
.CONGRUENT_OR_INCLUDES_OR_OVERLAPS();
375 case 22: return TaxonRelationshipType
.INCLUDES_OR_OVERLAPS();
376 case 23: return TaxonRelationshipType
.CONGRUENT_OR_INCLUDES_OR_OVERLAPS();
377 case 24: return TaxonRelationshipType
.INCLUDED_OR_INCLUDES_OR_OVERLAPS();
379 case 26: return TaxonRelationshipType
.EXCLUDES();
381 //TODO other relationshipTypes
383 case 40: return TaxonRelationshipType
.NOT_CONGRUENT_TO();
386 case 43: return TaxonRelationshipType
.CONGRUENT_TO();
388 throw new UnknownCdmTypeException("Unknown TypeDesignationStatus (id=" + Integer
.valueOf(relTaxonTypeId
).toString() + ")");
394 public static HybridRelationshipType
relNameId2HybridRel (int relNameId
) throws UnknownCdmTypeException
{
397 case 9: return HybridRelationshipType
.FIRST_PARENT();
398 case 10: return HybridRelationshipType
.SECOND_PARENT();
399 case 11: return HybridRelationshipType
.FEMALE_PARENT();
400 case 12: return HybridRelationshipType
.MALE_PARENT();
402 throw new UnknownCdmTypeException("Unknown HybridRelationshipType (id=" + Integer
.valueOf(relNameId
).toString() + ")");
408 public static PresenceAbsenceTermBase
<?
> occStatus2PresenceAbsence (int occStatusId
) throws UnknownCdmTypeException
{
409 switch (occStatusId
){
411 case 110: return AbsenceTerm
.CULTIVATED_REPORTED_IN_ERROR();
412 case 120: return PresenceTerm
.CULTIVATED();
413 case 210: return AbsenceTerm
.INTRODUCED_REPORTED_IN_ERROR();
414 case 220: return PresenceTerm
.INTRODUCED_PRESENCE_QUESTIONABLE();
415 case 230: return AbsenceTerm
.INTRODUCED_FORMERLY_INTRODUCED();
416 case 240: return PresenceTerm
.INTRODUCED_DOUBTFULLY_INTRODUCED();
417 case 250: return PresenceTerm
.INTRODUCED();
418 case 260: return PresenceTerm
.INTRODUCED_UNCERTAIN_DEGREE_OF_NATURALISATION();
419 case 270: return PresenceTerm
.INTRODUCED_ADVENTITIOUS();
420 case 280: return PresenceTerm
.INTRODUCED_NATURALIZED();
421 case 310: return AbsenceTerm
.NATIVE_REPORTED_IN_ERROR();
422 case 320: return PresenceTerm
.NATIVE_PRESENCE_QUESTIONABLE();
423 case 330: return AbsenceTerm
.NATIVE_FORMERLY_NATIVE();
424 case 340: return PresenceTerm
.NATIVE_DOUBTFULLY_NATIVE();
425 case 350: return PresenceTerm
.NATIVE();
427 logger
.info("endemic for EM can not be transformed in legal status. Used 'PRESENT' instead");
429 return PresenceTerm
.PRESENT();
432 throw new UnknownCdmTypeException("Unknown occurrence status (id=" + Integer
.valueOf(occStatusId
).toString() + ")");
439 public static Feature
factCategory2Feature (int factCategoryId
) throws UnknownCdmTypeException
{
440 switch (factCategoryId
){
442 case 1: return Feature
.DESCRIPTION();
443 case 4: return Feature
.ECOLOGY();
444 case 5: return Feature
.PHENOLOGY();
445 case 12: return Feature
.COMMON_NAME();
446 case 13: return Feature
.OCCURRENCE();
447 case 99: return Feature
.CITATION();
449 throw new UnknownCdmTypeException("Unknown FactCategory (id=" + Integer
.valueOf(factCategoryId
).toString() + ")");
454 public static UUID
getFeatureUuid(String key
) throws UndefinedTransformerMethodException
{
457 }else if (key
.equalsIgnoreCase("14-Maps")){ return uuidFeatureMaps
;
458 }else if (key
.equalsIgnoreCase("301-Conservation Status")){ return uuidFeatureConservationStatus
;
459 }else if (key
.equalsIgnoreCase("302-Use")){ return uuidFeatureUse
;
460 }else if (key
.equalsIgnoreCase("303-Comments")){ return uuidFeatureComments
;
462 }else if (key
.equalsIgnoreCase("10-general distribution (Euro+Med)")){ return uuidFeatureDistrEM
;
463 }else if (key
.equalsIgnoreCase("11-general distribution (world)")){ return uuidFeatureDistrWorld
;
464 }else if (key
.equalsIgnoreCase("250-Editor_Brackets")){ return uuidFeatureEditorBrackets
;
465 }else if (key
.equalsIgnoreCase("251-Editor_Parenthesis")){ return uuidFeatureEditorParenthesis
;
466 }else if (key
.equalsIgnoreCase("252-Inedited")){ return uuidFeatureInedited
;
467 }else if (key
.equalsIgnoreCase("253-Comments on editing process")){ return uuidFeatureCommentsEditing
;
475 static Rank collSpeciesRank
;
480 private static Rank
rankId2NewRank(Integer rankId
, boolean switchRank
) {
484 }else if (rankId
== 57){
486 if (collSpeciesRank
== null){
487 collSpeciesRank
= Rank
.NewInstance(RankClass
.SpeciesGroup
, "Collective species", "Coll. species", "coll.");
488 collSpeciesRank
.setUuid(uuidRankCollSpecies
);
489 OrderedTermVocabulary
<Rank
> voc
= (OrderedTermVocabulary
<Rank
>)Rank
.SPECIES().getVocabulary();
490 voc
.addTermBelow(collSpeciesRank
, Rank
.SPECIESGROUP());
492 result
= collSpeciesRank
;
498 public static Rank
rankId2Rank (ResultSet rs
, boolean useUnknown
, boolean switchSpeciesGroup
) throws UnknownCdmTypeException
{
501 int rankId
= rs
.getInt("rankFk");
503 String abbrev
= rs
.getString("rankAbbrev");
504 String rankName
= rs
.getString("rank");
505 if (logger
.isDebugEnabled()){logger
.debug(rankId
);}
506 if (logger
.isDebugEnabled()){logger
.debug(abbrev
);}
507 if (logger
.isDebugEnabled()){logger
.debug(rankName
);}
509 if (switchSpeciesGroup
){
512 }else if (rankId
== 57){
517 result
= Rank
.getRankByNameOrAbbreviation(abbrev
);
518 } catch (UnknownCdmTypeException e
) {
520 result
= Rank
.getRankByNameOrAbbreviation(rankName
);
521 } catch (UnknownCdmTypeException e1
) {
524 case 1: return Rank
.KINGDOM();
525 case 3: return Rank
.SUBKINGDOM();
526 case 5: return Rank
.PHYLUM();
527 case 7: return Rank
.SUBPHYLUM();
528 case 8: return Rank
.DIVISION();
529 case 9: return Rank
.SUBDIVISION();
530 case 10: return Rank
.CLASS();
531 case 13: return Rank
.SUBCLASS();
532 case 16: return Rank
.SUPERORDER();
533 case 18: return Rank
.ORDER();
534 case 19: return Rank
.SUBORDER();
535 case 20: return Rank
.FAMILY();
536 case 25: return Rank
.SUBFAMILY();
537 case 30: return Rank
.TRIBE();
538 case 35: return Rank
.SUBTRIBE();
539 case 40: return Rank
.GENUS();
540 case 42: return Rank
.SUBGENUS();
541 case 45: return Rank
.SECTION_BOTANY();
542 case 47: return Rank
.SUBSECTION_BOTANY();
543 case 50: return Rank
.SERIES();
544 case 52: return Rank
.SUBSERIES();
545 case 58: return Rank
.SPECIESAGGREGATE();
546 case 59: return Rank
.SPECIESGROUP();
547 case 60: return Rank
.SPECIES();
548 case 61: return Rank
.GREX();
549 case 65: return Rank
.SUBSPECIES();
550 case 68: return Rank
.CONVAR();
551 case 70: return Rank
.VARIETY();
552 case 73: return Rank
.SUBVARIETY();
553 case 80: return Rank
.FORM();
554 case 82: return Rank
.SUBFORM();
555 case 84: return Rank
.SPECIALFORM();
556 case 98: return Rank
.INFRAGENERICTAXON();
557 case 99: return Rank
.INFRASPECIFICTAXON();
559 case 750: return Rank
.SUPERCLASS();
560 case 780: return Rank
.INFRACLASS();
561 case 820: return Rank
.INFRAORDER();
563 case 830: return Rank
.SUPERFAMILY();
566 Rank rank
= rankId2NewRank(57, switchSpeciesGroup
);
571 logger
.error("Rank unknown: " + rankId
+ ". Created UNKNOWN_RANK");
572 return Rank
.UNKNOWN_RANK();
574 throw new UnknownCdmTypeException("Unknown Rank id" + Integer
.valueOf(rankId
).toString());
580 } catch (SQLException e
) {
582 logger
.warn("Exception occurred. Created UNKNOWN_RANK instead");
583 return Rank
.UNKNOWN_RANK();
588 public static Integer
rank2RankId (Rank rank
){
592 else if (rank
.equals(Rank
.KINGDOM())){ return 1;}
593 else if (rank
.equals(Rank
.SUBKINGDOM())){ return 3;}
594 else if (rank
.equals(Rank
.PHYLUM())){ return 5;}
595 else if (rank
.equals(Rank
.SUBPHYLUM())){ return 7;}
596 else if (rank
.equals(Rank
.DIVISION())){ return 8;}
597 else if (rank
.equals(Rank
.SUBDIVISION())){ return 9;}
599 else if (rank
.equals(Rank
.CLASS())){ return 10;}
600 else if (rank
.equals(Rank
.SUBCLASS())){ return 13;}
601 else if (rank
.equals(Rank
.SUPERORDER())){ return 16;}
602 else if (rank
.equals(Rank
.ORDER())){ return 18;}
603 else if (rank
.equals(Rank
.SUBORDER())){ return 19;}
604 else if (rank
.equals(Rank
.FAMILY())){ return 20;}
605 else if (rank
.equals(Rank
.SUBFAMILY())){ return 25;}
606 else if (rank
.equals(Rank
.TRIBE())){ return 30;}
607 else if (rank
.equals(Rank
.SUBTRIBE())){ return 35;}
608 else if (rank
.equals(Rank
.GENUS())){ return 40;}
609 else if (rank
.equals(Rank
.SUBGENUS())){ return 42;}
610 else if (rank
.equals(Rank
.SECTION_BOTANY())){ return 45;}
611 else if (rank
.equals(Rank
.SUBSECTION_BOTANY())){ return 47;}
612 else if (rank
.equals(Rank
.SERIES())){ return 50;}
613 else if (rank
.equals(Rank
.SUBSERIES())){ return 52;}
614 else if (rank
.equals(Rank
.SPECIESAGGREGATE())){ return 58;}
616 // else if (rank.equals(Rank.XXX())){ return 59;}
617 else if (rank
.equals(Rank
.SPECIES())){ return 60;}
618 else if (rank
.equals(Rank
.SUBSPECIES())){ return 65;}
619 else if (rank
.equals(Rank
.CONVAR())){ return 68;}
620 else if (rank
.equals(Rank
.VARIETY())){ return 70;}
621 else if (rank
.equals(Rank
.SUBVARIETY())){ return 73;}
622 else if (rank
.equals(Rank
.FORM())){ return 80;}
623 else if (rank
.equals(Rank
.SUBFORM())){ return 82;}
624 else if (rank
.equals(Rank
.SPECIALFORM())){ return 84;}
625 else if (rank
.equals(Rank
.INFRAGENERICTAXON())){ return 98;}
626 else if (rank
.equals(Rank
.INFRASPECIFICTAXON())){ return 99;}
628 else if (rank
.equals(Rank
.SUPERCLASS())){ return 750;}
629 else if (rank
.equals(Rank
.INFRACLASS())){ return 780;}
630 else if (rank
.equals(Rank
.INFRAORDER())){ return 820;}
631 else if (rank
.equals(Rank
.SUPERFAMILY())){ return 830;}
635 logger
.warn("Rank not yet supported in Berlin Model: "+ rank
.getLabel());
640 public static Integer
textData2FactCategoryFk (Feature feature
){
641 if (feature
== null){return null;}
642 if (feature
.equals(Feature
.DESCRIPTION())){
644 }else if (feature
.equals(Feature
.ECOLOGY())){
646 }else if (feature
.equals(Feature
.PHENOLOGY())){
648 }else if (feature
.equals(Feature
.COMMON_NAME())){
650 }else if (feature
.equals(Feature
.OCCURRENCE())){
652 }else if (feature
.equals(Feature
.CITATION())){
655 logger
.debug("Unknown Feature.");
661 public static Integer
taxonBase2statusFk (TaxonBase
<?
> taxonBase
){
662 if (taxonBase
== null){return null;}
663 if (taxonBase
.isInstanceOf(Taxon
.class)){
664 return T_STATUS_ACCEPTED
;
665 }else if (taxonBase
.isInstanceOf(Synonym
.class)){
666 return T_STATUS_SYNONYM
;
668 logger
.warn("Unknown ");
669 return T_STATUS_UNRESOLVED
;
672 // public static int T_STATUS_PARTIAL_SYN = 3;
673 // public static int T_STATUS_PRO_PARTE_SYN = 4;
674 // public static int T_STATUS_UNRESOLVED = 5;
675 // public static int T_STATUS_ORPHANED = 6;
678 public static Integer
ref2refCategoryId (Reference
<?
> ref
){
682 else if (ref
.getType().equals(ReferenceType
.Article
)){ return REF_ARTICLE
;}
683 else if (ref
instanceof ISectionBase
){ return REF_PART_OF_OTHER_TITLE
;}
684 else if (ref
.getType().equals(ReferenceType
.Book
)){ return REF_BOOK
;}
685 else if (ref
.getType().equals(ReferenceType
.Database
)){ return REF_DATABASE
;}
686 // else if (ref instanceof SectionBas){ return REF_INFORMAL;}
687 // else if (ref instanceof SectionBas){ return REF_NOT_APPLICABLE;}
688 else if (ref
.getType().equals(ReferenceType
.WebPage
)){ return REF_WEBSITE
;}
689 else if (ref
.getType().equals(ReferenceType
.CdDvd
)){ return REF_CD
;}
690 else if (ref
.getType().equals(ReferenceType
.Journal
)){ return REF_JOURNAL
;}
691 else if (ref
.getType().equals(ReferenceType
.Generic
)){ return REF_UNKNOWN
;}
692 else if (ref
.getType().equals(ReferenceType
.PrintSeries
)){
693 logger
.warn("Print Series is not a standard Berlin Model category");
694 return REF_PRINT_SERIES
;
696 else if (ref
.getType().equals(ReferenceType
.Proceedings
)){
697 logger
.warn("Proceedings is not a standard Berlin Model category");
698 return REF_CONFERENCE_PROCEEDINGS
;
700 // else if (ref instanceof ){ return REF_JOURNAL_VOLUME;}
701 else if (ref
.getType().equals(ReferenceType
.Patent
)){ return REF_NOT_APPLICABLE
;}
702 else if (ref
.getType().equals(ReferenceType
.PersonalCommunication
)){ return REF_INFORMAL
;}
703 else if (ref
.getType().equals(ReferenceType
.Report
)){ return REF_NOT_APPLICABLE
;}
704 else if (ref
.getType().equals(ReferenceType
.Thesis
)){ return REF_NOT_APPLICABLE
;}
705 else if (ref
.getType().equals(ReferenceType
.Report
)){ return REF_NOT_APPLICABLE
;}
709 logger
.warn("Reference type not yet supported in Berlin Model: "+ ref
.getClass().getSimpleName());
715 public static Integer
taxRelation2relPtQualifierFk (RelationshipBase
<?
,?
,?
> rel
){
719 // else if (rel instanceof SynonymRelationship){
721 // }else if (rel instanceof TaxonRelationship){
722 RelationshipTermBase
<?
> type
= rel
.getType();
723 if (type
.equals(TaxonRelationshipType
.TAXONOMICALLY_INCLUDED_IN())) {return TAX_REL_IS_INCLUDED_IN
;
724 }else if (type
.equals(TaxonRelationshipType
.MISAPPLIED_NAME_FOR())) {return TAX_REL_IS_MISAPPLIED_NAME_OF
;
725 }else if (type
.equals(SynonymRelationshipType
.SYNONYM_OF())) {return TAX_REL_IS_SYNONYM_OF
;
726 }else if (type
.equals(SynonymRelationshipType
.HOMOTYPIC_SYNONYM_OF())) {return TAX_REL_IS_HOMOTYPIC_SYNONYM_OF
;
727 }else if (type
.equals(SynonymRelationshipType
.HETEROTYPIC_SYNONYM_OF())) {return TAX_REL_IS_HETEROTYPIC_SYNONYM_OF
;
728 }else if (type
.equals(TaxonRelationshipType
.CONGRUENT_TO())) {return 11;
729 // public static int TAX_REL_IS_PROPARTE_SYN_OF = 4;
730 // public static int TAX_REL_IS_PARTIAL_SYN_OF = 5;
731 // public static int TAX_REL_IS_PROPARTE_HOMOTYPIC_SYNONYM_OF = 101;
732 // public static int TAX_REL_IS_PROPARTE_HETEROTYPIC_SYNONYM_OF = 102;
733 // public static int TAX_REL_IS_PARTIAL_HOMOTYPIC_SYNONYM_OF = 103;
734 // public static int TAX_REL_IS_PARTIAL_HETEROTYPIC_SYNONYM_OF = 104;
738 logger
.warn("Relationship type not yet supported by Berlin Model export: "+ rel
.getType());
743 public static Integer
nomStatus2nomStatusFk (NomenclaturalStatusType status
){
747 if (status
.equals(NomenclaturalStatusType
.INVALID())) {return NAME_ST_NOM_INVAL
;
748 }else if (status
.equals(NomenclaturalStatusType
.ILLEGITIMATE())) {return NAME_ST_NOM_ILLEG
;
749 }else if (status
.equals(NomenclaturalStatusType
.NUDUM())) {return NAME_ST_NOM_NUD
;
750 }else if (status
.equals(NomenclaturalStatusType
.REJECTED())) {return NAME_ST_NOM_REJ
;
751 }else if (status
.equals(NomenclaturalStatusType
.REJECTED_PROP())) {return NAME_ST_NOM_REJ_PROP
;
752 }else if (status
.equals(NomenclaturalStatusType
.UTIQUE_REJECTED())) {return NAME_ST_NOM_UTIQUE_REJ
;
753 }else if (status
.equals(NomenclaturalStatusType
.UTIQUE_REJECTED_PROP())) {return NAME_ST_NOM_UTIQUE_REJ_PROP
;
754 }else if (status
.equals(NomenclaturalStatusType
.CONSERVED())) {return NAME_ST_NOM_CONS
;
756 }else if (status
.equals(NomenclaturalStatusType
.CONSERVED_PROP())) {return NAME_ST_NOM_CONS_PROP
;
757 }else if (status
.equals(NomenclaturalStatusType
.ORTHOGRAPHY_CONSERVED())) {return NAME_ST_ORTH_CONS
;
758 }else if (status
.equals(NomenclaturalStatusType
.ORTHOGRAPHY_CONSERVED_PROP())) {return NAME_ST_ORTH_CONS_PROP
;
759 }else if (status
.equals(NomenclaturalStatusType
.SUPERFLUOUS())) {return NAME_ST_NOM_SUPERFL
;
760 }else if (status
.equals(NomenclaturalStatusType
.AMBIGUOUS())) {return NAME_ST_NOM_AMBIG
;
761 }else if (status
.equals(NomenclaturalStatusType
.PROVISIONAL())) {return NAME_ST_NOM_PROVIS
;
762 }else if (status
.equals(NomenclaturalStatusType
.DOUBTFUL())) {return NAME_ST_NOM_DUB
;
763 }else if (status
.equals(NomenclaturalStatusType
.NOVUM())) {return NAME_ST_NOM_NOV
;
765 }else if (status
.equals(NomenclaturalStatusType
.CONFUSUM())) {return NAME_ST_NOM_CONFUS
;
766 }else if (status
.equals(NomenclaturalStatusType
.ALTERNATIVE())) {return NAME_ST_NOM_ALTERN
;
767 }else if (status
.equals(NomenclaturalStatusType
.COMBINATION_INVALID())) {return NAME_ST_COMB_INVAL
;
771 logger
.warn("NomStatus type not yet supported by Berlin Model export: "+ status
);
778 public static Integer
nameRel2RelNameQualifierFk (RelationshipBase
<?
,?
,?
> rel
){
782 RelationshipTermBase
<?
> type
= rel
.getType();
783 if (type
.equals(NameRelationshipType
.BASIONYM())) {return NAME_REL_IS_BASIONYM_FOR
;
784 }else if (type
.equals(NameRelationshipType
.LATER_HOMONYM())) {return NAME_REL_IS_LATER_HOMONYM_OF
;
785 }else if (type
.equals(NameRelationshipType
.REPLACED_SYNONYM())) {return NAME_REL_IS_REPLACED_SYNONYM_FOR
;
787 }else if (type
.equals(NameRelationshipType
.VALIDATED_BY_NAME())) {return NAME_REL_IS_VALIDATION_OF
;
788 }else if (type
.equals(NameRelationshipType
.LATER_VALIDATED_BY_NAME())) {return NAME_REL_IS_LATER_VALIDATION_OF
;
789 }else if (type
.equals(NameRelationshipType
.CONSERVED_AGAINST())) {return NAME_REL_IS_CONSERVED_AGAINST
;
792 }else if (type
.equals(NameRelationshipType
.TREATED_AS_LATER_HOMONYM())) {return NAME_REL_IS_TREATED_AS_LATER_HOMONYM_OF
;
793 }else if (type
.equals(NameRelationshipType
.ORTHOGRAPHIC_VARIANT())) {return NAME_REL_IS_ORTHOGRAPHIC_VARIANT_OF
;
796 logger
.warn("Relationship type not yet supported by Berlin Model export: "+ rel
.getType());
802 // }else if (type.equals(NameRelationshipType.())) {return NAME_REL_IS_REJECTED_IN_FAVOUR_OF;
804 // public static int NAME_REL_IS_FIRST_PARENT_OF = 9;
805 // public static int NAME_REL_IS_SECOND_PARENT_OF = 10;
806 // public static int NAME_REL_IS_FEMALE_PARENT_OF = 11;
807 // public static int NAME_REL_IS_MALE_PARENT_OF = 12;
809 // public static int NAME_REL_IS_REJECTED_IN_FAVOUR_OF = 14;
810 // }else if (type.equals(NameRelationshipType.)) {return NAME_REL_IS_REJECTED_TYPE_OF;
812 // public static int NAME_REL_HAS_SAME_TYPE_AS = 18;
813 // public static int NAME_REL_IS_LECTOTYPE_OF = 61;
814 // public static int NAME_REL_TYPE_NOT_DESIGNATED = 62;
816 // }else if (type.equals(NameRelationshipType.LATER_VALIDATED_BY_NAME())) {return NAME_REL_IS_TYPE_OF;
821 public static UUID
getWebMarkerUuid (int markerCategoryId
){
822 if (markerCategoryId
== 1){
823 return UUID
.fromString("d8554418-d1ae-471d-a1bd-a0cbc7ab860c"); //any as not to find in cichorieae
824 }else if (markerCategoryId
== 2){
825 return UUID
.fromString("7f189c48-8632-4870-9ec8-e4d2489f324e");
826 }else if (markerCategoryId
== 3){
827 return UUID
.fromString("9a115e6b-8210-4dd3-825a-6fed11016c63");
828 }else if (markerCategoryId
== 4){
829 return UUID
.fromString("1d287011-2054-41c5-a919-17ac1d0a9270");
830 }else if (markerCategoryId
== 9){
831 return UUID
.fromString("cc5eca5c-1ae5-4feb-9a95-507fc167b0c9");
833 logger
.warn("Unknown webMarker category: " + markerCategoryId
);