Revision 63d39904
Added by Cherian Mathew over 10 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/common/TestDatabase.java | ||
---|---|---|
13 | 13 |
import org.apache.log4j.Logger; |
14 | 14 |
import org.springframework.transaction.TransactionStatus; |
15 | 15 |
|
16 |
import eu.etaxonomy.cdm.api.application.CdmApplicationDefaultController;
|
|
16 |
import eu.etaxonomy.cdm.api.application.CdmApplicationController; |
|
17 | 17 |
import eu.etaxonomy.cdm.common.AccountStore; |
18 | 18 |
import eu.etaxonomy.cdm.database.CdmDataSource; |
19 | 19 |
import eu.etaxonomy.cdm.database.DbSchemaValidation; |
... | ... | |
71 | 71 |
return datasource; |
72 | 72 |
} |
73 | 73 |
|
74 |
public static CdmApplicationDefaultController
|
|
74 |
public static CdmApplicationController |
|
75 | 75 |
initDb(ICdmDataSource db, DbSchemaValidation dbSchemaValidation, boolean omitTermLoading) { |
76 | 76 |
|
77 | 77 |
logger.info("Initializing database '" + db.getName() + "'"); |
78 | 78 |
|
79 |
CdmApplicationDefaultController appCtrInit = null;
|
|
80 |
appCtrInit = CdmApplicationDefaultController.NewInstance(db, dbSchemaValidation, omitTermLoading);
|
|
79 |
CdmApplicationController appCtrInit = null; |
|
80 |
appCtrInit = CdmApplicationController.NewInstance(db, dbSchemaValidation, omitTermLoading); |
|
81 | 81 |
|
82 | 82 |
return appCtrInit; |
83 | 83 |
} |
84 | 84 |
|
85 |
public static void loadTestData(String dbname, CdmApplicationDefaultController appCtr) {
|
|
85 |
public static void loadTestData(String dbname, CdmApplicationController appCtr) { |
|
86 | 86 |
|
87 | 87 |
logger.info("Loading test data into " + dbname); |
88 | 88 |
|
cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/merging/FaunaEuErmsFindIdenticalNamesActivator.java | ||
---|---|---|
7 | 7 |
import java.util.List; |
8 | 8 |
import java.util.Set; |
9 | 9 |
|
10 |
import eu.etaxonomy.cdm.api.application.CdmApplicationDefaultController;
|
|
10 |
import eu.etaxonomy.cdm.api.application.CdmApplicationController; |
|
11 | 11 |
import eu.etaxonomy.cdm.app.common.CdmDestinations; |
12 | 12 |
import eu.etaxonomy.cdm.app.common.TestDatabase; |
13 | 13 |
import eu.etaxonomy.cdm.database.DbSchemaValidation; |
... | ... | |
29 | 29 |
//TODO hole aus beiden DB alle TaxonNameBases |
30 | 30 |
|
31 | 31 |
|
32 |
private CdmApplicationDefaultController initDb(ICdmDataSource db) {
|
|
32 |
private CdmApplicationController initDb(ICdmDataSource db) { |
|
33 | 33 |
|
34 | 34 |
// Init source DB |
35 |
CdmApplicationDefaultController appCtrInit = null;
|
|
35 |
CdmApplicationController appCtrInit = null; |
|
36 | 36 |
|
37 | 37 |
appCtrInit = TestDatabase.initDb(db, DbSchemaValidation.VALIDATE, false); |
38 | 38 |
|
... | ... | |
47 | 47 |
|
48 | 48 |
FaunaEuErmsFindIdenticalNamesActivator sc = new FaunaEuErmsFindIdenticalNamesActivator(); |
49 | 49 |
|
50 |
CdmApplicationDefaultController appCtrFaunaEu = sc.initDb(faunaEuropaeaSource);
|
|
50 |
CdmApplicationController appCtrFaunaEu = sc.initDb(faunaEuropaeaSource); |
|
51 | 51 |
String sFileName = "c:\\test"; |
52 |
//CdmApplicationDefaultController appCtrErms = sc.initDb(ermsSource);
|
|
52 |
//CdmApplicationController appCtrErms = sc.initDb(ermsSource); |
|
53 | 53 |
List<String> propertyPaths = new ArrayList<String>(); |
54 | 54 |
propertyPaths.add("sources.*"); |
55 | 55 |
propertyPaths.add("sources.idInSource"); |
... | ... | |
313 | 313 |
} |
314 | 314 |
|
315 | 315 |
|
316 |
private List<FaunaEuErmsMerging> createMergeObjects(List<TaxonNameBase> names, CdmApplicationDefaultController appCtr){
|
|
316 |
private List<FaunaEuErmsMerging> createMergeObjects(List<TaxonNameBase> names, CdmApplicationController appCtr){ |
|
317 | 317 |
|
318 | 318 |
List<FaunaEuErmsMerging> merge = new ArrayList<FaunaEuErmsMerging>(); |
319 | 319 |
ZoologicalName zooName, zooName2; |
cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/merging/FaunaEuErmsMergeActivator.java | ||
---|---|---|
15 | 15 |
|
16 | 16 |
import org.apache.log4j.Logger; |
17 | 17 |
|
18 |
import eu.etaxonomy.cdm.api.application.CdmApplicationDefaultController;
|
|
18 |
import eu.etaxonomy.cdm.api.application.CdmApplicationController; |
|
19 | 19 |
import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException; |
20 | 20 |
import eu.etaxonomy.cdm.api.service.pager.Pager; |
21 | 21 |
import eu.etaxonomy.cdm.app.common.CdmDestinations; |
... | ... | |
52 | 52 |
static final int rankFaunaEu = 4; |
53 | 53 |
static final int rankErms = 13; |
54 | 54 |
|
55 |
CdmApplicationDefaultController appCtrInit;
|
|
55 |
CdmApplicationController appCtrInit; |
|
56 | 56 |
|
57 | 57 |
private static final Logger logger = Logger.getLogger(FaunaEuErmsMergeActivator.class); |
58 | 58 |
|
Also available in: Unified diff
reverting back cdm application configuration refactoring