changes for vernacular names import
[cdmlib-apps.git] / cdm-pesi / src / main / java / eu / etaxonomy / cdm / app / pesi / PesiExportActivatorIF.java
index 1b77ff757265831f6fc080f66f51e5f9cd05ef63..a01c65103297ed21917f09e4fb4f109c51a250d3 100644 (file)
@@ -1,9 +1,9 @@
 // $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
@@ -33,24 +33,24 @@ public class PesiExportActivatorIF {
 \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
@@ -65,13 +65,13 @@ public class PesiExportActivatorIF {
        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
@@ -85,17 +85,17 @@ public class PesiExportActivatorIF {
 //     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
@@ -109,7 +109,7 @@ public class PesiExportActivatorIF {
                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
@@ -119,12 +119,13 @@ public class PesiExportActivatorIF {
 \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