Revision b0b606e6
Added by Andreas Müller over 8 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/cuba/CubaActivator.java | ||
---|---|---|
41 | 41 |
|
42 | 42 |
boolean invers = true; |
43 | 43 |
boolean include = !invers; |
44 |
|
|
44 | 45 |
boolean doAsteraceae = include; |
45 | 46 |
boolean doConvolvulaceae = include; |
46 |
boolean doCyperaceae = include; |
|
47 |
boolean doCyperaceae = ! include;
|
|
47 | 48 |
boolean doDicotA_C = include; |
48 | 49 |
boolean doDicotD_M = include; |
49 | 50 |
boolean doDicotN_Z = include; |
50 | 51 |
boolean doEuphorbiaceae = include; |
51 |
boolean doFabaceae = include; |
|
52 |
boolean doFabaceae = ! include;
|
|
52 | 53 |
boolean doGymnospermae = include; |
53 | 54 |
boolean doLamVerbenaceae = include; |
54 |
boolean doMalpighiaceae = include; |
|
55 |
boolean doMalpighiaceae = ! include;
|
|
55 | 56 |
boolean doMelastomataceae = ! include; |
56 |
boolean doMonocots = include ; |
|
57 |
boolean doMonocots = ! include ;
|
|
57 | 58 |
boolean doMyrtaceae = include; |
58 | 59 |
boolean doOrchidaceae = include; |
59 | 60 |
boolean doRubiaceae = include; |
60 |
boolean doUrticaceae = include; |
|
61 |
boolean doUrticaceae = ! include;
|
|
61 | 62 |
|
62 | 63 |
|
63 | 64 |
|
64 |
static final ICdmDataSource cdmDestination = CdmDestinations.localH2(); |
|
65 |
// static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
|
|
65 | 66 |
// static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_test(); |
66 | 67 |
// static final ICdmDataSource cdmDestination = CdmDestinations.cdm_cyprus_dev(); |
67 |
// static final ICdmDataSource cdmDestination = CdmDestinations.cdm_cuba_production();
|
|
68 |
static final ICdmDataSource cdmDestination = CdmDestinations.cdm_cuba_production(); |
|
68 | 69 |
|
69 | 70 |
|
70 | 71 |
//feature tree uuid |
... | ... | |
79 | 80 |
//check - import |
80 | 81 |
static final CHECK check = CHECK.IMPORT_WITHOUT_CHECK; |
81 | 82 |
|
82 |
static boolean doVocabularies = (hbm2dll == DbSchemaValidation.CREATE);
|
|
83 |
boolean doVocabularies = (hbm2dll == DbSchemaValidation.CREATE); |
|
83 | 84 |
static final boolean doTaxa = true; |
84 | 85 |
static final boolean doDeduplicate = false; |
85 | 86 |
|
... | ... | |
189 | 190 |
if (doVocabularies){ |
190 | 191 |
FeatureTree tree = makeFeatureNodes(myImport.getCdmAppController().getTermService()); |
191 | 192 |
myImport.getCdmAppController().getFeatureTreeService().saveOrUpdate(tree); |
193 |
this.doVocabularies = false; |
|
192 | 194 |
} |
193 | 195 |
System.out.println("End import from ("+ source.toString() + ")..."); |
194 | 196 |
} |
app-import/src/main/java/eu/etaxonomy/cdm/io/cuba/CubaExcelImport.java | ||
---|---|---|
270 | 270 |
+"(\\((.{6,})\\))?"; |
271 | 271 |
private static final String heterotypicRegExStr_TEST = "([^\\(]{5,}" +"(\\(.+\\))?" + "[^\\)\\(]{2,})" |
272 | 272 |
+"(\\((.{6,})\\))?"; |
273 |
private static final String missapliedRegExStr = "“(.*{5,})”\\s+(auct\\.(\\sFC\\-S)?(\\s+p\\.\\s*p\\.)?|sensu\\s+.{2,})"; |
|
273 |
private static final String auctRegExStr = "auct\\." |
|
274 |
+"((\\sFC(\\-S)?(\\s&\\sA&S)?)|(\\sA&S))?(\\s+p\\.\\s*p\\.)?"; |
|
275 |
private static final String missapliedRegExStr = "“(.*{5,})”\\s+(" + auctRegExStr + "|sensu\\s+.{2,})"; |
|
274 | 276 |
private static final String nomInvalRegExStr = "“(.*{5,})”\\s+nom\\.\\s+inval\\."; |
275 | 277 |
private static final String homonymRegExStr = "\\s*(\\[.*\\])*\\s*"; |
276 | 278 |
|
... | ... | |
321 | 323 |
Team team = Team.NewTitledInstance(secondPart, null); |
322 | 324 |
sensu.setAuthorship(team); |
323 | 325 |
misappliedNameTaxon.setSec(sensu); |
324 |
}else if (secondPart.matches("auct.((\\s+p\\.\\s*p\\.)|(\\sFC\\-S))?")){
|
|
326 |
}else if (secondPart.matches(auctRegExStr)){
|
|
325 | 327 |
secondPart = secondPart.replace("p. p.", "p.p."); |
326 | 328 |
misappliedNameTaxon.setAppendedPhrase(secondPart); |
327 | 329 |
}else{ |
... | ... | |
692 | 694 |
TaxonNode familyTaxon = getFamilyTaxon(record, state); |
693 | 695 |
if (familyTaxon == null){ |
694 | 696 |
if (record.get("Taxón") != null){ |
695 |
logger.warn(line + ": Family not recognized but taxon exists:" + record.get("Taxón")); |
|
697 |
logger.warn(line + ": Family not recognized but taxon exists: " + record.get("Taxón"));
|
|
696 | 698 |
return; |
697 | 699 |
}else if (record.get("Syn.") == null){ |
698 | 700 |
logger.warn(line + ": Family not recognized but also no synonym exists"); |
Also available in: Unified diff
Latest updates to Cuba import