Project

General

Profile

« Previous | Next » 

Revision b4e7eccb

Added by Andreas Müller over 4 years ago

#3945 move some PESI classes to new packages and minor issues

View differences:

cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/ErmsImportActivator.java
15 15

  
16 16
import eu.etaxonomy.cdm.api.application.ICdmRepository;
17 17
import eu.etaxonomy.cdm.app.common.CdmDestinations;
18
import eu.etaxonomy.cdm.app.common.PesiDestinations;
19
import eu.etaxonomy.cdm.app.common.PesiSources;
18 20
import eu.etaxonomy.cdm.database.DbSchemaValidation;
19 21
import eu.etaxonomy.cdm.database.ICdmDataSource;
20 22
import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
......
24 26
import eu.etaxonomy.cdm.io.pesi.erms.ErmsImportConfigurator;
25 27
import eu.etaxonomy.cdm.io.pesi.out.PesiTransformer;
26 28
import eu.etaxonomy.cdm.model.name.TaxonName;
27
import eu.etaxonomy.cdm.model.reference.ISourceable;
28 29

  
29 30
/**
30 31
 * @author a.mueller
......
38 39

  
39 40
//	static final ICdmDataSource cdmDestination = CdmDestinations.test_cdm_pesi_erms();
40 41

  
41
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms();
42
	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms();
42 43
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms2();
43
	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_faunaEu_mysql();
44
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_faunaEu_mysql();
44 45

  
45 46

  
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()    ;
50

  
51 47
	static final boolean includeExport2PESI = false;
48
	static final Source pesiDestination = !includeExport2PESI ? null :
49
	        cdmDestination == CdmDestinations.cdm_test_local_mysql_erms()?
50
	                PesiDestinations.pesi_test_local_CDM_ERMS2PESI():
51
	                PesiDestinations.pesi_test_local_CDM_ERMS2PESI_2()    ;
52 52

  
53 53
	static final UUID classificationUuid = UUID.fromString("6fa988a9-10b7-48b0-a370-2586fbc066eb");
54 54
	static final String classificationName = "ERMS 2019";
......
62 62

  
63 63
// ***************** ALL ************************************************//
64 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
//
77 65
	static final DO_REFERENCES doReferences = DO_REFERENCES.ALL;
78 66
	static final boolean doTaxa = true;
79
	static final boolean doRelTaxa = doTaxa; //should always run with doTaxa because depends on state from doTaxa
80

  
67
	static final boolean doRelTaxa = doTaxa; //should always run with doTaxa because dependent on state from doTaxa
81 68
	static final boolean doSourceUse = true;
82 69
	static final boolean doCommonNames = true;
83 70
    static final boolean doNotes = true;
84
    static final boolean doDistributions = true;
71
	static final boolean doDistributions = true;
85 72
	static final boolean doLinks = true;
86 73
	static final boolean doImages = true;
87 74

  
......
90 77
//	static final DO_REFERENCES doReferences = DO_REFERENCES.NONE;
91 78
//	static final boolean doTaxa = false;
92 79
//	static final boolean doRelTaxa = doTaxa; //should always run with doTaxa because depends on state from doTaxa
80
//
93 81
//	static final boolean doSourceUse = false;
94 82
//	static final boolean doCommonNames = false;
95
//	static final boolean doNotes = false;
96
//	static final boolean doDistributions = false;
83
//    static final boolean doNotes = false;
84
//    static final boolean doDistributions = false;
97 85
//	static final boolean doLinks = false;
98 86
//	static final boolean doImages = false;
99 87

  
......
135 123

  
136 124
		if (config.getCheck().equals(CHECK.CHECK_AND_IMPORT)  || config.getCheck().equals(CHECK.IMPORT_WITHOUT_CHECK)    ){
137 125
			ICdmRepository app = ermsImport.getCdmAppController();
138
			ISourceable<?> obj = app.getCommonService().getSourcedObjectByIdInSource(TaxonName.class, "1000027", null);
126
			TaxonName obj = app.getCommonService().getSourcedObjectByIdInSource(TaxonName.class, "1000027", null);
139 127
			logger.info(obj);
140 128
		}
141 129
		System.out.println("End import from ("+ source.getDatabase() + ") to " + destination.getDatabase() + "...");
......
153 141
			ermsExport.doRelTaxa = doRelTaxa;
154 142
            ermsExport.doDescriptions = doImages;
155 143

  
156
//			ermsExport.doExport(cdmDB, pesiDestination);
144
			ermsExport.doExport(cdmDB, pesiDestination);
157 145
		}
158 146
		System.exit(0);
159 147
	}

Also available in: Unified diff