// $Id$\r
/**\r
* Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
* http://www.e-taxonomy.eu\r
-* \r
+*\r
* The contents of this file are subject to the Mozilla Public License Version 1.1\r
* See LICENSE.TXT at the top of this package for the full license terms.\r
*/\r
\r
//database validation status (create, update, validate ...)\r
static final Source pesiDestination = PesiDestinations.pesi_test_local_CDM_IF2PESI();\r
- \r
- static final ICdmDataSource cdmSource = CdmDestinations.cdm_test_local_mysql();\r
+\r
+ static final ICdmDataSource cdmSource = CdmDestinations.cdm_test_local_indexFungorum();\r
// static final ICdmDataSource cdmSource = CdmDestinations.cdm_test_local_mysql_test();\r
\r
static final int partitionSize = 2000;\r
- \r
+\r
//check - export\r
static final CHECK check = CHECK.EXPORT_WITHOUT_CHECK;\r
\r
static final boolean deleteAll = true;\r
- \r
+\r
static final IdType idType = IdType.CDM_ID;\r
\r
// ****************** ALL *****************************************\r
- \r
+\r
//references\r
static final DO_REFERENCES doReferences = DO_REFERENCES.ALL;\r
- \r
+\r
//taxa\r
static final boolean doTaxa = true;\r
static final boolean doRelTaxa = true;\r
static final boolean doInferredSynonyms = false;\r
static final boolean doPureNames = false; // !!!\r
static final boolean doDescription = true;\r
- \r
+\r
\r
// ************************ NONE **************************************** //\r
- \r
+\r
// //references\r
// static final DO_REFERENCES doReferences = DO_REFERENCES.NONE;\r
-// \r
+//\r
// //taxa\r
// static final boolean doTaxa = false;\r
// static final boolean doRelTaxa = false;\r
// static final boolean doRank = true;\r
// static final boolean doInferredSynonyms = true;\r
// static final boolean doDescription = false;\r
- \r
- \r
+\r
+\r
public boolean doExport(ICdmDataSource source){\r
System.out.println("Start export to PESI ("+ pesiDestination.getDatabase() + ") ...");\r
- \r
+\r
//make PESI Source\r
Source destination = pesiDestination;\r
PesiTransformer transformer = new PesiTransformer(destination);\r
- \r
+\r
PesiExportConfigurator config = PesiExportConfigurator.NewInstance(destination, source, transformer);\r
- \r
+\r
config.setDoTaxa(doTaxa);\r
config.setDoRelTaxa(doRelTaxa);\r
config.setDoOccurrence(doOccurrence);\r
config.setDoInferredSynonyms(doInferredSynonyms);\r
config.setDoPureNames(doPureNames);\r
config.setDoDescription(doDescription);\r
- \r
+\r
config.setCheck(check);\r
config.setLimitSave(partitionSize);\r
config.setIdType(idType);\r
\r
// invoke export\r
CdmDefaultExport<PesiExportConfigurator> pesiExport = new CdmDefaultExport<PesiExportConfigurator>();\r
- boolean result = pesiExport.invoke(config);\r
- \r
+\r
+ boolean result = pesiExport.invoke(config);\r
+\r
System.out.println("End export to PESI ("+ destination.getDatabase() + ")..." + (result? "(successful)":"(with errors)"));\r
return result;\r
}\r
- \r
+\r
/**\r
* @param args\r
*/\r