Revision e2b48551
Added by Alexander Oppermann about 9 years ago
.gitattributes | ||
---|---|---|
225 | 225 |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportConfigurator.java -text |
226 | 226 |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportFeature.java -text |
227 | 227 |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportMetaData.java -text |
228 |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportNamedArea.java -text |
|
228 | 229 |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportState.java -text |
229 | 230 |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportTaxonName.java -text |
230 | 231 |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlTransformer.java -text |
app-import/src/main/java/eu/etaxonomy/cdm/app/common/CdmDestinations.java | ||
---|---|---|
30 | 30 |
return makeDestination(dbType, cdmServer, cdmDB, -1, cdmUserName, null); |
31 | 31 |
} |
32 | 32 |
|
33 |
public static ICdmDataSource cdm_redlist_plant_localhost(){ |
|
34 |
DatabaseTypeEnum dbType = DatabaseTypeEnum.MySQL; |
|
35 |
String cdmServer = "localhost"; |
|
36 |
String cdmDB = "cdm_bfn_imports_plants"; |
|
37 |
String cdmUserName = "root"; |
|
38 |
return makeDestination(dbType, cdmServer, cdmDB, -1, cdmUserName, null); |
|
39 |
} |
|
40 |
|
|
33 | 41 |
public static ICdmDataSource cdm_redlist_lumbricidae(){ |
34 | 42 |
DatabaseTypeEnum dbType = DatabaseTypeEnum.MySQL; |
35 | 43 |
String cdmServer = "160.45.63.171"; |
app-import/src/main/java/eu/etaxonomy/cdm/app/redlist/BfnXmlTestActivator.java | ||
---|---|---|
25 | 25 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator.CHECK; |
26 | 26 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator.DO_REFERENCES; |
27 | 27 |
import eu.etaxonomy.cdm.io.redlist.bfnXml.BfnXmlImportConfigurator; |
28 |
import eu.etaxonomy.cdm.model.name.NomenclaturalCode; |
|
28 | 29 |
|
29 | 30 |
/** |
30 | 31 |
* @author a.oppermann |
... | ... | |
74 | 75 |
BfnXmlImportConfigurator bfnImportConfigurator = BfnXmlImportConfigurator.NewInstance(source, destination); |
75 | 76 |
|
76 | 77 |
//if xmllist has two lists |
78 |
bfnImportConfigurator.setNomenclaturalSig("Zoological");// "Zoological";//"Botanical"ICNAFP |
|
77 | 79 |
bfnImportConfigurator.setHasSecondList(false); |
78 |
|
|
79 | 80 |
bfnImportConfigurator.setDoMetaData(doMetaData); |
80 | 81 |
bfnImportConfigurator.setDoReferences(doReferences); |
81 | 82 |
bfnImportConfigurator.setDoTaxonNames(doTaxonNames); |
... | ... | |
106 | 107 |
public static void main(String[] args) { |
107 | 108 |
|
108 | 109 |
List<String> fileNames = Arrays.asList( |
109 |
// "rldb_print_v4_0_1_0_artenarmeWeichtiergruppen_121127_verantw_syn.xml", |
|
110 |
// "rldb_print_v4_0_1_0_Asilidae_GMH_Wolff_110314_HGxls_120413_DF_korrV_Verantw_syn.xml", |
|
111 |
// "rldb_print_v4_0_1_0_Asseln_121128_verantw_syn.xml", |
|
112 |
// "rldb_print_v4_0_1_0_Asselspinnen_120907_verantw_syn.xml", |
|
113 |
// "rldb_print_v4_0_1_0_Bienen_PWKorr_HG_120413_DF_120612_syn.xml", |
|
114 |
// "rldb_print_v4_0_1_0_Binnenmollusken_0alle_120413_DF_syn.xml", |
|
115 |
// "rldb_print_v4_0_1_0_Blattoptera_140413_DF_syn.xml", |
|
116 |
// "rldb_print_v4_0_1_0_Empidoidea_120413_DF.xml", |
|
117 |
// "rldb_print_v4_0_1_0_Eulen_Korruebern_23-05-2012_KorrV_syn.xml", |
|
118 |
// "rldb_print_v4_0_1_0_Eulenspinner_Spanner_13-06-2012_KorrV_syn.xml" |
|
119 |
// |
|
120 |
// "rldb_print_v4_0_1_0_Flechten_korr_verantw_syn.xml", |
|
121 |
// "rldb_print_v4_0_1_0_Flohkrebse_121128_verantw_syn.xml", |
|
122 |
// "rldb_print_v4_0_1_0_Heuschrecken_syn.xml", |
|
123 |
// "rldb_print_v4_0_1_0_Igelwuermer_120907_verantw.xml", |
|
124 |
// "rldb_print_v4_0_1_0_Kumazeen_120709_verantw_syn.xml", |
|
110 |
// Plants |
|
111 |
// "rldb_print_v4_0_1_0_Flechten_korr_verantw_syn.xml" |
|
125 | 112 |
// "rldb_print_v4_0_1_0_Lichenicole_verantw_syn.xml", |
126 | 113 |
// "rldb_print_v4_0_1_0_Makroalgen_150121_syn.xml", |
127 |
// "rldb_print_v4_0_1_0_Meeresfische_syn.xml", |
|
128 |
// "rldb_print_v4_0_1_0_Moostierchen_121128_verantw_syn.xml", |
|
129 |
// "rldb_print_v4_0_1_0_Muscheln_121128_verantw_syn.xml", |
|
130 | 114 |
// "rldb_print_v4_0_1_0_Myxo_110708_korr_syn_neu.xml", |
131 |
// "rldb_print_v4_0_1_0_Nesseltiere_130104_verantw_syn.xml", |
|
132 |
// "rldb_print_v4_0_1_0_Ohrwuermer_DF_syn.xml", |
|
133 |
// "rldb_print_v4_0_1_0_Pflanzenwespen_280711_Autor_110815_HG2_120413_DF_syn.xml", |
|
134 |
// "rldb_print_v4_0_1_0_Pyraloidea_Februar_ 2012_Korruebern_MB_24-04-2012_syn.xml", |
|
135 | 115 |
// "rldb_print_v4_0_1_0_Saprophyten_verantw.xml" |
136 | 116 |
// |
117 |
// Animals |
|
118 |
// "rldb_print_v4_0_1_0_Ameisen_110609_rev120113_syn.xml" |
|
119 |
|
|
120 |
"rldb_print_v4_0_1_0_artenarmeWeichtiergruppen_121127_verantw_syn.xml", |
|
121 |
"rldb_print_v4_0_1_0_Asilidae_GMH_Wolff_110314_HGxls_120413_DF_korrV_Verantw_syn.xml", |
|
122 |
"rldb_print_v4_0_1_0_Asseln_121128_verantw_syn.xml", |
|
123 |
"rldb_print_v4_0_1_0_Asselspinnen_120907_verantw_syn.xml", |
|
124 |
"rldb_print_v4_0_1_0_Bienen_PWKorr_HG_120413_DF_120612_syn.xml", |
|
125 |
"rldb_print_v4_0_1_0_Binnenmollusken_0alle_120413_DF_syn.xml", |
|
126 |
"rldb_print_v4_0_1_0_Blattoptera_140413_DF_syn.xml", |
|
127 |
"rldb_print_v4_0_1_0_Empidoidea_120413_DF.xml", |
|
128 |
"rldb_print_v4_0_1_0_Eulen_Korruebern_23-05-2012_KorrV_syn.xml", |
|
129 |
// |
|
130 |
//// "rldb_print_v4_0_1_0_Eulenspinner_Spanner_13-06-2012_KorrV_syn.xml", |
|
131 |
// |
|
132 |
"rldb_print_v4_0_1_0_Flohkrebse_121128_verantw_syn.xml", |
|
133 |
"rldb_print_v4_0_1_0_Heuschrecken_syn.xml", |
|
134 |
"rldb_print_v4_0_1_0_Igelwuermer_120907_verantw.xml", |
|
135 |
"rldb_print_v4_0_1_0_Kumazeen_120709_verantw_syn.xml", |
|
136 |
"rldb_print_v4_0_1_0_Meeresfische_syn.xml", |
|
137 |
"rldb_print_v4_0_1_0_Moostierchen_121128_verantw_syn.xml", |
|
138 |
"rldb_print_v4_0_1_0_Muscheln_121128_verantw_syn.xml", |
|
139 |
"rldb_print_v4_0_1_0_Nesseltiere_130104_verantw_syn.xml", |
|
140 |
"rldb_print_v4_0_1_0_Ohrwuermer_DF_syn.xml", |
|
141 |
"rldb_print_v4_0_1_0_Pflanzenwespen_280711_Autor_110815_HG2_120413_DF_syn.xml", |
|
142 |
"rldb_print_v4_0_1_0_Pyraloidea_Februar_ 2012_Korruebern_MB_24-04-2012_syn.xml", |
|
137 | 143 |
"rldb_print_v4_0_1_0_Schaedellose_120907_verantw_syn.xml", |
138 | 144 |
"rldb_print_v4_0_1_0_Schnecken_130206_verantw_syn.xml", |
139 | 145 |
"rldb_print_v4_0_1_0_Schwaemme_121127_verantw_syn.xml", |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportConfigurator.java | ||
---|---|---|
76 | 76 |
// rdfNamespace |
77 | 77 |
Namespace bfnXmlNamespace; |
78 | 78 |
|
79 |
private String nomenclaturalCode = null; |
|
80 |
|
|
79 | 81 |
protected static Namespace nsTcsXml = Namespace.getNamespace("http://www.tdwg.org/schemas/tcs/1.01"); |
80 | 82 |
|
81 | 83 |
@SuppressWarnings("unchecked") |
82 | 84 |
protected void makeIoClassList(){ |
83 | 85 |
ioClassList = new Class[]{ |
86 |
BfnXmlImportNamedArea.class, |
|
84 | 87 |
BfnXmlImportMetaData.class, |
85 | 88 |
BfnXmlImportFeature.class, |
86 | 89 |
BfnXmlImportTaxonName.class |
... | ... | |
315 | 318 |
this.hasSecondList = hasSecondList; |
316 | 319 |
} |
317 | 320 |
|
318 |
|
|
321 |
public void setNomenclaturalSig(String nomenclaturalCode) { |
|
322 |
this.nomenclaturalCode = nomenclaturalCode; |
|
323 |
} |
|
324 |
|
|
325 |
public String getNomenclaturalSig(){ |
|
326 |
return nomenclaturalCode; |
|
327 |
} |
|
319 | 328 |
} |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportFeature.java | ||
---|---|---|
273 | 273 |
vocabularyStateUuid = BfnXmlTransformer.getRedlistVocabularyUUID(redListCat.toString()); |
274 | 274 |
} catch (UnknownCdmTypeException e1) { |
275 | 275 |
vocabularyStateUuid = UUID.randomUUID(); |
276 |
logger.info("Element: " + listValue); |
|
277 |
e1.printStackTrace(); |
|
276 |
logger.warn("Element: " + listValue + "\n"+ e1); |
|
278 | 277 |
} |
279 | 278 |
try { |
280 | 279 |
matchedListValue = BfnXmlTransformer.redListString2RedListCode(listValue); |
281 | 280 |
} catch (UnknownCdmTypeException e) { |
282 | 281 |
matchedListValue = listValue; |
283 |
logger.info("no matched red list code nor UUID found. \n" + e);
|
|
282 |
logger.warn("no matched red list code nor UUID found. \n" + e);
|
|
284 | 283 |
|
285 | 284 |
} |
286 | 285 |
try { |
287 | 286 |
stateTermUuid = BfnXmlTransformer.getRedlistStateTermUUID(matchedListValue, redListCat.getTitleCache()); |
288 | 287 |
} catch (UnknownCdmTypeException e) { |
289 |
// stateTermUuid = UUID.randomUUID(); //TODO: needs to be fixed for "eindeutiger Code" |
|
290 |
e.printStackTrace(); |
|
288 |
// stateTermUuid = UUID.randomUUID(); |
|
289 |
//TODO: needs to be fixed for "eindeutiger Code" |
|
290 |
logger.warn("could not finde state term uuid for " + matchedListValue + " and redlist category"+ redListCat.getTitleCache()+"\n"+e); |
|
291 | 291 |
} |
292 | 292 |
String vocName = redListCat.toString()+" States"; |
293 | 293 |
termVocabulary = (OrderedTermVocabulary) getVocabulary(TermType.State, vocabularyStateUuid, vocName, vocName, vocName, null, true, null); |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportNamedArea.java | ||
---|---|---|
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.redlist.bfnXml; |
|
11 |
|
|
12 |
import java.util.ArrayList; |
|
13 |
import java.util.Arrays; |
|
14 |
import java.util.List; |
|
15 |
import java.util.UUID; |
|
16 |
|
|
17 |
import javax.management.ObjectInstance; |
|
18 |
|
|
19 |
import org.apache.commons.lang.StringUtils; |
|
20 |
import org.apache.log4j.Logger; |
|
21 |
import org.hibernate.id.UUIDGenerator; |
|
22 |
import org.jdom.Element; |
|
23 |
import org.jdom.Namespace; |
|
24 |
import org.springframework.stereotype.Component; |
|
25 |
import org.springframework.transaction.TransactionStatus; |
|
26 |
|
|
27 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
|
28 |
import eu.etaxonomy.cdm.api.service.IDescriptionService; |
|
29 |
import eu.etaxonomy.cdm.api.service.IFeatureNodeService; |
|
30 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
|
31 |
import eu.etaxonomy.cdm.api.service.ITermService; |
|
32 |
import eu.etaxonomy.cdm.api.service.IVocabularyService; |
|
33 |
import eu.etaxonomy.cdm.common.ResultWrapper; |
|
34 |
import eu.etaxonomy.cdm.common.XmlHelp; |
|
35 |
import eu.etaxonomy.cdm.io.common.ICdmIO; |
|
36 |
import eu.etaxonomy.cdm.io.common.ImportHelper; |
|
37 |
import eu.etaxonomy.cdm.io.common.MapWrapper; |
|
38 |
import eu.etaxonomy.cdm.model.common.DefinedTermBase; |
|
39 |
import eu.etaxonomy.cdm.model.common.Language; |
|
40 |
import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary; |
|
41 |
import eu.etaxonomy.cdm.model.common.TermType; |
|
42 |
import eu.etaxonomy.cdm.model.common.TermVocabulary; |
|
43 |
import eu.etaxonomy.cdm.model.common.VocabularyEnum; |
|
44 |
import eu.etaxonomy.cdm.model.description.CategoricalData; |
|
45 |
import eu.etaxonomy.cdm.model.description.DescriptionBase; |
|
46 |
import eu.etaxonomy.cdm.model.description.DescriptionElementBase; |
|
47 |
import eu.etaxonomy.cdm.model.description.Feature; |
|
48 |
import eu.etaxonomy.cdm.model.description.FeatureNode; |
|
49 |
import eu.etaxonomy.cdm.model.description.FeatureTree; |
|
50 |
import eu.etaxonomy.cdm.model.description.State; |
|
51 |
import eu.etaxonomy.cdm.model.description.StateData; |
|
52 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
|
53 |
import eu.etaxonomy.cdm.model.location.NamedAreaLevel; |
|
54 |
import eu.etaxonomy.cdm.model.location.NamedAreaType; |
|
55 |
import eu.etaxonomy.cdm.model.name.NomenclaturalCode; |
|
56 |
import eu.etaxonomy.cdm.model.name.NonViralName; |
|
57 |
import eu.etaxonomy.cdm.model.name.Rank; |
|
58 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
|
59 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
|
60 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
|
61 |
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType; |
|
62 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
|
63 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
|
64 |
import eu.etaxonomy.cdm.persistence.dao.description.IFeatureDao; |
|
65 |
import eu.etaxonomy.cdm.strategy.exceptions.UnknownCdmTypeException; |
|
66 |
import eu.etaxonomy.cdm.strategy.parser.NonViralNameParserImpl; |
|
67 |
import eu.etaxonomy.cdm.strategy.parser.ParserProblem; |
|
68 |
/** |
|
69 |
* |
|
70 |
* @author a.oppermann |
|
71 |
* @date 04.07.2013 |
|
72 |
* |
|
73 |
*/ |
|
74 |
@Component |
|
75 |
public class BfnXmlImportNamedArea extends BfnXmlImportBase implements ICdmIO<BfnXmlImportState> { |
|
76 |
private static final Logger logger = Logger.getLogger(BfnXmlImportNamedArea.class); |
|
77 |
|
|
78 |
public BfnXmlImportNamedArea(){ |
|
79 |
super(); |
|
80 |
} |
|
81 |
|
|
82 |
@Override |
|
83 |
public boolean doCheck(BfnXmlImportState state){ |
|
84 |
boolean result = true; |
|
85 |
//TODO needs to be implemented |
|
86 |
return result; |
|
87 |
} |
|
88 |
|
|
89 |
@Override |
|
90 |
@SuppressWarnings({ "unchecked", "rawtypes" }) |
|
91 |
public void doInvoke(BfnXmlImportState state){ |
|
92 |
logger.info("create german federal states ..."); |
|
93 |
IVocabularyService vocabularyService = getVocabularyService(); |
|
94 |
ITermService termService = getTermService(); |
|
95 |
TransactionStatus tx = startTransaction(); |
|
96 |
createGermanNamedAreas(state, vocabularyService, termService); |
|
97 |
commitTransaction(tx); |
|
98 |
logger.info("end create german federal states."); |
|
99 |
return; |
|
100 |
|
|
101 |
} |
|
102 |
|
|
103 |
|
|
104 |
private void createGermanNamedAreas(BfnXmlImportState state ,IVocabularyService vocabularyService, ITermService termService) { |
|
105 |
int id = 0; |
|
106 |
for(String strGermanState:GERMAN_FEDERAL_STATES){ |
|
107 |
UUID germanStateUUID; |
|
108 |
try { |
|
109 |
germanStateUUID = BfnXmlTransformer.getGermanStateUUID(strGermanState); |
|
110 |
} catch (UnknownCdmTypeException e) { |
|
111 |
// TODO Auto-generated catch block |
|
112 |
logger.warn("Could not match german state to uuid: "+e.toString()); |
|
113 |
germanStateUUID = UUID.randomUUID(); |
|
114 |
} |
|
115 |
NamedArea germanState = (NamedArea)termService.load(germanStateUUID); |
|
116 |
if(germanState != null){ |
|
117 |
//already in the db, so no need to step through the whole process again. |
|
118 |
return; |
|
119 |
}else{ |
|
120 |
germanState = NamedArea.NewInstance(strGermanState, strGermanState, strGermanState); |
|
121 |
germanState.setUuid(germanStateUUID); |
|
122 |
germanState.setType(NamedAreaType.ADMINISTRATION_AREA()); |
|
123 |
germanState.setIdInVocabulary(Integer.toString(id));; |
|
124 |
if(strGermanState.equalsIgnoreCase("Deutschland")){ |
|
125 |
germanState.setLevel(NamedAreaLevel.COUNTRY()); |
|
126 |
}else{ |
|
127 |
germanState.setLevel(NamedAreaLevel.STATE()); |
|
128 |
} |
|
129 |
} |
|
130 |
createOrUpdateTermVocabulary(TermType.NamedArea, vocabularyService, germanState, "German Federal States"); |
|
131 |
id++; |
|
132 |
} |
|
133 |
} |
|
134 |
|
|
135 |
|
|
136 |
/** |
|
137 |
* @param vocabularyService |
|
138 |
* @param term |
|
139 |
* @param vocUUID |
|
140 |
*/ |
|
141 |
@SuppressWarnings({ "unchecked", "rawtypes" }) |
|
142 |
private TermVocabulary createOrUpdateTermVocabulary(TermType termType, IVocabularyService vocabularyService, DefinedTermBase term, String strTermVocabulary) { |
|
143 |
TermVocabulary termVocabulary = null; |
|
144 |
UUID vocUUID = null; |
|
145 |
try { |
|
146 |
vocUUID=BfnXmlTransformer.getRedlistVocabularyUUID(strTermVocabulary); |
|
147 |
} catch (UnknownCdmTypeException e) { |
|
148 |
// TODO Auto-generated catch block |
|
149 |
e.printStackTrace(); |
|
150 |
} |
|
151 |
if(vocUUID != null){ |
|
152 |
termVocabulary = vocabularyService.load(vocUUID); |
|
153 |
} |
|
154 |
//lookup via String in case uuid lookup does not work |
|
155 |
if(termVocabulary == null && vocUUID == null){ |
|
156 |
List<TermVocabulary> vocList = vocabularyService.list(TermVocabulary.class, null, null, null, VOC_CLASSIFICATION_INIT_STRATEGY); |
|
157 |
for(TermVocabulary tv : vocList){ |
|
158 |
if(tv.getTitleCache().equalsIgnoreCase(strTermVocabulary)){ |
|
159 |
termVocabulary = tv; |
|
160 |
} |
|
161 |
} |
|
162 |
} |
|
163 |
//create termvocabulary |
|
164 |
if(termVocabulary == null){ |
|
165 |
termVocabulary = TermVocabulary.NewInstance(termType, strTermVocabulary, strTermVocabulary, strTermVocabulary, null); |
|
166 |
if(vocUUID != null){ |
|
167 |
termVocabulary.setUuid(vocUUID); |
|
168 |
} |
|
169 |
} |
|
170 |
termVocabulary.addTerm(term); |
|
171 |
vocabularyService.saveOrUpdate(termVocabulary); |
|
172 |
|
|
173 |
return termVocabulary; |
|
174 |
} |
|
175 |
|
|
176 |
|
|
177 |
/* (non-Javadoc) |
|
178 |
* @see eu.etaxonomy.cdm.io.common.CdmIoBase#isIgnore(eu.etaxonomy.cdm.io.common.IImportConfigurator) |
|
179 |
*/ |
|
180 |
protected boolean isIgnore(BfnXmlImportState state){ |
|
181 |
return ! state.getConfig().isDoTaxonNames(); |
|
182 |
} |
|
183 |
|
|
184 |
private static final List<String> GERMAN_FEDERAL_STATES = Arrays.asList(new String[] { |
|
185 |
"Deutschland", |
|
186 |
"Baden-Württemberg", |
|
187 |
"Bayern", |
|
188 |
"Berlin", |
|
189 |
"Brandenburg", |
|
190 |
"Hamburg", |
|
191 |
"Hessen", |
|
192 |
"Mecklenburg-Vorpommern", |
|
193 |
"Niedersachsen", |
|
194 |
"Nordrhein-Westfalen", |
|
195 |
"Rheinland-Pfalz", |
|
196 |
"Saarland", |
|
197 |
"Sachsen", |
|
198 |
"Sachsen-Anhalt", |
|
199 |
"Schleswig-Holstein", |
|
200 |
"Thüringen" |
|
201 |
}); |
|
202 |
|
|
203 |
|
|
204 |
/** Hibernate classification vocabulary initialisation strategy */ |
|
205 |
private static final List<String> VOC_CLASSIFICATION_INIT_STRATEGY = Arrays.asList(new String[] { |
|
206 |
"classification.$", |
|
207 |
"classification.rootNodes", |
|
208 |
"childNodes", |
|
209 |
"childNodes.taxon", |
|
210 |
"childNodes.taxon.name", |
|
211 |
"taxonNodes", |
|
212 |
"taxonNodes.taxon", |
|
213 |
"synonymRelations", |
|
214 |
"taxon.*", |
|
215 |
"taxon.sec", |
|
216 |
"taxon.name.*", |
|
217 |
"taxon.synonymRelations", |
|
218 |
"termVocabulary.*", |
|
219 |
"terms", |
|
220 |
"namedArea" |
|
221 |
|
|
222 |
}); |
|
223 |
|
|
224 |
|
|
225 |
} |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportTaxonName.java | ||
---|---|---|
23 | 23 |
import org.springframework.stereotype.Component; |
24 | 24 |
import org.springframework.transaction.TransactionStatus; |
25 | 25 |
|
26 |
import com.sun.tools.jxc.gen.config.Config; |
|
27 |
|
|
26 | 28 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
27 | 29 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
28 | 30 |
import eu.etaxonomy.cdm.common.ResultWrapper; |
29 | 31 |
import eu.etaxonomy.cdm.common.XmlHelp; |
30 | 32 |
import eu.etaxonomy.cdm.io.common.ICdmIO; |
31 | 33 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
34 |
import eu.etaxonomy.cdm.model.common.DefinedTermBase; |
|
32 | 35 |
import eu.etaxonomy.cdm.model.common.Language; |
33 | 36 |
import eu.etaxonomy.cdm.model.description.CategoricalData; |
34 | 37 |
import eu.etaxonomy.cdm.model.description.CommonTaxonName; |
... | ... | |
67 | 70 |
|
68 | 71 |
private static final Logger logger = Logger.getLogger(BfnXmlImportTaxonName.class); |
69 | 72 |
|
70 |
private static final String strNomenclaturalCode = "Zoological";//"Botanical";
|
|
73 |
private static String strNomenclaturalCode = null;// "Zoological";//"Botanical";
|
|
71 | 74 |
private static int parsingProblemCounter = 0; |
72 | 75 |
private Map<Integer, Taxon> firstList; |
73 | 76 |
private Map<Integer, Taxon> secondList; |
... | ... | |
89 | 92 |
ITaxonService taxonService = getTaxonService(); |
90 | 93 |
|
91 | 94 |
BfnXmlImportConfigurator config = state.getConfig(); |
95 |
strNomenclaturalCode = config.getNomenclaturalSig(); |
|
92 | 96 |
Element elDataSet = getDataSetElement(config); |
93 | 97 |
//TODO set Namespace |
94 | 98 |
Namespace bfnNamespace = config.getBfnXmlNamespace(); |
... | ... | |
124 | 128 |
* @param bfnNamespace |
125 | 129 |
* @param currentElement |
126 | 130 |
*/ |
127 |
private void extractTaxonConceptRelationShips(Namespace bfnNamespace, |
|
128 |
Element currentElement) { |
|
131 |
private void extractTaxonConceptRelationShips(Namespace bfnNamespace, Element currentElement) { |
|
129 | 132 |
String childName; |
130 | 133 |
String bfnElementName = "KONZEPTBEZIEHUNG"; |
131 | 134 |
ResultWrapper<Boolean> success = ResultWrapper.NewInstance(true); |
... | ... | |
379 | 382 |
if(elWissName.getAttributeValue("bereich", bfnNamespace).equalsIgnoreCase("wissName")){ |
380 | 383 |
try{ |
381 | 384 |
TaxonNameBase<?, ?> nameBase = parseNonviralNames(rank,strAuthor,strSupplement,elWissName); |
385 |
if(nameBase.isProtectedTitleCache() == true){ |
|
386 |
logger.warn("Taxon " + nameBase.getTitleCache()); |
|
387 |
} |
|
388 |
|
|
382 | 389 |
//TODO extract to method? |
390 |
if(strSupplement != null){ |
|
391 |
nameBase.setAppendedPhrase(strSupplement); |
|
392 |
} |
|
383 | 393 |
if(strSupplement != null && strSupplement.equalsIgnoreCase("nom. illeg.")){ |
384 | 394 |
nameBase.addStatus(NomenclaturalStatus.NewInstance(NomenclaturalStatusType.ILLEGITIMATE())); |
385 | 395 |
} |
386 |
|
|
387 |
// nameBase.setId(Integer.parseInt(strId)); |
|
388 |
//ImportHelper.setOriginalSource(nameBase, config.getSourceReference(), strId, idNamespace); |
|
389 |
|
|
390 |
|
|
391 | 396 |
/** |
392 | 397 |
* BFN does not want any name matching yet |
393 | 398 |
*/ |
... | ... | |
403 | 408 |
// if (nameList.size()>1){ |
404 | 409 |
// logger.warn("More than 1 matching taxon name found for " + nameBase.getTitleCache()); |
405 | 410 |
// } |
406 |
// }CurrentMicroRef |
|
407 |
|
|
408 |
// taxon = (Taxon) taxonBase; |
|
411 |
// } |
|
409 | 412 |
state.setCurrentMicroRef(state.getFirstListSecRef()); |
410 | 413 |
if(config.isFillSecondList()){ |
411 | 414 |
state.setCurrentMicroRef(state.getSecondListSecRef()); |
412 | 415 |
} |
413 | 416 |
taxon = Taxon.NewInstance(nameBase, state.getCurrentMicroRef()); |
414 |
// logger.info("Taxon Reference" + taxon.getSec().getTitle()); |
|
415 |
//set NameSpace |
|
417 |
//set create and set path of nameSpace |
|
416 | 418 |
Element parentElement = elWissName.getParentElement(); |
417 | 419 |
Element grandParentElement = parentElement.getParentElement(); |
418 |
// Element newElement = new Element("prefix", parentElement.getName()+":"+parentElement.getAttribute("taxNr").getName()); |
|
419 |
// Element newElement = new Element("element",grandParentElement.getName()+"-"+parentElement.getName()+"-"+elWissName.getName() , uriNameSpace); |
|
420 |
// config.setBfnXmlNamespace(newElement.getNamespace()); |
|
421 |
|
|
422 | 420 |
taxon.addImportSource(uniqueID, grandParentElement.getName()+":"+parentElement.getName()+":"+elWissName.getName()+":"+uriNameSpace, state.getCompleteSourceRef(), state.getCurrentMicroRef().getTitle()); |
423 | 421 |
} catch (UnknownCdmTypeException e) { |
424 | 422 |
success.setValue(false); |
... | ... | |
524 | 522 |
* @param childElementName |
525 | 523 |
* @param elInformations |
526 | 524 |
* @param state |
525 |
* @throws UnknownCdmTypeException |
|
527 | 526 |
*/ |
528 | 527 |
|
529 | 528 |
@SuppressWarnings("unchecked") |
530 | 529 |
private void createOrUpdateInformation(Taxon taxon, |
531 | 530 |
Namespace bfnNamespace, String childElementName, |
532 | 531 |
Element elInformations, |
533 |
BfnXmlImportState state) {
|
|
532 |
BfnXmlImportState state){ |
|
534 | 533 |
|
535 | 534 |
List<Element> elInformationList = (List<Element>)elInformations.getChildren(childElementName, bfnNamespace); |
536 | 535 |
|
537 |
//TODO |
|
538 |
TaxonDescription taxonDescription = getTaxonDescription(taxon, false, true); |
|
539 | 536 |
for(Element elInfo:elInformationList){ |
540 |
|
|
541 |
childElementName = "IWERT"; |
|
542 |
List<Element> elInfoDetailList = (List<Element>)elInfo.getChildren(childElementName, bfnNamespace); |
|
543 |
|
|
544 |
for(Element elInfoDetail : elInfoDetailList){ |
|
545 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("RL Kat.")){ |
|
546 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
547 |
} |
|
548 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Kat. +/-")){ |
|
549 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
550 |
} |
|
551 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("aktuelle Bestandsstituation")){ |
|
552 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
553 |
} |
|
554 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("langfristiger Bestandstrend")){ |
|
555 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
556 |
} |
|
557 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("kurzfristiger Bestandstrend")){ |
|
558 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
559 |
} |
|
560 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Risikofaktoren")){ |
|
561 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
562 |
} |
|
563 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Verantwortlichkeit")){ |
|
564 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
565 |
} |
|
566 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("alte RL- Kat.")){ |
|
567 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
568 |
} |
|
569 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Neobiota")){ |
|
570 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
571 |
} |
|
572 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Eindeutiger Code")){ |
|
573 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
574 |
} |
|
575 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Kommentar zur Taxonomie")){ |
|
576 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
|
577 |
} |
|
578 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Kommentar zur Gefährdung")){ |
|
579 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
|
580 |
} |
|
581 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Sonderfälle")){ |
|
582 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
583 |
} |
|
584 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Letzter Nachweis")){ |
|
585 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
|
537 |
//check if geographical scope is Bund and import only these information for now |
|
538 |
//TODO create several taxon descriptions for different geographical scope |
|
539 |
if(elInfo.getName().equalsIgnoreCase("BEZUGSRAUM") && elInfo.getAttributeValue("name").equalsIgnoreCase("Bund")){ |
|
540 |
childElementName = "IWERT"; |
|
541 |
TaxonDescription taxonDescription = getTaxonDescription(taxon, false, true); |
|
542 |
UUID germanStateUUID; |
|
543 |
try { |
|
544 |
germanStateUUID = BfnXmlTransformer.getGermanStateUUID("Deutschland"); |
|
545 |
NamedArea area = (NamedArea)getTermService().load(germanStateUUID); |
|
546 |
taxonDescription.addGeoScope(area); |
|
547 |
} catch (UnknownCdmTypeException e) { |
|
548 |
// TODO Auto-generated catch block |
|
549 |
e.printStackTrace(); |
|
586 | 550 |
} |
587 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Weitere Kommentare")){ |
|
588 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
|
551 |
List<Element> elInfoDetailList = (List<Element>)elInfo.getChildren(childElementName, bfnNamespace); |
|
552 |
|
|
553 |
for(Element elInfoDetail : elInfoDetailList){ |
|
554 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("RL Kat.")){ |
|
555 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
556 |
} |
|
557 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Kat. +/-")){ |
|
558 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
559 |
} |
|
560 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("aktuelle Bestandsstituation")){ |
|
561 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
562 |
} |
|
563 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("langfristiger Bestandstrend")){ |
|
564 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
565 |
} |
|
566 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("kurzfristiger Bestandstrend")){ |
|
567 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
568 |
} |
|
569 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Risikofaktoren")){ |
|
570 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
571 |
} |
|
572 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Verantwortlichkeit")){ |
|
573 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
574 |
} |
|
575 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("alte RL- Kat.")){ |
|
576 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
577 |
} |
|
578 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Neobiota")){ |
|
579 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
580 |
} |
|
581 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Eindeutiger Code")){ |
|
582 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
583 |
} |
|
584 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Kommentar zur Taxonomie")){ |
|
585 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
|
586 |
} |
|
587 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Kommentar zur Gefährdung")){ |
|
588 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
|
589 |
} |
|
590 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Sonderfälle")){ |
|
591 |
makeFeatures(taxonDescription, elInfoDetail, state, false); |
|
592 |
} |
|
593 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Letzter Nachweis")){ |
|
594 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
|
595 |
} |
|
596 |
if(elInfoDetail.getAttributeValue("standardname").equalsIgnoreCase("Weitere Kommentare")){ |
|
597 |
makeFeatures(taxonDescription, elInfoDetail, state, true); |
|
598 |
} |
|
589 | 599 |
} |
590 | 600 |
} |
591 | 601 |
} |
... | ... | |
685 | 695 |
//codeRank does not exist |
686 | 696 |
else{ |
687 | 697 |
result = codeRank; |
688 |
logger.warn("string rank used, because code rank does not exist or was not recognized: " + codeRank.toString() +" "+strRank);
|
|
698 |
logger.warn("string rank used, because code rank does not exist or was not recognized: " + codeRank.getTitleCache()+" "+strRank);
|
|
689 | 699 |
} |
690 | 700 |
return result; |
691 | 701 |
} |
... | ... | |
703 | 713 |
TaxonNameBase<?,?> taxonNameBase = null; |
704 | 714 |
|
705 | 715 |
NomenclaturalCode nomCode = BfnXmlTransformer.nomCodeString2NomCode(strNomenclaturalCode); |
706 |
//Todo check author |
|
707 | 716 |
String strScientificName = elWissName.getTextNormalize(); |
717 |
/** |
|
718 |
* |
|
719 |
* trim strScienctificName because sometimes |
|
720 |
* getTextNormalize() does not removes all the |
|
721 |
* whitespaces |
|
722 |
* |
|
723 |
**/ |
|
724 |
strScientificName = StringUtils.trim(strScientificName); |
|
725 |
strScientificName = StringUtils.remove(strScientificName, "\u00a0"); |
|
726 |
strScientificName = StringUtils.remove(strScientificName, "\uc281"); |
|
727 |
|
|
708 | 728 |
if(strSupplement != null && !strSupplement.isEmpty()){ |
709 | 729 |
strScientificName = StringUtils.remove(strScientificName, strSupplement); |
710 | 730 |
} |
711 |
|
|
712 | 731 |
NonViralName<?> nonViralName = null; |
713 | 732 |
NonViralNameParserImpl parser = NonViralNameParserImpl.NewInstance(); |
714 | 733 |
nonViralName = parser.parseFullName(strScientificName, nomCode, rank); |
715 | 734 |
if(nonViralName.hasProblem()){ |
716 |
// logger.info("Problems: "+nonViralName.hasProblem()); |
|
717 |
//TODO handle parsing Problems |
|
718 |
|
|
719 | 735 |
for(ParserProblem p:nonViralName.getParsingProblems()){ |
720 |
|
|
721 |
logger.info(++parsingProblemCounter + " " +nonViralName.toString() +" "+p.toString()); |
|
736 |
logger.warn(++parsingProblemCounter + " " +nonViralName.getTitleCache() +" "+p.toString()); |
|
722 | 737 |
} |
723 | 738 |
} |
739 |
//check for parsed rank |
|
724 | 740 |
Rank parsedRank = nonViralName.getRank(); |
725 | 741 |
if(parsedRank != rank){ |
726 | 742 |
nonViralName.setRank(rank); |
727 | 743 |
} |
728 |
|
|
729 |
// nonViralName.setNameCache(strScientificName); |
|
744 |
//check for parsed author |
|
745 |
String parsedAuthor = nonViralName.getAuthorshipCache(); |
|
746 |
strAuthor = StringUtils.trim(strAuthor); |
|
747 |
parsedAuthor = StringUtils.trim(parsedAuthor); |
|
748 |
if(parsedAuthor.equalsIgnoreCase(strAuthor)){ |
|
749 |
logger.info("Taxon " + nonViralName.getTitleCache() +":" |
|
750 |
+"\t Author field: " + strAuthor +" and parsed AuthorshipCache: "+nonViralName.getAuthorshipCache()); |
|
751 |
} |
|
730 | 752 |
taxonNameBase = nonViralName; |
731 | 753 |
return taxonNameBase; |
732 | 754 |
} |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlTransformer.java | ||
---|---|---|
49 | 49 |
public static final UUID vocStateRLNeo = UUID.fromString("6c55ae1d-046d-4b67-89aa-b24c4888df6a"); |
50 | 50 |
public static final UUID vocStateRLKatId = UUID.fromString("c54481b3-bf07-43ce-b1cb-09759e4d2a70"); |
51 | 51 |
public static final UUID vocStateRLSpecialCases = UUID.fromString("ce2f4f8f-4222-429f-938b-77b794ecf704"); |
52 |
public static final UUID vocGermanFederalStates = UUID.fromString("a80dc3d4-0def-4c9b-97a1-12e8eb7ec87f"); |
|
52 | 53 |
|
53 | 54 |
//redlist feature |
54 | 55 |
public static final UUID featureRLKat = UUID.fromString("744f8833-619a-4d83-b330-1997c3b2c2f9"); |
... | ... | |
344 | 345 |
if(redListVocabulary.equalsIgnoreCase("Neobiota")) return vocStateRLNeo; |
345 | 346 |
if(redListVocabulary.equalsIgnoreCase("Eindeutiger Code")) return vocStateRLKatId; |
346 | 347 |
if(redListVocabulary.equalsIgnoreCase("Sonderfälle")) return vocStateRLSpecialCases; |
348 |
if(redListVocabulary.equalsIgnoreCase("German Federal States")) return vocGermanFederalStates; |
|
347 | 349 |
else{ |
348 | 350 |
throw new UnknownCdmTypeException("Unknown Vocabulary feature, could not match: " + redListVocabulary); |
349 | 351 |
} |
... | ... | |
469 | 471 |
throw new UnknownCdmTypeException("Unknown State, could not match: " + redListStateTerm +"\n In Category: " + redListFeature); |
470 | 472 |
|
471 | 473 |
} |
474 |
|
|
475 |
|
|
476 |
public static UUID getGermanStateUUID(String strGermanState) throws UnknownCdmTypeException { |
|
477 |
|
|
478 |
if(strGermanState.equalsIgnoreCase("Deutschland")) return UUID.fromString("a7f3855e-d4fa-4313-8fcf-da792ef848e7"); |
|
479 |
if(strGermanState.equalsIgnoreCase("Baden-Württemberg"))return UUID.fromString("00e64948-9ce9-4ebf-961b-133c56517b1c"); |
|
480 |
if(strGermanState.equalsIgnoreCase("Bayern"))return UUID.fromString("ba075265-368f-4ff0-8942-88546239c70a"); |
|
481 |
if(strGermanState.equalsIgnoreCase("Berlin"))return UUID.fromString("d9339e12-7efa-45df-a008-3c934b9386bc"); |
|
482 |
if(strGermanState.equalsIgnoreCase("Brandenburg"))return UUID.fromString("dda9d8b8-8090-4667-953e-d8b1f7243926"); |
|
483 |
if(strGermanState.equalsIgnoreCase("Hamburg"))return UUID.fromString("f087a7d7-974f-4627-a414-df27c04f99dd"); |
|
484 |
if(strGermanState.equalsIgnoreCase("Hessen"))return UUID.fromString("59de29e6-bf32-4677-89c7-a6834fcb5085"); |
|
485 |
if(strGermanState.equalsIgnoreCase("Mecklenburg-Vorpommern"))return UUID.fromString("06dccbd5-8d5a-4e4f-b56e-d1d74ab25c19"); |
|
486 |
if(strGermanState.equalsIgnoreCase("Niedersachsen"))return UUID.fromString("97f77fe8-07ab-4e14-8f8b-40e8caf7e653"); |
|
487 |
if(strGermanState.equalsIgnoreCase("Nordrhein-Westfalen"))return UUID.fromString("46bf702e-1438-470c-9c77-04202c34ebf2"); |
|
488 |
if(strGermanState.equalsIgnoreCase("Rheinland-Pfalz"))return UUID.fromString("dd3ddb29-b1ec-4937-99a9-4a94d383becf"); |
|
489 |
if(strGermanState.equalsIgnoreCase("Saarland"))return UUID.fromString("26d3e85f-ce90-43ae-8ac0-42a60302b7b7"); |
|
490 |
if(strGermanState.equalsIgnoreCase("Sachsen"))return UUID.fromString("ca3ef152-ee3a-45f2-8343-983cf0fdddbd"); |
|
491 |
if(strGermanState.equalsIgnoreCase("Sachsen-Anhalt"))return UUID.fromString("bb95b9a4-87ee-49bd-a542-4c30289e8d1f"); |
|
492 |
if(strGermanState.equalsIgnoreCase("Schleswig-Holstein"))return UUID.fromString("863323a7-22fb-4070-ad94-ce317098a28a"); |
|
493 |
if(strGermanState.equalsIgnoreCase("Thüringen"))return UUID.fromString("72e18526-6bf7-4300-8329-53cab5da2b51"); |
|
494 |
|
|
495 |
else |
|
496 |
throw new UnknownCdmTypeException("Unknown State, could not match: " + strGermanState); |
|
497 |
} |
|
472 | 498 |
|
473 | 499 |
} |
Also available in: Unified diff
Improved bfn related xml importer