/**\r
* @author a.babadshanjan\r
* @created 25.09.2008\r
+ * \r
+ * NOTE: the result may go into \r
+ * cdmlib-persistence\target\test-classes\eu\etaxonomy\cdm\h2\LocalH2\r
*/\r
public class JaxbImportActivator {\r
\r
/* SerializeFrom DB **/\r
// private static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_test();\r
- private static final ICdmDataSource cdmDestination = CdmDestinations.localH2Standardliste();\r
+ //if you run from IDE it may run into {cdmlib-folder}\cdmlib-persistence\target\test-classes\eu\etaxonomy\cdm\h2\LocalH2\\r
+ private static final ICdmDataSource cdmDestination = CdmDestinations.localH2Armeria();\r
\r
\r
// Import:\r
private static String importFileNameString = \r
//"C:\\workspace\\cdmlib_2.2\\cdmlib-io\\src\\test\\resources\\eu\\etaxonomy\\cdm\\io\\jaxb\\export_test_app_import.xml";\r
// "file:/C:/export_test_app_import.xml";\r
-// "file:/C:/localCopy/Data/kr�hen/201206141338-jaxb_export-cdm.xml";\r
// "file:/C:/opt/data/rl/201406041541-jaxb_export-Regenwuermer.xml";\r
// "file:/C:/opt/data/rl/201406241132-jaxb_export-Armeria.xml";\r
- "file:////PESIIMPORT3/redlist/standardliste/standardliste_jaxb.xml";\r
+// "file:/F:/data/redlist/standardliste/standardliste_jaxb.xml";\r
+// "//PESIIMPORT3/redlist/standardliste/standardliste_jaxb.xml";\r
+ "//PESIIMPORT3/redlist/201411261506-jaxb_export-armeria_demo_local.xml";\r
+\r
+ \r
+ \r
+\r
\r
\r
/** NUMBER_ROWS_TO_RETRIEVE = 0 is the default case to retrieve all rows.\r
\r
JaxbImportActivator jia = new JaxbImportActivator();\r
ICdmDataSource destination = CdmDestinations.chooseDestination(args) != null ? CdmDestinations.chooseDestination(args) : cdmDestination;\r
- String file = chooseFile(args)!= null ? chooseFile(args) : importFileNameString;\r
-\r
- File file2 = new File("//PESIIMPORT3/redlist/standardliste/standardliste_jaxb.xml");\r
- boolean exists = file2.exists();\r
-// System.out.println(exists);\r
- URI uri = file2.toURI();\r
-// System.out.println(uri.toString());\r
- \r
+ String fileStr = chooseFile(args)!= null ? chooseFile(args) : importFileNameString;\r
+ File file = new File(fileStr);\r
\r
- File fileTest = new File(uri);\r
- exists = fileTest.exists();\r
-// System.out.println(exists);\r
-\r
- \r
- CdmApplicationController appCtr = null;\r
-// appCtr = jia.initDb(destination);\r
- \r
+ URI uri = file.toURI();\r
+ System.out.println(new File(uri).exists());\r
+ if (! new File(uri).exists()){\r
+ System.out.println("File does not exist! Exit");\r
+ return;\r
+ }\r
jia.invokeImport(uri, destination);\r
}\r
\r