Revision 220dce9c
Added by Andreas Müller over 4 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(); |
... | ... | |
89 | 89 |
// static final ICdmDataSource cdmDestination = CdmDestinations.cdm_production_euromed(); |
90 | 90 |
|
91 | 91 |
//check - import |
92 |
static final CHECK check = CHECK.CHECK_ONLY;
|
|
92 |
static final CHECK check = CHECK.IMPORT_WITHOUT_CHECK;
|
|
93 | 93 |
|
94 | 94 |
static final boolean doUser = true; |
95 | 95 |
// //authors |
96 | 96 |
static final boolean doAuthors = true; |
97 | 97 |
//references |
98 |
static final DO_REFERENCES doReferences = DO_REFERENCES.ALL;
|
|
98 |
static final DO_REFERENCES doReferences = DO_REFERENCES.ALL; |
|
99 | 99 |
//names |
100 | 100 |
static final boolean doTaxonNames = true; |
101 | 101 |
static final boolean doRelNames = true; |
... | ... | |
108 | 108 |
static final boolean doRelTaxa = true; |
109 | 109 |
static final boolean doOccurrences = true; |
110 | 110 |
static final boolean doOccurrenceSources = true; |
111 |
static final boolean doCommonNames = true; //currently takes very long
|
|
111 |
static final boolean doCommonNames = true; |
|
112 | 112 |
|
113 | 113 |
static final boolean doNamedAreas = true; |
114 | 114 |
|
... | ... | |
280 | 280 |
CdmDefaultImport<BerlinModelImportConfigurator> bmImport = new CdmDefaultImport<>(); |
281 | 281 |
bmImport.invoke(config); |
282 | 282 |
|
283 |
renameRanks(config, bmImport); |
|
283 |
// renameRanks(config, bmImport);
|
|
284 | 284 |
|
285 | 285 |
createFeatureTree(config, bmImport); |
286 | 286 |
|
... | ... | |
292 | 292 |
|
293 | 293 |
importShapefile(config, bmImport); |
294 | 294 |
|
295 |
createPreferences(config, bmImport);
|
|
295 |
// createPreferences(config, bmImport); => manual
|
|
296 | 296 |
|
297 | 297 |
// markAreasAsHidden(config, bmImport); //has been moved to BM occurrence import |
298 | 298 |
|
... | ... | |
342 | 342 |
CdmPreference showMediaView = CdmPreference.NewTaxEditorInstance(PreferencePredicate.ShowMediaView, "false"); |
343 | 343 |
showMediaView.setAllowOverride(false); |
344 | 344 |
app.getPreferenceService().set(showMediaView); |
345 |
|
|
345 | 346 |
//multi classification |
346 |
CdmPreference multiClassification = CdmPreference.NewTaxEditorInstance(PreferencePredicate.DisableMultiClassification, "false");
|
|
347 |
CdmPreference multiClassification = CdmPreference.NewTaxEditorInstance(PreferencePredicate.DisableMultiClassification, "true");
|
|
347 | 348 |
multiClassification.setAllowOverride(false); |
348 | 349 |
app.getPreferenceService().set(multiClassification); |
350 |
|
|
349 | 351 |
//taxon node wizard |
350 | 352 |
CdmPreference showTaxonNodeWizard = CdmPreference.NewTaxEditorInstance(PreferencePredicate.ShowTaxonNodeWizard, "false"); |
351 | 353 |
showTaxonNodeWizard.setAllowOverride(false); |
... | ... | |
695 | 697 |
ICdmDataSource cdmRepository = CdmDestinations.chooseDestination(args) != null ? CdmDestinations.chooseDestination(args) : cdmDestination; |
696 | 698 |
|
697 | 699 |
importActivator.importEm2CDM(source, cdmRepository, hbm2dll); |
698 |
if (includePesiExport){ |
|
699 |
//not available from here since E+M was moved to app-import |
|
700 |
// PesiExportActivatorEM exportActivator = new PesiExportActivatorEM(); |
|
701 |
// exportActivator.doExport(cdmRepository); |
|
702 |
} |
|
703 | 700 |
System.exit(0); |
704 |
|
|
705 | 701 |
} |
706 | 702 |
|
707 | 703 |
} |
Also available in: Unified diff
last adaptation to E+M import (not needed anymore)