Project

General

Profile

« Previous | Next » 

Revision 2cb6ad67

Added by Andreas Müller almost 5 years ago

ref #8508, ref #8509, ref #1444 latest changes to ERMS import and export activators

View differences:

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();
41
	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms2();
40
	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms();
41
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms2();
42 42

  
43 43
	static final Source pesiDestination =
44 44
	        cdmDestination == CdmDestinations.cdm_test_local_mysql_erms()?
......
49 49

  
50 50
	static final UUID classificationUuid = UUID.fromString("6fa988a9-10b7-48b0-a370-2586fbc066eb");
51 51
	static final String classificationName = "ERMS 2019";
52
	static final String sourceRefTitle = "ERMS export for PESI";
52 53

  
53 54
	//check - import
54 55
	static final CHECK check = CHECK.IMPORT_WITHOUT_CHECK;
......
58 59

  
59 60
// ***************** ALL ************************************************//
60 61

  
61
//	static final DO_REFERENCES doReferences =  DO_REFERENCES.ALL;
62
//	static final DO_REFERENCES doReferences = DO_REFERENCES.ALL;
62 63
//	static final boolean doTaxa = true;
63 64
//	static final boolean doRelTaxa = doTaxa; //should always run with doTaxa because dependent on state from doTaxa
64
//    static final boolean doCommonNames = true;
65
//    static final boolean doNotes = true;
66
//	static final boolean doDistributions = true;
67
//	static final boolean doLinks = true;
68
//	static final boolean doImages = true;
65
//	static final boolean doSourceUse = false;
66
//	static final boolean doCommonNames = false;
67
//    static final boolean doNotes = false;
68
//	static final boolean doDistributions = false;
69
//	static final boolean doLinks = false;
70
//	static final boolean doImages = false;
69 71

  
70 72
//******************** NONE ***************************************//
71 73
//
......
76 78
	static final boolean doCommonNames = true;
77 79
	static final boolean doNotes = true;
78 80
	static final boolean doDistributions = true;
79
	static final boolean doLinks =true;
81
	static final boolean doLinks = true;
80 82
	static final boolean doImages = true;
81 83

  
82 84
	private static DbSchemaValidation hbm2dll = (doReferences ==  DO_REFERENCES.ALL)? DbSchemaValidation.CREATE:DbSchemaValidation.VALIDATE;
83 85

  
84 86
	private void doImport(Source source, ICdmDataSource destination, DbSchemaValidation hbm2dll){
85
		System.out.println("Start import from ("+ ermsSource.getDatabase() + ") to "+cdmDestination.getDatabase()+" ..." );
87
		System.out.println("Start import from ("+ ermsSource.getDatabase() + ") to " + cdmDestination.getDatabase() + " ..." );
86 88

  
87 89
		//make ERMS Source
88 90

  
......
108 110
		config.setRecordsPerTransaction(partitionSize);
109 111
		config.setSourceRefUuid(PesiTransformer.uuidSourceRefErms);
110 112
		config.setClassificationName(classificationName);
113
		config.setSourceReferenceTitle(sourceRefTitle);
111 114

  
112 115
		// invoke import
113 116
		CdmDefaultImport<ErmsImportConfigurator> ermsImport = new CdmDefaultImport<>();
cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/PesiExportActivatorERMS.java
33 33
//    static final ICdmDataSource cdmSource = CdmDestinations.cdm_test_local_mysql_erms2();
34 34

  
35 35
	//database validation status (create, update, validate ...)
36
	static final Source pesiDestination = PesiDestinations.pesi_test_local_CDM_ERMS2PESI();
37
//	static final Source pesiDestination = PesiDestinations.pesi_test_local_CDM_ERMS2PESI_2();
36
//	static final Source pesiDestination = PesiDestinations.pesi_test_local_CDM_ERMS2PESI();
37
	static final Source pesiDestination = PesiDestinations.pesi_test_local_CDM_ERMS2PESI_2();
38 38

  
39 39
// ****************** ALL *****************************************
40 40

  
41
	boolean deleteAll = false;
42
	DO_REFERENCES doReferences =  DO_REFERENCES.NONE;
43
	boolean doTaxa = false;
44
	boolean doTreeIndex = false;
45
	boolean doInferredSynonyms = false;  //xx takes long, unclear what it does
46
	boolean doRelTaxa = false;
47
	boolean doDescriptions = true;
41
//	boolean deleteAll = true;
42
//	DO_REFERENCES doReferences =  DO_REFERENCES.ALL;
43
//	boolean doTaxa = true;
44
//	boolean doTreeIndex = true;
45
//	boolean doInferredSynonyms = false;  //xx takes long, unclear what it does
46
//	boolean doRelTaxa = true;
47
//    boolean doAdditionalTaxonSource = true;
48
//	boolean doDescriptions = true;
48 49

  
49 50
// ************************ NONE **************************************** //
50 51

  
51
//	boolean deleteAll = false;
52
//	static DO_REFERENCES doReferences =  DO_REFERENCES.NONE;
53
//	boolean doTaxa = false;
54
//	boolean doTreeIndex = doTaxa; //only with doTaxa
55
//	boolean doInferredSynonyms = false; //only with doTaxa
56
//	boolean doRelTaxa = false;
57
//	boolean doDescriptions = true;
58

  
59
//	static final boolean doNotes = false;
60
//	static final boolean doNoteSources = false;
61
//	static final boolean doAdditionalTaxonSource = false;
62
//	static final boolean doOccurrence = false;
63
//	static final boolean doOccurrenceSource = false;
64
//	static final boolean doImage = false;
52
	boolean deleteAll = false;
53
	static DO_REFERENCES doReferences =  DO_REFERENCES.NONE;
54
	boolean doTaxa = false;
55
	boolean doTreeIndex = doTaxa; //only with doTaxa
56
	boolean doInferredSynonyms = false; //only with doTaxa
57
	boolean doRelTaxa = true;
58
	boolean doAdditionalTaxonSource = false;
59
	boolean doDescriptions = false;
65 60

  
66 61
	static boolean doPureNames = false;  //ERMS has no pure names
67 62

  

Also available in: Unified diff