Revision a2f11b66
Added by Andreas Müller over 5 years ago
app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/EuroMedActivator.java | ||
---|---|---|
77 | 77 |
private static final Logger logger = Logger.getLogger(EuroMedActivator.class); |
78 | 78 |
|
79 | 79 |
//database validation status (create, update, validate ...) |
80 |
static DbSchemaValidation hbm2dll = DbSchemaValidation.CREATE;
|
|
80 |
static DbSchemaValidation hbm2dll = DbSchemaValidation.VALIDATE;
|
|
81 | 81 |
// static final Source berlinModelSource = BerlinModelSources.euroMed_Pub2(); |
82 | 82 |
static final Source berlinModelSource = BerlinModelSources.euroMed_BGBM42(); |
83 | 83 |
// static final Source berlinModelSource = BerlinModelSources.euroMed_PESI3(); |
84 | 84 |
// |
85 | 85 |
// static final ICdmDataSource cdmDestination = CdmDestinations.localH2(); |
86 | 86 |
// static final ICdmDataSource cdmDestination = CdmDestinations.cdm_local_euromed(); |
87 |
static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_euroMed(); |
|
87 |
static final ICdmDataSource cdmDestination = CdmDestinations.cdm_local_euromed(); |
|
88 |
// static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_euroMed(); |
|
88 | 89 |
|
89 | 90 |
//check - import |
90 | 91 |
static final CHECK check = CHECK.IMPORT_WITHOUT_CHECK; |
... | ... | |
98 | 99 |
static final boolean doTaxonNames = true; |
99 | 100 |
static final boolean doRelNames = true; |
100 | 101 |
static final boolean doNameStatus = true; |
101 |
static final boolean doTypes = false; //serious types do not exist in E+M except for name types which are handled in name relations |
|
102 | 102 |
static final boolean doNameFacts = true; |
103 |
//serious types do not exist in E+M except for name types which are handled in name relations |
|
104 |
static final boolean doTypes = false; //serious types do not exist in E+M except for name types which are handled in name relations |
|
103 | 105 |
|
104 | 106 |
//taxa |
105 | 107 |
static final boolean doTaxa = true; |
106 | 108 |
static final boolean doFacts = true; |
107 |
static final boolean doCommonNames = false; //currently takes very long |
|
108 | 109 |
static final boolean doOccurences = false; |
109 | 110 |
static final boolean doRelTaxa = true; |
110 |
static final boolean doRunTransmissionEngine = (hbm2dll == DbSchemaValidation.VALIDATE); |
|
111 |
static final boolean doCommonNames = false; //currently takes very long |
|
112 |
|
|
113 |
static final boolean doRunTransmissionEngine = false; // (hbm2dll == DbSchemaValidation.VALIDATE); |
|
111 | 114 |
|
112 | 115 |
//etc. |
113 |
static final boolean doMarker = false; |
|
116 |
static final boolean doMarker = false; //no relevant markers exist
|
|
114 | 117 |
|
115 | 118 |
boolean invers = !(hbm2dll == DbSchemaValidation.CREATE); |
116 | 119 |
|
... | ... | |
208 | 211 |
config.setDoOccurrence(doOccurences ^ invers); |
209 | 212 |
config.setDoCommonNames(doCommonNames ^ invers); |
210 | 213 |
|
211 |
config.setDoMarker(doMarker ^ invers);
|
|
214 |
config.setDoMarker(doMarker); |
|
212 | 215 |
config.setDoUser(doUser ^ invers); |
213 | 216 |
|
214 | 217 |
config.setEuroMed(true); |
... | ... | |
439 | 442 |
if (config.isDoOccurrence() && (config.getCheck().isImport())){ |
440 | 443 |
|
441 | 444 |
try { |
442 |
UUID areaVocabularyUuid = BerlinModelTransformer.uuidVocEuroMedAreas;
|
|
445 |
UUID areaVocabularyUuid = BerlinModelTransformer.uuidVocEuroMedAreas;
|
|
443 | 446 |
List<String> idSearchFields = Arrays.asList(new String[]{"EMAREA","PARENT"}); |
444 | 447 |
String wmsLayerName = "euromed_2013"; |
445 | 448 |
Set<UUID> areaUuidSet = null; |
... | ... | |
449 | 452 |
|
450 | 453 |
Map<NamedArea, String> resultMap; |
451 | 454 |
try { |
452 |
// URL url = ClassLoader.getSystemResource("myConfig.txt"); |
|
453 |
// FileReader fileReader = new FileReader(url.getFile()); |
|
454 | 455 |
InputStream in = EuroMedActivator.class.getResourceAsStream("/euromed/euromed_2013.csv"); |
455 | 456 |
Reader reader = new InputStreamReader(in, "UTF-8"); |
456 | 457 |
|
... | ... | |
465 | 466 |
logger.error(message); |
466 | 467 |
System.out.println(message); |
467 | 468 |
} |
468 |
} catch (Exception e) { |
|
469 |
e.printStackTrace(); |
|
470 |
logger.error("Exception in importShapefile: " + e.getMessage()); |
|
471 |
} |
|
469 |
} catch (Exception e) {
|
|
470 |
e.printStackTrace();
|
|
471 |
logger.error("Exception in importShapefile: " + e.getMessage());
|
|
472 |
}
|
|
472 | 473 |
} |
473 | 474 |
} |
474 | 475 |
|
Also available in: Unified diff
latest state for EuroMedActivator