Revision 6ad13c4b
Added by Patrick Plitzner almost 8 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlConstants.java | ||
---|---|---|
169 | 169 |
public static final String VOC_KAT = "Kat. +/-"; |
170 | 170 |
public static final String VOC_RL_KAT = "RL Kat."; |
171 | 171 |
|
172 |
public static final String FEAT_KOMMENTAR_TAXONOMIE = "Kommentar zur Taxonomie"; |
|
173 |
public static final String FEAT_KOMMENTAR_GEFAEHRDUNG = "Kommentar zur Gefährdung"; |
|
174 |
public static final String FEAT_LETZTER_NACHWEIS = "Letzter Nachweis"; |
|
175 |
public static final String FEAT_WEITERE_KOMMENTARE = "Weitere Kommentare"; |
|
176 |
|
|
172 | 177 |
public static final String BEZUGRAUM_BUND = "Bund"; |
173 | 178 |
|
174 | 179 |
//redList feature vocabulary |
... | ... | |
178 | 183 |
public static final UUID UUID_REIHENFOLGE_IDENTIFIER_TYPE = UUID.fromString("97961851-b1c1-41fb-adfd-2961b48f7efe"); |
179 | 184 |
|
180 | 185 |
//redList state Vocabularies |
181 |
public static final UUID vocStateRLKat = UUID.fromString("66bbb391-af8a-423b-9506-a235b61af922");
|
|
182 |
public static final UUID vocStateRlKatDiff = UUID.fromString("abe3702e-ddd4-420c-a985-08a0f8138215");
|
|
183 |
public static final UUID vocStateRlAkt = UUID.fromString("a0bb10de-35c1-47f5-b700-02ceb0a6b50c");
|
|
184 |
public static final UUID vocStateRLLang = UUID.fromString("c48d99db-50b6-469f-879d-8bb781842382");
|
|
185 |
public static final UUID vocStateRLKurz = UUID.fromString("46549c3b-d9d0-4d34-9135-4789d5ed6fff");
|
|
186 |
public static final UUID vocStateRLRisk = UUID.fromString("ec38db54-07dd-4e48-8976-bfa4813ffa44");
|
|
187 |
public static final UUID vocStateRLResp = UUID.fromString("c4763d33-75ea-4387-991f-b767650b4899");
|
|
188 |
public static final UUID vocStateRLKatOld = UUID.fromString("e9be0626-e14e-4556-a8af-9d49e6279669");
|
|
189 |
public static final UUID vocStateRLNeo = UUID.fromString("6c55ae1d-046d-4b67-89aa-b24c4888df6a");
|
|
190 |
public static final UUID vocStateRLKatId = UUID.fromString("c54481b3-bf07-43ce-b1cb-09759e4d2a70");
|
|
191 |
public static final UUID vocStateRLSpecialCases = UUID.fromString("ce2f4f8f-4222-429f-938b-77b794ecf704");
|
|
192 |
public static final UUID vocGermanFederalStates = UUID.fromString("a80dc3d4-0def-4c9b-97a1-12e8eb7ec87f");
|
|
193 |
public static final UUID vocGermanPresenceTerms = UUID.fromString("57d6bfa6-ac49-4c88-a9f0-b9c763d5b521");
|
|
194 |
public static final UUID vocGermanEstablishmentTerms = UUID.fromString("b5919067-ec28-404a-a22e-be914c810f22");
|
|
186 |
public static final UUID uuidVocStateRLKat = UUID.fromString("66bbb391-af8a-423b-9506-a235b61af922");
|
|
187 |
public static final UUID uuidVocStateRlKatDiff = UUID.fromString("abe3702e-ddd4-420c-a985-08a0f8138215");
|
|
188 |
public static final UUID uuidVocStateRlAkt = UUID.fromString("a0bb10de-35c1-47f5-b700-02ceb0a6b50c");
|
|
189 |
public static final UUID uuidVocStateRLLang = UUID.fromString("c48d99db-50b6-469f-879d-8bb781842382");
|
|
190 |
public static final UUID uuidVocStateRLKurz = UUID.fromString("46549c3b-d9d0-4d34-9135-4789d5ed6fff");
|
|
191 |
public static final UUID uuidVocStateRLRisk = UUID.fromString("ec38db54-07dd-4e48-8976-bfa4813ffa44");
|
|
192 |
public static final UUID uuidVocStateRLResp = UUID.fromString("c4763d33-75ea-4387-991f-b767650b4899");
|
|
193 |
public static final UUID uuidVocStateRLKatOld = UUID.fromString("e9be0626-e14e-4556-a8af-9d49e6279669");
|
|
194 |
public static final UUID uuidVocStateRLNeo = UUID.fromString("6c55ae1d-046d-4b67-89aa-b24c4888df6a");
|
|
195 |
public static final UUID uuidVocStateRLKatId = UUID.fromString("c54481b3-bf07-43ce-b1cb-09759e4d2a70");
|
|
196 |
public static final UUID uuidVocStateRLSpecialCases = UUID.fromString("ce2f4f8f-4222-429f-938b-77b794ecf704");
|
|
197 |
public static final UUID uuidVocGermanFederalStates = UUID.fromString("a80dc3d4-0def-4c9b-97a1-12e8eb7ec87f");
|
|
198 |
public static final UUID uuidVocGermanPresenceTerms = UUID.fromString("57d6bfa6-ac49-4c88-a9f0-b9c763d5b521");
|
|
199 |
public static final UUID uuidVocGermanEstablishmentTerms = UUID.fromString("b5919067-ec28-404a-a22e-be914c810f22");
|
|
195 | 200 |
|
196 | 201 |
//redlist feature |
197 |
public static final UUID featureRLKat = UUID.fromString("744f8833-619a-4d83-b330-1997c3b2c2f9");
|
|
198 |
public static final UUID featureRlKatDiff = UUID.fromString("bf93361d-0c8c-4961-9f60-20bcb1d3dbaf");
|
|
199 |
public static final UUID featureRlAkt = UUID.fromString("39b6962b-05ba-4cd6-a1a9-337d5d156e2f");
|
|
200 |
public static final UUID featureRLLang = UUID.fromString("f6027318-b17d-49e6-b8eb-7464304044c8");
|
|
201 |
public static final UUID featureRLKurz = UUID.fromString("9ecc65b5-7760-4ce7-add0-950bdcc2c792");
|
|
202 |
public static final UUID featureRLRisk = UUID.fromString("2c8f8ffa-c604-4385-b428-4485f5650735");
|
|
203 |
public static final UUID featureRLResp = UUID.fromString("02d8010f-7d1b-46a3-8c01-b5e6760bfd14");
|
|
204 |
public static final UUID featureRLKatOld = UUID.fromString("bbdff68d-4fa0-438d-afb5-cff89791c93f");
|
|
205 |
public static final UUID featureRLNeo = UUID.fromString("153c7173-6d3d-4bee-b8f2-cf8e63e0bc25");
|
|
206 |
public static final UUID featureRLKatId = UUID.fromString("dc9f5dd2-302c-4a32-bd70-278bbd9abd16");
|
|
207 |
public static final UUID featureRLTaxComment = UUID.fromString("b7c05d78-16a4-4b6e-a03b-fa6bb2ed74ae");
|
|
208 |
public static final UUID featureRLHazardComment = UUID.fromString("5beb1ebf-8643-4d5f-9849-8087c35455bb");
|
|
209 |
public static final UUID featureRLSpecialCases = UUID.fromString("fb92068d-667a-448e-8019-ca4551891b3b");
|
|
210 |
public static final UUID featureRLLastOccurrence = UUID.fromString("218a32be-fb87-41c9-8d64-b21b43b47caa");
|
|
211 |
public static final UUID featureRLAdditionalComment = UUID.fromString("c610c98e-f242-4f3b-9edd-7b84a9435867");
|
|
202 |
public static final UUID uuidFeatureRLKat = UUID.fromString("744f8833-619a-4d83-b330-1997c3b2c2f9");
|
|
203 |
public static final UUID uuidFeatureRlKatDiff = UUID.fromString("bf93361d-0c8c-4961-9f60-20bcb1d3dbaf");
|
|
204 |
public static final UUID uuidFeatureRlAkt = UUID.fromString("39b6962b-05ba-4cd6-a1a9-337d5d156e2f");
|
|
205 |
public static final UUID uuidFeatureRLLang = UUID.fromString("f6027318-b17d-49e6-b8eb-7464304044c8");
|
|
206 |
public static final UUID uuidFeatureRLKurz = UUID.fromString("9ecc65b5-7760-4ce7-add0-950bdcc2c792");
|
|
207 |
public static final UUID uuidFeatureRLRisk = UUID.fromString("2c8f8ffa-c604-4385-b428-4485f5650735");
|
|
208 |
public static final UUID uuidFeatureRLResp = UUID.fromString("02d8010f-7d1b-46a3-8c01-b5e6760bfd14");
|
|
209 |
public static final UUID uuidFeatureRLKatOld = UUID.fromString("bbdff68d-4fa0-438d-afb5-cff89791c93f");
|
|
210 |
public static final UUID uuidFeatureRLNeo = UUID.fromString("153c7173-6d3d-4bee-b8f2-cf8e63e0bc25");
|
|
211 |
public static final UUID uuidFeatureRLKatId = UUID.fromString("dc9f5dd2-302c-4a32-bd70-278bbd9abd16");
|
|
212 |
public static final UUID uuidFeatureRLTaxComment = UUID.fromString("b7c05d78-16a4-4b6e-a03b-fa6bb2ed74ae");
|
|
213 |
public static final UUID uuidFeatureRLHazardComment = UUID.fromString("5beb1ebf-8643-4d5f-9849-8087c35455bb");
|
|
214 |
public static final UUID uuidFeatureRLSpecialCases = UUID.fromString("fb92068d-667a-448e-8019-ca4551891b3b");
|
|
215 |
public static final UUID uuidFeatureRLLastOccurrence = UUID.fromString("218a32be-fb87-41c9-8d64-b21b43b47caa");
|
|
216 |
public static final UUID uuidFeatureRLAdditionalComment = UUID.fromString("c610c98e-f242-4f3b-9edd-7b84a9435867");
|
|
212 | 217 |
public static List<UUID> featureUuids = new ArrayList<UUID>(); |
213 | 218 |
static { |
214 |
featureUuids.add(featureRLKat);
|
|
215 |
featureUuids.add(featureRlKatDiff);
|
|
216 |
featureUuids.add(featureRlAkt);
|
|
217 |
featureUuids.add(featureRLLang);
|
|
218 |
featureUuids.add(featureRLKurz);
|
|
219 |
featureUuids.add(featureRLRisk);
|
|
220 |
featureUuids.add(featureRLResp);
|
|
221 |
featureUuids.add(featureRLKatOld);
|
|
222 |
featureUuids.add(featureRLNeo);
|
|
223 |
featureUuids.add(featureRLKatId);
|
|
224 |
featureUuids.add(featureRLTaxComment);
|
|
225 |
featureUuids.add(featureRLHazardComment);
|
|
226 |
featureUuids.add(featureRLSpecialCases);
|
|
227 |
featureUuids.add(featureRLLastOccurrence);
|
|
228 |
featureUuids.add(featureRLAdditionalComment);
|
|
219 |
featureUuids.add(uuidFeatureRLKat);
|
|
220 |
featureUuids.add(uuidFeatureRlKatDiff);
|
|
221 |
featureUuids.add(uuidFeatureRlAkt);
|
|
222 |
featureUuids.add(uuidFeatureRLLang);
|
|
223 |
featureUuids.add(uuidFeatureRLKurz);
|
|
224 |
featureUuids.add(uuidFeatureRLRisk);
|
|
225 |
featureUuids.add(uuidFeatureRLResp);
|
|
226 |
featureUuids.add(uuidFeatureRLKatOld);
|
|
227 |
featureUuids.add(uuidFeatureRLNeo);
|
|
228 |
featureUuids.add(uuidFeatureRLKatId);
|
|
229 |
featureUuids.add(uuidFeatureRLTaxComment);
|
|
230 |
featureUuids.add(uuidFeatureRLHazardComment);
|
|
231 |
featureUuids.add(uuidFeatureRLSpecialCases);
|
|
232 |
featureUuids.add(uuidFeatureRLLastOccurrence);
|
|
233 |
featureUuids.add(uuidFeatureRLAdditionalComment);
|
|
229 | 234 |
} |
230 | 235 |
|
231 | 236 |
//rl kat state list |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/in/BfnXmlImportFeature.java | ||
---|---|---|
104 | 104 |
//for each taxonName |
105 | 105 |
for (Element elFeature : elFeatureList){ |
106 | 106 |
|
107 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME, bfnNamespace).equalsIgnoreCase("RL Kat.")){
|
|
107 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME, bfnNamespace).equalsIgnoreCase(BfnXmlConstants.VOC_RL_KAT)){
|
|
108 | 108 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
109 | 109 |
} |
110 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Kat. +/-")){
|
|
110 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_KAT)){
|
|
111 | 111 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
112 | 112 |
}else |
113 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("aktuelle Bestandsstituation")){
|
|
113 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_AKTUELLE_BESTANDSSTITUATION)){
|
|
114 | 114 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
115 | 115 |
}else |
116 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("langfristiger Bestandstrend")){
|
|
116 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_LANGFRISTIGER_BESTANDSTREND)){
|
|
117 | 117 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
118 | 118 |
}else |
119 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("kurzfristiger Bestandstrend")){
|
|
119 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_KURZFRISTIGER_BESTANDSTREND)){
|
|
120 | 120 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
121 | 121 |
}else |
122 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Risikofaktoren")){
|
|
122 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_RISIKOFAKTOREN)){
|
|
123 | 123 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
124 | 124 |
}else |
125 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Verantwortlichkeit")){
|
|
125 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_VERANTWORTLICHKEIT)){
|
|
126 | 126 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
127 | 127 |
}else |
128 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("alte RL- Kat.")){
|
|
128 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_ALTE_RL_KAT)){
|
|
129 | 129 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
130 | 130 |
}else |
131 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Neobiota")){
|
|
131 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_NEOBIOTA)){
|
|
132 | 132 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
133 | 133 |
}else |
134 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Eindeutiger Code")){
|
|
134 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_EINDEUTIGER_CODE)){
|
|
135 | 135 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
136 | 136 |
}else |
137 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Kommentar zur Taxonomie")){
|
|
137 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.FEAT_KOMMENTAR_TAXONOMIE)){
|
|
138 | 138 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, false, state); |
139 | 139 |
}else |
140 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Kommentar zur Gefährdung")){
|
|
140 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.FEAT_KOMMENTAR_GEFAEHRDUNG)){
|
|
141 | 141 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, false, state); |
142 | 142 |
}else |
143 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Sonderfälle")){
|
|
143 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_SONDERFAELLE)){
|
|
144 | 144 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, true, state); |
145 | 145 |
}else |
146 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Letzter Nachweis")){
|
|
146 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.FEAT_LETZTER_NACHWEIS)){
|
|
147 | 147 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, false, state); |
148 | 148 |
}else |
149 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Weitere Kommentare")){
|
|
149 |
if(elFeature.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.FEAT_WEITERE_KOMMENTARE)){
|
|
150 | 150 |
makeFeature(vocabularyService, featureList,success, obligatory, bfnNamespace,elFeature, false, state); |
151 | 151 |
} |
152 | 152 |
} |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/in/BfnXmlImportTaxonName.java | ||
---|---|---|
546 | 546 |
List<Element> elInfoDetailList = elInfo.getChildren(childElementName, bfnNamespace); |
547 | 547 |
|
548 | 548 |
for(Element elInfoDetail : elInfoDetailList){ |
549 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("RL Kat.")){
|
|
549 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_RL_KAT)){
|
|
550 | 550 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
551 | 551 |
} |
552 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Kat. +/-")){
|
|
552 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_KAT)){
|
|
553 | 553 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
554 | 554 |
} |
555 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("aktuelle Bestandsstituation")){
|
|
555 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_AKTUELLE_BESTANDSSTITUATION)){
|
|
556 | 556 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
557 | 557 |
} |
558 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("langfristiger Bestandstrend")){
|
|
558 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_LANGFRISTIGER_BESTANDSTREND)){
|
|
559 | 559 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
560 | 560 |
} |
561 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("kurzfristiger Bestandstrend")){
|
|
561 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_KURZFRISTIGER_BESTANDSTREND)){
|
|
562 | 562 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
563 | 563 |
} |
564 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Risikofaktoren")){
|
|
564 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_RISIKOFAKTOREN)){
|
|
565 | 565 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
566 | 566 |
} |
567 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Verantwortlichkeit")){
|
|
567 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_VERANTWORTLICHKEIT)){
|
|
568 | 568 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
569 | 569 |
} |
570 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("alte RL- Kat.")){
|
|
570 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_ALTE_RL_KAT)){
|
|
571 | 571 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
572 | 572 |
} |
573 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Neobiota")){
|
|
573 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_NEOBIOTA)){
|
|
574 | 574 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
575 | 575 |
} |
576 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Eindeutiger Code")){
|
|
576 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_EINDEUTIGER_CODE)){
|
|
577 | 577 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
578 | 578 |
} |
579 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Kommentar zur Taxonomie")){
|
|
579 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.FEAT_KOMMENTAR_TAXONOMIE)){
|
|
580 | 580 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
581 | 581 |
} |
582 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Kommentar zur Gefährdung")){
|
|
582 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.FEAT_KOMMENTAR_GEFAEHRDUNG)){
|
|
583 | 583 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
584 | 584 |
} |
585 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Sonderfälle")){
|
|
585 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.VOC_SONDERFAELLE)){
|
|
586 | 586 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
587 | 587 |
} |
588 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Letzter Nachweis")){
|
|
588 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.FEAT_LETZTER_NACHWEIS)){
|
|
589 | 589 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
590 | 590 |
} |
591 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase("Weitere Kommentare")){
|
|
591 |
if(elInfoDetail.getAttributeValue(BfnXmlConstants.ATT_STANDARDNAME).equalsIgnoreCase(BfnXmlConstants.FEAT_WEITERE_KOMMENTARE)){
|
|
592 | 592 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
593 | 593 |
} |
594 | 594 |
//create german federal states distribution status |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/in/BfnXmlTransformer.java | ||
---|---|---|
199 | 199 |
public static UUID getRedlistVocabularyUUID(String redListVocabulary) throws UnknownCdmTypeException { |
200 | 200 |
|
201 | 201 |
if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_RL_KAT)) { |
202 |
return BfnXmlConstants.vocStateRLKat;
|
|
202 |
return BfnXmlConstants.uuidVocStateRLKat;
|
|
203 | 203 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_KAT)) { |
204 |
return BfnXmlConstants.vocStateRlKatDiff;
|
|
204 |
return BfnXmlConstants.uuidVocStateRlKatDiff;
|
|
205 | 205 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_AKTUELLE_BESTANDSSTITUATION)) { |
206 |
return BfnXmlConstants.vocStateRlAkt;
|
|
206 |
return BfnXmlConstants.uuidVocStateRlAkt;
|
|
207 | 207 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_LANGFRISTIGER_BESTANDSTREND)) { |
208 |
return BfnXmlConstants.vocStateRLLang;
|
|
208 |
return BfnXmlConstants.uuidVocStateRLLang;
|
|
209 | 209 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_KURZFRISTIGER_BESTANDSTREND)) { |
210 |
return BfnXmlConstants.vocStateRLKurz;
|
|
210 |
return BfnXmlConstants.uuidVocStateRLKurz;
|
|
211 | 211 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_RISIKOFAKTOREN)) { |
212 |
return BfnXmlConstants.vocStateRLRisk;
|
|
212 |
return BfnXmlConstants.uuidVocStateRLRisk;
|
|
213 | 213 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_VERANTWORTLICHKEIT)) { |
214 |
return BfnXmlConstants.vocStateRLResp;
|
|
214 |
return BfnXmlConstants.uuidVocStateRLResp;
|
|
215 | 215 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_ALTE_RL_KAT)) { |
216 |
return BfnXmlConstants.vocStateRLKatOld;
|
|
216 |
return BfnXmlConstants.uuidVocStateRLKatOld;
|
|
217 | 217 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_NEOBIOTA)) { |
218 |
return BfnXmlConstants.vocStateRLNeo;
|
|
218 |
return BfnXmlConstants.uuidVocStateRLNeo;
|
|
219 | 219 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_EINDEUTIGER_CODE)) { |
220 |
return BfnXmlConstants.vocStateRLKatId;
|
|
220 |
return BfnXmlConstants.uuidVocStateRLKatId;
|
|
221 | 221 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_SONDERFAELLE)) { |
222 |
return BfnXmlConstants.vocStateRLSpecialCases;
|
|
222 |
return BfnXmlConstants.uuidVocStateRLSpecialCases;
|
|
223 | 223 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_VORKOMMENSSTATUS)) { |
224 |
return BfnXmlConstants.vocGermanPresenceTerms;
|
|
224 |
return BfnXmlConstants.uuidVocGermanPresenceTerms;
|
|
225 | 225 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_ETABLIERUNGSSTATUS)) { |
226 |
return BfnXmlConstants.vocGermanEstablishmentTerms;
|
|
226 |
return BfnXmlConstants.uuidVocGermanEstablishmentTerms;
|
|
227 | 227 |
}else if(redListVocabulary.equalsIgnoreCase(BfnXmlConstants.VOC_BUNDESLAENDER)) { |
228 |
return BfnXmlConstants.vocGermanFederalStates;
|
|
228 |
return BfnXmlConstants.uuidVocGermanFederalStates;
|
|
229 | 229 |
} else{ |
230 | 230 |
throw new UnknownCdmTypeException("Unknown Vocabulary feature, could not match: " + redListVocabulary); |
231 | 231 |
} |
... | ... | |
236 | 236 |
public static UUID getRedlistFeatureUUID(String redListFeature) throws UnknownCdmTypeException { |
237 | 237 |
|
238 | 238 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_RL_KAT)) { |
239 |
return BfnXmlConstants.featureRLKat;
|
|
239 |
return BfnXmlConstants.uuidFeatureRLKat;
|
|
240 | 240 |
} |
241 | 241 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_KAT)) { |
242 |
return BfnXmlConstants.featureRlKatDiff;
|
|
242 |
return BfnXmlConstants.uuidFeatureRlKatDiff;
|
|
243 | 243 |
} |
244 | 244 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_AKTUELLE_BESTANDSSTITUATION)) { |
245 |
return BfnXmlConstants.featureRlAkt;
|
|
245 |
return BfnXmlConstants.uuidFeatureRlAkt;
|
|
246 | 246 |
} |
247 | 247 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_LANGFRISTIGER_BESTANDSTREND)) { |
248 |
return BfnXmlConstants.featureRLLang;
|
|
248 |
return BfnXmlConstants.uuidFeatureRLLang;
|
|
249 | 249 |
} |
250 | 250 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_KURZFRISTIGER_BESTANDSTREND)) { |
251 |
return BfnXmlConstants.featureRLKurz;
|
|
251 |
return BfnXmlConstants.uuidFeatureRLKurz;
|
|
252 | 252 |
} |
253 | 253 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_RISIKOFAKTOREN)) { |
254 |
return BfnXmlConstants.featureRLRisk;
|
|
254 |
return BfnXmlConstants.uuidFeatureRLRisk;
|
|
255 | 255 |
} |
256 | 256 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_VERANTWORTLICHKEIT)) { |
257 |
return BfnXmlConstants.featureRLResp;
|
|
257 |
return BfnXmlConstants.uuidFeatureRLResp;
|
|
258 | 258 |
} |
259 | 259 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_ALTE_RL_KAT)) { |
260 |
return BfnXmlConstants.featureRLKatOld;
|
|
260 |
return BfnXmlConstants.uuidFeatureRLKatOld;
|
|
261 | 261 |
} |
262 | 262 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_NEOBIOTA)) { |
263 |
return BfnXmlConstants.featureRLNeo;
|
|
263 |
return BfnXmlConstants.uuidFeatureRLNeo;
|
|
264 | 264 |
} |
265 | 265 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_EINDEUTIGER_CODE)) { |
266 |
return BfnXmlConstants.featureRLKatId;
|
|
266 |
return BfnXmlConstants.uuidFeatureRLKatId;
|
|
267 | 267 |
} |
268 |
if(redListFeature.equalsIgnoreCase("Kommentar zur Taxonomie")) {
|
|
269 |
return BfnXmlConstants.featureRLTaxComment;
|
|
268 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.FEAT_KOMMENTAR_TAXONOMIE)) {
|
|
269 |
return BfnXmlConstants.uuidFeatureRLTaxComment;
|
|
270 | 270 |
} |
271 |
if(redListFeature.equalsIgnoreCase("Kommentar zur Gefährdung")) {
|
|
272 |
return BfnXmlConstants.featureRLHazardComment;
|
|
271 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.FEAT_KOMMENTAR_GEFAEHRDUNG)) {
|
|
272 |
return BfnXmlConstants.uuidFeatureRLHazardComment;
|
|
273 | 273 |
} |
274 | 274 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.VOC_SONDERFAELLE)) { |
275 |
return BfnXmlConstants.featureRLSpecialCases;
|
|
275 |
return BfnXmlConstants.uuidFeatureRLSpecialCases;
|
|
276 | 276 |
} |
277 |
if(redListFeature.equalsIgnoreCase("Letzter Nachweis")) {
|
|
278 |
return BfnXmlConstants.featureRLLastOccurrence;
|
|
277 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.FEAT_LETZTER_NACHWEIS)) {
|
|
278 |
return BfnXmlConstants.uuidFeatureRLLastOccurrence;
|
|
279 | 279 |
} |
280 |
if(redListFeature.equalsIgnoreCase("Weitere Kommentare")) {
|
|
281 |
return BfnXmlConstants.featureRLAdditionalComment;
|
|
280 |
if(redListFeature.equalsIgnoreCase(BfnXmlConstants.FEAT_WEITERE_KOMMENTARE)) {
|
|
281 |
return BfnXmlConstants.uuidFeatureRLAdditionalComment;
|
|
282 | 282 |
} else{ |
283 | 283 |
throw new UnknownCdmTypeException("Unknown feature, could not match: " + redListFeature); |
284 | 284 |
} |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/out/BfnXmlTaxonNameExport.java | ||
---|---|---|
101 | 101 |
for (TaxonDescription taxonDescription : descriptions) { |
102 | 102 |
//TODO: export only red list features ?? |
103 | 103 |
Set<DescriptionElementBase> descriptionElements = taxonDescription.getElements(); |
104 |
for (DescriptionElementBase descriptionElementBase : descriptionElements) { |
|
105 |
if(descriptionElementBase.isInstanceOf(CategoricalData.class)){ |
|
106 |
CategoricalData categoricalData = HibernateProxyHelper.deproxy(descriptionElementBase, CategoricalData.class); |
|
107 |
Feature feature = categoricalData.getFeature(); |
|
108 |
List<StateData> stateData = categoricalData.getStateData(); |
|
109 |
if(stateData.size()!=1){ |
|
110 |
logger.error("StateData does not have a size of 1 for feature "+feature.getLabel()+" in taxon "+taxon.getTitleCache()); |
|
111 |
continue; |
|
112 |
} |
|
113 |
addIwert(bezugsraum, feature.getLabel(), stateData.iterator().next().getState().getLabel()); |
|
114 |
} |
|
115 |
else if(descriptionElementBase.isInstanceOf(TextData.class)){ |
|
116 |
TextData textData = HibernateProxyHelper.deproxy(descriptionElementBase, TextData.class); |
|
117 |
addIwert(bezugsraum, textData.getFeature().getLabel(), textData.getLanguageText(Language.GERMAN()).getText()); |
|
104 |
exportCategoricalData(BfnXmlConstants.VOC_RL_KAT, descriptionElements, taxon, parent); |
|
105 |
exportCategoricalData(BfnXmlConstants.VOC_KAT, descriptionElements, taxon, parent); |
|
106 |
exportCategoricalData(BfnXmlConstants.VOC_NEOBIOTA, descriptionElements, taxon, parent); |
|
107 |
exportCategoricalData(BfnXmlConstants.VOC_AKTUELLE_BESTANDSSTITUATION, descriptionElements, taxon, parent); |
|
108 |
exportCategoricalData(BfnXmlConstants.VOC_LANGFRISTIGER_BESTANDSTREND, descriptionElements, taxon, parent); |
|
109 |
exportCategoricalData(BfnXmlConstants.VOC_KURZFRISTIGER_BESTANDSTREND, descriptionElements, taxon, parent); |
|
110 |
exportCategoricalData(BfnXmlConstants.VOC_RISIKOFAKTOREN, descriptionElements, taxon, parent); |
|
111 |
exportCategoricalData(BfnXmlConstants.VOC_SONDERFAELLE, descriptionElements, taxon, parent); |
|
112 |
exportCategoricalData(BfnXmlConstants.VOC_VERANTWORTLICHKEIT, descriptionElements, taxon, parent); |
|
113 |
exportCategoricalData(BfnXmlConstants.VOC_VERANTWORTLICHKEIT, descriptionElements, taxon, parent); |
|
114 |
|
|
115 |
|
|
116 |
// for (DescriptionElementBase descriptionElementBase : descriptionElements) { |
|
117 |
// if(descriptionElementBase.isInstanceOf(CategoricalData.class)){ |
|
118 |
// CategoricalData categoricalData = HibernateProxyHelper.deproxy(descriptionElementBase, CategoricalData.class); |
|
119 |
// Feature feature = categoricalData.getFeature(); |
|
120 |
// List<StateData> stateData = categoricalData.getStateData(); |
|
121 |
// if(stateData.size()!=1){ |
|
122 |
// logger.error("StateData does not have a size of 1 for feature "+feature.getLabel()+" in taxon "+taxon.getTitleCache()); |
|
123 |
// continue; |
|
124 |
// } |
|
125 |
// addIwert(bezugsraum, feature.getLabel(), stateData.iterator().next().getState().getLabel()); |
|
126 |
// } |
|
127 |
// else if(descriptionElementBase.isInstanceOf(TextData.class)){ |
|
128 |
// TextData textData = HibernateProxyHelper.deproxy(descriptionElementBase, TextData.class); |
|
129 |
// addIwert(bezugsraum, textData.getFeature().getLabel(), textData.getLanguageText(Language.GERMAN()).getText()); |
|
130 |
// } |
|
131 |
// } |
|
132 |
} |
|
133 |
} |
|
134 |
|
|
135 |
private void exportTextData(String featureLabel, Set<DescriptionElementBase> descriptionElements, Taxon taxon, Element parent){ |
|
136 |
for (DescriptionElementBase descriptionElementBase : descriptionElements) { |
|
137 |
if(descriptionElementBase.getFeature().getLabel().equals(featureLabel)){ |
|
138 |
TextData textData = HibernateProxyHelper.deproxy(descriptionElementBase, TextData.class); |
|
139 |
addIwert(parent, textData.getFeature().getLabel(), textData.getLanguageText(Language.GERMAN()).getText()); |
|
140 |
} |
|
141 |
} |
|
142 |
} |
|
143 |
|
|
144 |
private void exportCategoricalData(String featureLabel, Set<DescriptionElementBase> descriptionElements, Taxon taxon, Element parent){ |
|
145 |
for (DescriptionElementBase descriptionElementBase : descriptionElements) { |
|
146 |
if(descriptionElementBase.getFeature().getLabel().equals(featureLabel)){ |
|
147 |
CategoricalData categoricalData = HibernateProxyHelper.deproxy(descriptionElementBase, CategoricalData.class); |
|
148 |
Feature feature = categoricalData.getFeature(); |
|
149 |
List<StateData> stateData = categoricalData.getStateData(); |
|
150 |
if(stateData.size()!=1){ |
|
151 |
logger.error("StateData does not have a size of 1 for feature "+feature.getLabel()+" in taxon "+taxon.getTitleCache()); |
|
152 |
continue; |
|
118 | 153 |
} |
154 |
addIwert(parent, feature.getLabel(), stateData.iterator().next().getState().getLabel()); |
|
119 | 155 |
} |
120 | 156 |
} |
121 | 157 |
} |
... | ... | |
209 | 245 |
//rank |
210 | 246 |
addNanteil(wissName, BfnXmlConstants.BEREICH_RANG, BfnXmlTransformer.getRankCodeForRank(rank)); |
211 | 247 |
|
248 |
|
|
249 |
addNanteil(wissName, BfnXmlConstants.BEREICH_ORDNUNGSZAHL, null);//TODO |
|
250 |
addNanteil(wissName, BfnXmlConstants.BEREICH_AUTONYM, null);//TODO |
|
251 |
addNanteil(wissName, BfnXmlConstants.BEREICH_REICH, null);//TODO |
|
252 |
addNanteil(wissName, BfnXmlConstants.BEREICH_BASTARD, null);//TODO |
|
253 |
|
|
212 | 254 |
//authors |
213 | 255 |
addNanteil(wissName, BfnXmlConstants.BEREICH_AUTOREN, name.getAuthorshipCache()); |
214 | 256 |
|
257 |
addNanteil(wissName, BfnXmlConstants.BEREICH_ZUSAETZE, null);//TODO |
|
258 |
addNanteil(wissName, "SortWissName", null);//TODO |
|
259 |
addNanteil(wissName, "SortArtEpi", null);//TODO |
|
260 |
addNanteil(wissName, "SortDeutName", null);//TODO |
|
261 |
|
|
215 | 262 |
//wissName |
216 | 263 |
addNanteil(wissName, BfnXmlConstants.BEREICH_WISSNAME, name.getTitleCache()); |
217 | 264 |
} |
... | ... | |
244 | 291 |
} |
245 | 292 |
addNanteil(wissName, BfnXmlConstants.BEREICH_EPITHETON3, epitheton3); |
246 | 293 |
} |
294 |
//epitheton4-5 |
|
295 |
addNanteil(wissName, BfnXmlConstants.BEREICH_EPITHETON4, null); |
|
296 |
addNanteil(wissName, BfnXmlConstants.BEREICH_EPITHETON5, null); |
|
247 | 297 |
} |
248 | 298 |
|
249 | 299 |
private void exportCommonName(Taxon taxon, Element taxonym) { |
... | ... | |
275 | 325 |
private void addNanteil(Element element, String bereich, String textContent) { |
276 | 326 |
Element nanteil = new Element(BfnXmlConstants.EL_NANTEIL); |
277 | 327 |
nanteil.setAttribute(new Attribute(BfnXmlConstants.ATT_BEREICH, bereich)); |
278 |
nanteil.addContent(textContent); |
|
328 |
if(textContent!=null){ |
|
329 |
nanteil.addContent(textContent); |
|
330 |
} |
|
279 | 331 |
element.addContent(nanteil); |
280 | 332 |
} |
281 | 333 |
|
Also available in: Unified diff
Refactor constants