Revision 3f87d726
Added by Katja Luther over 4 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/ErmsImportActivator.java | ||
---|---|---|
37 | 37 |
static final Source ermsSource = PesiSources.PESI2019_ERMS(); |
38 | 38 |
|
39 | 39 |
// static final ICdmDataSource cdmDestination = CdmDestinations.test_cdm_pesi_erms(); |
40 |
static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms(); |
|
40 |
|
|
41 |
// static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms(); |
|
41 | 42 |
// static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms2(); |
43 |
static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_faunaEu_mysql(); |
|
44 |
|
|
42 | 45 |
|
43 |
static final Source pesiDestination = |
|
44 |
cdmDestination == CdmDestinations.cdm_test_local_mysql_erms()? |
|
45 |
PesiDestinations.pesi_test_local_CDM_ERMS2PESI(): |
|
46 |
PesiDestinations.pesi_test_local_CDM_ERMS2PESI_2() ; |
|
46 |
// static final Source pesiDestination =
|
|
47 |
// cdmDestination == CdmDestinations.cdm_test_local_mysql_erms()?
|
|
48 |
// PesiDestinations.pesi_test_local_CDM_ERMS2PESI():
|
|
49 |
// PesiDestinations.pesi_test_local_CDM_ERMS2PESI_2() ;
|
|
47 | 50 |
|
48 | 51 |
static final boolean includeExport2PESI = false; |
49 | 52 |
|
... | ... | |
59 | 62 |
|
60 | 63 |
// ***************** ALL ************************************************// |
61 | 64 |
|
65 |
// static final DO_REFERENCES doReferences = DO_REFERENCES.ALL; |
|
66 |
// static final boolean doTaxa = true; |
|
67 |
// static final boolean doRelTaxa = doTaxa; //should always run with doTaxa because dependent on state from doTaxa |
|
68 |
// static final boolean doSourceUse = true; |
|
69 |
// static final boolean doCommonNames = true; |
|
70 |
// static final boolean doNotes = true; |
|
71 |
// static final boolean doDistributions = true; |
|
72 |
// static final boolean doLinks = true; |
|
73 |
// static final boolean doImages = true; |
|
74 |
|
|
75 |
//******************** NONE ***************************************// |
|
76 |
// |
|
62 | 77 |
static final DO_REFERENCES doReferences = DO_REFERENCES.ALL; |
63 | 78 |
static final boolean doTaxa = true; |
64 |
static final boolean doRelTaxa = doTaxa; //should always run with doTaxa because dependent on state from doTaxa |
|
79 |
static final boolean doRelTaxa = doTaxa; //should always run with doTaxa because depends on state from doTaxa |
|
80 |
|
|
65 | 81 |
static final boolean doSourceUse = true; |
66 | 82 |
static final boolean doCommonNames = true; |
67 | 83 |
static final boolean doNotes = true; |
... | ... | |
81 | 97 |
// static final boolean doLinks = false; |
82 | 98 |
// static final boolean doImages = false; |
83 | 99 |
|
84 |
private static DbSchemaValidation hbm2dll = (doReferences == DO_REFERENCES.ALL)? DbSchemaValidation.CREATE:DbSchemaValidation.VALIDATE; |
|
100 |
//private static DbSchemaValidation hbm2dll = (doReferences == DO_REFERENCES.ALL)? DbSchemaValidation.CREATE:DbSchemaValidation.VALIDATE; |
|
101 |
private static DbSchemaValidation hbm2dll = DbSchemaValidation.VALIDATE; |
|
85 | 102 |
|
86 | 103 |
private void doImport(Source source, ICdmDataSource destination, DbSchemaValidation hbm2dll){ |
87 | 104 |
System.out.println("Start import from ("+ ermsSource.getDatabase() + ") to " + destination.getDatabase() + " ..." ); |
... | ... | |
142 | 159 |
// ermsExport.doInferredSynonyms = doRelTaxa; |
143 | 160 |
ermsExport.doDescriptions = doImages; |
144 | 161 |
|
145 |
ermsExport.doExport(cdmDB, pesiDestination); |
|
162 |
// ermsExport.doExport(cdmDB, pesiDestination);
|
|
146 | 163 |
} |
147 | 164 |
System.exit(0); |
148 | 165 |
} |
Also available in: Unified diff
fix compile errors in app-import