\r
import org.apache.log4j.Logger;\r
\r
+import eu.etaxonomy.cdm.app.berlinModelImport.SourceBase;\r
import eu.etaxonomy.cdm.app.tcs.TcsSources;\r
-import eu.etaxonomy.cdm.common.AccountStore;\r
import eu.etaxonomy.cdm.io.common.Source;\r
\r
/**\r
* @date 21.04.2010\r
*\r
*/\r
-public class CdmImportSources {\r
+public class CdmImportSources extends SourceBase{\r
@SuppressWarnings("unused")\r
private static final Logger logger = Logger.getLogger(CdmImportSources.class);\r
\r
-\r
- public static Source AFRICA_CHECKLIST_ACCESS(){\r
- // \r
- String dbms = Source.ACCESS;\r
- String strServer = null;\r
- //String strDB = "fernsTest";\r
- String strDB = "C:\\localCopy\\Data\\eflora\\africa\\checklist_flore_afrique_centrale_corr.mdb";\r
+ public static Source ROTE_LISTE_DB(){\r
+ String dbms = Source.ORACLE;\r
+ String strServer = "xxx";\r
+ String strDB = "dbName";\r
int port = 1433;\r
- String userName = "";\r
+ String userName = "adam";\r
return makeSource(dbms, strServer, strDB, port, userName, null);\r
}\r
\r
\r
- public static Source AFRICA_FERNS_ACCESS(){\r
- // \r
- String dbms = Source.ACCESS;\r
- String strServer = null;\r
- //String strDB = "fernsTest";\r
- String strDB = "C:\\localCopy\\Data\\eflora\\africa\\ferns\\Synopsis_Database_corrected.mdb";\r
- int port = 1433;\r
- String userName = "";\r
- return makeSource(dbms, strServer, strDB, port, userName, null);\r
- }\r
- \r
public static Source GLOBIS(){\r
String dbms = Source.SQL_SERVER_2005;\r
String strServer = "LENOVO-T61";\r
String strDB = "globis";\r
- int port = 1433;\r
- String userName = "adam";\r
+ int port = 0001;\r
+ String userName = "user";\r
return makeSource(dbms, strServer, strDB, port, userName, null);\r
}\r
\r
String userName = "";\r
return makeSource(dbms, strServer, strDB, port, userName, null);\r
}\r
+\r
+ public static Source GLOBIS_MDB_20120928(){\r
+ String dbms = Source.ACCESS;\r
+ String strServer = null;\r
+ String strDB = "C:\\localCopy\\Data\\globis\\globis.20120928.mdb";\r
+ int port = -1;\r
+ String userName = "";\r
+ return makeSource(dbms, strServer, strDB, port, userName, null);\r
+ }\r
+\r
+ public static Source GLOBIS_MDB_20140113(){\r
+ String dbms = Source.ACCESS;\r
+ String strServer = null;\r
+ String strDB = "C:\\localCopy\\Data\\globis\\globis_20140113.mdb";\r
+ int port = -1;\r
+ String userName = "";\r
+ return makeSource(dbms, strServer, strDB, port, userName, null);\r
+ }\r
\r
+ //Problem MS Access ODBC Driver does not work on PESIIMPORT 3\r
+ @Deprecated\r
+ public static Source GLOBIS_MDB_20140113_PESIIMPORT(){\r
+ String dbms = Source.ACCESS;\r
+ String strServer = null;\r
+ String strDB = "\\\\PESIIMPORT3\\globis\\globis_20140113.mdb";\r
+ int port = -1;\r
+ String userName = "";\r
+ return makeSource(dbms, strServer, strDB, port, userName, null);\r
+ }\r
+ \r
+ public static Source GLOBIS_MDB_20140113_PESIIMPORT_SQLSERVER(){\r
+ String dbms = Source.SQL_SERVER_2008;\r
+ String strServer = "PESIIMPORT3";\r
+ String strDB = "globis_orig_20140113";\r
+ int port = 1433;\r
+ String userName = "globisImport";\r
+ return makeSource(dbms, strServer, strDB, port, userName, null);\r
+ }\r
\r
public static URI SYNTHESYS_SPECIMEN(){\r
// tcsXmlTest.xml\r
return uri; \r
}\r
\r
- /**\r
- * Initializes the source.\r
- * @param dbms\r
- * @param strServer\r
- * @param strDB\r
- * @param port\r
- * @param userName\r
- * @param pwd\r
- * @return the source\r
- */\r
- private static Source makeSource(String dbms, String strServer, String strDB, int port, String userName, String pwd ){\r
- //establish connection\r
- Source source = null;\r
- source = new Source(dbms, strServer, strDB);\r
- source.setPort(port);\r
- \r
- pwd = AccountStore.readOrStorePassword(dbms, strServer, userName, pwd);\r
- source.setUserAndPwd(userName, pwd);\r
- // write pwd to account store\r
- return source;\r
- }\r
+ \r
+ \r
+\r
}\r