2 * Copyright (C) 2016 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.
9 package eu
.etaxonomy
.cdm
.io
.redlist
.gefaesspflanzen
;
11 import java
.util
.UUID
;
13 import org
.apache
.log4j
.Logger
;
15 import eu
.etaxonomy
.cdm
.common
.UTF8
;
22 public class RedListUtil
{
24 public static final UUID checkListClassificationUuid
= UUID
.fromString("928a4695-c055-465e-99da-07322384b0b7");
26 public static final UUID checkListReferenceUuid
= UUID
.fromString("e3abe234-ff23-4d85-9c1f-6769df965f33");
27 public static final UUID gesamtListeReferenceUuid
= UUID
.fromString("ec0308de-2245-4e71-a362-4ee72290bf23");
29 public static final UUID uuidClassificationReferenceE
= UUID
.fromString("0d62803a-430e-465d-aa45-9ba924c52df7");
30 public static final UUID uuidClassificationReferenceW
= UUID
.fromString("ba62f7cc-b489-4ef4-92d3-5cfa6eedf947");
31 public static final UUID uuidClassificationReferenceK
= UUID
.fromString("9d5a5f0b-44f3-415b-b704-37f98c577127");
32 public static final UUID uuidClassificationReferenceAW
= UUID
.fromString("509a95d6-0c9f-461c-94d9-762a7467a918");
33 public static final UUID uuidClassificationReferenceAO
= UUID
.fromString("422d81dc-d7ea-4d78-8836-c50ef4365eb4");
34 public static final UUID uuidClassificationReferenceR
= UUID
.fromString("f802727b-e3fe-4ec3-84cf-153f03239f4d");
35 public static final UUID uuidClassificationReferenceO
= UUID
.fromString("832155f7-caeb-4cf4-a14b-64e0e9710f7a");
36 public static final UUID uuidClassificationReferenceS
= UUID
.fromString("a3085ffa-4f59-4bf8-add9-d4cc84b66047");
38 public static final UUID uuidClassificationE
= UUID
.fromString("87d3d656-57bc-4b54-b338-80f9f2a37435");
39 public static final UUID uuidClassificationW
= UUID
.fromString("1bd21015-f542-4bf9-9e1f-ac0147e3a9f8");
40 public static final UUID uuidClassificationK
= UUID
.fromString("c6120524-f21b-4426-92db-52add2286831");
41 public static final UUID uuidClassificationAW
= UUID
.fromString("b48ca7a0-a641-4fd1-ad51-238a9b57a470");
42 public static final UUID uuidClassificationAO
= UUID
.fromString("a8743caa-56d5-4636-9ce6-4ef272d769d2");
43 public static final UUID uuidClassificationR
= UUID
.fromString("870d2e18-cd1b-4aa1-a360-ba5e0a5905aa");
44 public static final UUID uuidClassificationO
= UUID
.fromString("e19bb2e6-d898-4793-8cd4-d866eeb1f872");
45 public static final UUID uuidClassificationS
= UUID
.fromString("53e81162-5c2d-425b-bbe6-6e8d12e85790");
47 public static final UUID uuidRankCollectionSpecies
= UUID
.fromString("6056e143-4efe-4632-b532-27699ed62884");
48 public static final UUID uuidRankSubproles
= UUID
.fromString("47bd1439-c2ba-4c4e-994f-9c60853258f8");
49 public static final UUID uuidRankModification
= UUID
.fromString("1c6e16f5-f7a5-41a5-9cc4-53c1438478c9");
50 public static final UUID uuidRankLusus
= UUID
.fromString("4c8e12f6-2c16-4eda-a7d9-2fd247dcce789");
51 public static final UUID uuidRankSubspeciesPrincipes
= UUID
.fromString("b6b9351b-6beb-431d-8c7a-d30fe0cf3a90");
52 public static final UUID uuidRankCombination
= UUID
.fromString("ec2c580e-416a-4ecf-85df-d03641f3bd64");
54 public static final String NAME_NAMESPACE
= "name";
55 public static final String AUTHOR_NAMESPACE
= "author";
56 public static final String TAXON_GESAMTLISTE_NAMESPACE
= "taxon_gesamt_liste";
57 public static final String CLASSIFICATION_NAMESPACE_E
= "classification_namespace_e";
58 public static final String CLASSIFICATION_NAMESPACE_W
= "classification_namespace_w";
59 public static final String CLASSIFICATION_NAMESPACE_K
= "classification_namespace_k";
60 public static final String CLASSIFICATION_NAMESPACE_AW
= "classification_namespace_aw";
61 public static final String CLASSIFICATION_NAMESPACE_AO
= "classification_namespace_ao";
62 public static final String CLASSIFICATION_NAMESPACE_R
= "classification_namespace_r";
63 public static final String CLASSIFICATION_NAMESPACE_O
= "classification_namespace_o";
64 public static final String CLASSIFICATION_NAMESPACE_S
= "classification_namespace_s";
65 public static final String FAMILY_NAMESPACE_GESAMTLISTE
= "family_namespace_gesamtliste";
69 public static final String AUCT
= "auct.";
70 public static final String EX
= " ex ";
71 public static final String GUELT_BASIONYM
= "b";
72 public static final String GUELT_SYNONYM
= "x";
73 public static final String GUELT_ACCEPTED_TAXON
= "1";
74 public static final String HYB_X
= "x";
75 public static final String HYB_XF
= "xf";
76 public static final String HYB_XS
= "xs";
77 public static final String HYB_N
= "n";
78 public static final String HYB_G
= "g";
79 public static final String HYB_XU
= "xu";
80 public static final String HYB_GF
= "gf";
82 public static final String HYB_SIGN
= UTF8
.HYBRID
.toString();
86 public static final String NAMNR
= "NAMNR";
87 public static final String SEQNUM
= "SEQNUM";
88 public static final String GUELT
= "GUELT";
89 public static final String LOWER
= "LOWER";
90 public static final String AUTOR_BASI
= "AUTOR_BASI";
91 public static final String AUTOR_KOMB
= "AUTOR_KOMB";
92 public static final String ZUSATZ
= "ZUSATZ";
93 public static final String NOM_ZUSATZ
= "NOM_ZUSATZ";
94 public static final String TAX_ZUSATZ
= "TAX_ZUSATZ";
95 public static final String NON
= "NON";
96 public static final String SENSU
= "SENSU";
97 public static final String TRIVIAL
= "TRIVIAL";
98 public static final String EPI3
= "EPI3";
99 public static final String EPI2
= "EPI2";
100 public static final String EPI1
= "EPI1";
101 public static final String RANG
= "RANG";
102 public static final String TAXNAME
= "TAXNAME";
103 public static final String AUTOR
= "AUTOR";
104 public static final String CL_TAXON
= "CL_TAXON";
105 public static final String HYB
= "HYB";
106 public static final String FORMEL
= "FORMEL";
107 public static final String FLOR
= "FLOR";
108 public static final String ATLAS_IDX
= "ATLAS_IDX";
109 public static final String KART
= "KART";
110 public static final String RL2015
= "RL2015";
111 public static final String EHRD
= "EHRD";
112 public static final String WISSK
= "WISSK";
114 public static final String FAMILIE
= "FAMILIE";
116 public static final String E
= "E";
117 public static final String W
= "W";
118 public static final String K
= "K";
119 public static final String AW
= "AW";
120 public static final String AO
= "AO";
121 public static final String R
= "R";
122 public static final String O
= "O";
123 public static final String S
= "S";
125 public static void logMessage(long id
, String message
, Logger logger
){
126 logger
.error(NAMNR
+": "+id
+" "+message
);
129 public static void logInfoMessage(long id
, String message
, Logger logger
){
130 logger
.info(NAMNR
+": "+id
+" "+message
);
133 public static String
getAuthorOfExAuthorshipString(String authorshipString
){
134 return getAuthorOfExAuthorship(authorshipString
, false);
137 public static String
getExAuthorOfExAuthorshipString(String authorshipString
){
138 return getAuthorOfExAuthorship(authorshipString
, true);
141 private static String
getAuthorOfExAuthorship(String authorshipString
, boolean isExAuthor
){
142 String
[] split
= authorshipString
.split(EX
);
144 return isExAuthor?split
[0].trim():split
[split
.length
-1].trim();