adapt app-import to v5.45
[cdmlib-apps.git] / app-import / src / main / java / eu / etaxonomy / cdm / app / common / CdmImportSources.java
1 /**
2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.cdm.app.common;
10
11 import java.net.URL;
12
13 import org.apache.logging.log4j.LogManager;
14 import org.apache.logging.log4j.Logger;
15
16 import eu.etaxonomy.cdm.app.berlinModelImport.SourceBase;
17 import eu.etaxonomy.cdm.app.tcs.TcsSources;
18 import eu.etaxonomy.cdm.common.URI;
19 import eu.etaxonomy.cdm.io.common.Source;
20
21 /**
22 * @author a.mueller
23 * @since 21.04.2010
24 */
25 public class CdmImportSources extends SourceBase{
26
27 @SuppressWarnings("unused")
28 private static final Logger logger = LogManager.getLogger();
29
30 public static Source ROTE_LISTE_GEFAESSPFLANZEN_DB(){
31 String dbms = Source.MYSQL;
32 String strServer = "localhost";
33 String strDB = "RL_Gefaesspflanzen_source";
34 int port = 3306;
35 String userName = "root";
36 return makeSource(dbms, strServer, strDB, port, userName, null);
37 }
38
39 public static Source ROTE_LISTE_DB(){
40 String dbms = Source.ORACLE;
41 String strServer = "xxx";
42 String strDB = "dbName";
43 int port = 1433;
44 String userName = "adam";
45 return makeSource(dbms, strServer, strDB, port, userName, null);
46 }
47
48
49 public static Source GLOBIS(){
50 String dbms = Source.SQL_SERVER_2005;
51 String strServer = "LENOVO-T61";
52 String strDB = "globis";
53 int port = 0001;
54 String userName = "user";
55 return makeSource(dbms, strServer, strDB, port, userName, null);
56 }
57
58 public static Source GLOBIS_ODBC(){
59 String dbms = Source.ODDBC;
60 String strServer = "LENOVO-T61";
61 String strDB = "globis";
62 int port = 1433;
63 String userName = "sa";
64 return makeSource(dbms, strServer, strDB, port, userName, null);
65 }
66
67 public static Source GLOBIS_MDB(){
68 String dbms = Source.ACCESS;
69 String strServer = null;
70 String strDB = "C:\\localCopy\\Data\\globis\\globis.mdb";
71 int port = -1;
72 String userName = "";
73 return makeSource(dbms, strServer, strDB, port, userName, null);
74 }
75
76 public static Source GLOBIS_MDB_20120928(){
77 String dbms = Source.ACCESS;
78 String strServer = null;
79 String strDB = "C:\\localCopy\\Data\\globis\\globis.20120928.mdb";
80 int port = -1;
81 String userName = "";
82 return makeSource(dbms, strServer, strDB, port, userName, null);
83 }
84
85 public static Source GLOBIS_MDB_20140113(){
86 String dbms = Source.ACCESS;
87 String strServer = null;
88 String strDB = "C:\\localCopy\\Data\\globis\\globis_20140113.mdb";
89 int port = -1;
90 String userName = "";
91 return makeSource(dbms, strServer, strDB, port, userName, null);
92 }
93
94 //Problem MS Access ODBC Driver does not work on PESIIMPORT 3
95 @Deprecated
96 public static Source GLOBIS_MDB_20140113_PESIIMPORT(){
97 String dbms = Source.ACCESS;
98 String strServer = null;
99 String strDB = "\\\\PESIIMPORT3\\globis\\globis_20140113.mdb";
100 int port = -1;
101 String userName = "";
102 return makeSource(dbms, strServer, strDB, port, userName, null);
103 }
104
105 public static Source GLOBIS_MDB_20140113_PESIIMPORT_SQLSERVER(){
106 String dbms = Source.SQL_SERVER_2008;
107 String strServer = "PESIIMPORT3";
108 String strDB = "globis_orig_20140113";
109 int port = 1433;
110 String userName = "globisImport";
111 return makeSource(dbms, strServer, strDB, port, userName, null);
112 }
113
114 public static URI SYNTHESYS_SPECIMEN(){
115 // tcsXmlTest.xml
116 URL url = new TcsSources().getClass().getResource("/specimen/SynthesysSpecimenExample.xls");
117 String sourceUrl = url.toString();
118 URI uri = URI.create(sourceUrl);
119 return uri;
120 }
121
122 public static Source EDAPHOBASE(){
123 String dbms = Source.POSTGRESQL9;
124 String strServer = "130.133.70.26"; //BGBM-PESISQL
125 String strDB = "edaphobase";
126 int port = 5432;
127 String userName = "postgres";
128 return makeSource(dbms, strServer, strDB, port, userName, null);
129 }
130
131 public static Source EDAPHOBASE2(){
132 String dbms = Source.POSTGRESQL9;
133 String strServer = "130.133.70.26"; //BGBM-PESISQL
134 String strDB = "edaphobase2";
135 int port = 5432;
136 String userName = "postgres";
137 return makeSource(dbms, strServer, strDB, port, userName, null);
138 }
139
140 public static Source EDAPHOBASE6(){
141 String dbms = Source.POSTGRESQL9;
142 String strServer = "130.133.70.26"; //BGBM-PESISQL
143 String strDB = "edaphobase6";
144 int port = 5432;
145 String userName = "postgres";
146 return makeSource(dbms, strServer, strDB, port, userName, null);
147 }
148
149 public static Source EDAPHOBASE8(){
150 String dbms = Source.POSTGRESQL9; //TODO 10
151 String strServer = "130.133.70.26"; //BGBM-PESISQL
152 String strDB = "edaphobase8";
153 int port = 5433;
154 String userName = "edaphobase";
155 return makeSource(dbms, strServer, strDB, port, userName, null);
156 }
157
158 public static Source MEXICO_EFLORA(){
159 String dbms = Source.MYSQL;
160 String strServer = "localhost";
161 String strDB = "mexico_eflora";
162 int port = 3306;
163 String userName = "edit";
164 return makeSource(dbms, strServer, strDB, port, userName, null);
165 }
166
167 }