Project

General

Profile

Download (5.11 KB) Statistics
| Branch: | Revision:
1

    
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.cdm.app.berlinModelImport;
12

    
13
import org.apache.log4j.Logger;
14

    
15
import eu.etaxonomy.cdm.common.AccountStore;
16
import eu.etaxonomy.cdm.io.common.Source;
17

    
18

    
19
public class BerlinModelSources {
20
	@SuppressWarnings("unused")
21
	private static final Logger logger = Logger.getLogger(BerlinModelSources.class);
22

    
23

    
24

    
25
	public static Source euroMed_PESI3(){
26
		//	BerlinModel - Euro+Med
27
		String dbms = Source.SQL_SERVER_2008;
28
		String strServer = "PESIIMPORT3";
29
		String strDB = "EM_2014_06";
30
		int port = 1433;
31
		String userName = "pesiexport";
32
		return  makeSource(dbms, strServer, strDB, port, userName, null);
33
	}
34

    
35
	public static Source iopi(){
36
		//	BerlinModel - Euro+Med
37
		String dbms = Source.SQL_SERVER_2008;
38
		String strServer = "BGBM17";
39
		String strDB = "IOPIBM";
40
		int port = 1433;
41
		String userName = "WebUser";
42
		return  makeSource(dbms, strServer, strDB, port, userName, null);
43
	}
44

    
45
	public static Source euroMed_BGBM42(){
46
		//	BerlinModel - Euro+Med
47
		String dbms = Source.SQL_SERVER_2008;
48
		String strServer = "BGBM42";
49
		String strDB = "EuroPlusMed_00_Edit";
50
		int port = 1433;  //was 1247
51
		String userName = "Webuser";  //was webUser  or pesiexport
52
		return  makeSource(dbms, strServer, strDB, port, userName, null);
53
	}
54

    
55
	public static Source mcl(){
56
		//	BerlinModel - Euro+Med
57
		String dbms = Source.SQL_SERVER_2008;
58
		String strServer = "BGBM42";
59
		String strDB = "MCL";
60
		int port = 1433;
61
		String userName = "WebUser";
62
		return  makeSource(dbms, strServer, strDB, port, userName, null);
63
	}
64

    
65
	public static Source Campanulaceae(){
66
		//	BerlinModel - Campanulaceae
67
		String dbms = Source.SQL_SERVER_2005;
68
		String strServer = "BGBM42";
69
		String strDB = "Campanulaceae";
70
		int port = 1433;
71
		String userName = "WebUser";
72
		return  makeSource(dbms, strServer, strDB, port, userName, null);
73
	}
74

    
75
	public static Source ILDIS(){
76
		//	BerlinModel - EditWP6
77
		String dbms = Source.SQL_SERVER_2008;
78
		String strServer = "BGBM42";
79
		String strDB = "ILDIS_EM_BM";
80
		int port = 1433;
81
		String userName = "webUser";
82
		return  makeSource(dbms, strServer, strDB, port, userName, null);
83
	}
84

    
85
	public static Source EDIT_CICHORIEAE(){
86
		//	BerlinModel - EditWP6
87
		String dbms = Source.SQL_SERVER_2005;
88
		String strServer = "BGBM42";
89
		String strDB = "EditWP6";
90
		int port = 1433;
91
		String userName = "webUser";
92
		return  makeSource(dbms, strServer, strDB, port, userName, null);
93
	}
94

    
95
	public static Source EDIT_Taraxacum(){
96
		//	BerlinModel - EditWP6
97
		String dbms = Source.SQL_SERVER_2005;
98
		String strServer = "BGBM42";
99
		String strDB = "Edit_Taraxacum";
100
		int port = 1247;
101
		String userName = "webUser";
102
		return  makeSource(dbms, strServer, strDB, port, userName, null);
103
	}
104

    
105
	public static Source EDIT_Diptera(){
106
		//	BerlinModel - EDIT_Diptera
107
		String dbms = Source.SQL_SERVER_2005;
108
		String strServer = "BGBM42";
109
		String strDB = "EDIT_Diptera";
110
		int port = 1247;
111
		String userName = "webUser";
112
		return  makeSource(dbms, strServer, strDB, port, userName, null);
113
	}
114

    
115
	public static Source El_Salvador(){
116
		//	BerlinModel - El_Salvador
117
		String dbms = Source.SQL_SERVER_2008;
118
		String strServer = "BGBM-SQL01";
119
		String strDB = "Salvador";
120
		int port = 1433;
121
		String userName = "WebUser";
122
		return  makeSource(dbms, strServer, strDB, port, userName, null);
123
	}
124

    
125
	public static Source AlgaTerra(){
126
		//	BerlinModel - AlgaTerra
127
		String dbms = Source.SQL_SERVER_2008;
128
		String strServer = "BGBM-SQL01";
129
		String strDB = "Algaterra";
130
		int port = 1433;
131
		String userName = "WebUser";
132
		return  makeSource(dbms, strServer, strDB, port, userName, null);
133
	}
134

    
135
	public static Source PESI_ERMS(){
136
		//	BerlinModel - Pesi-ERMS
137
		String dbms = Source.SQL_SERVER_2005;
138
		String strServer = "SQL2000Intern\\SQL2005";
139
		String strDB = "BM_ERMS";
140
		int port = 1433;
141
		String userName = "WebUser";
142
		return  makeSource(dbms, strServer, strDB, port, userName, null);
143
	}
144

    
145
	public static Source MT_MOOSE(){
146
		String dbms = Source.SQL_SERVER_2005;
147
		String strServer = "BGBM-SQL02";
148
		String strDB = "MTMoose";
149
		int port = 1433;
150
		String userName = "WebUser";
151
		return  makeSource(dbms, strServer, strDB, port, userName, null);
152
	}
153

    
154
	public static Source MT_Standardliste(){
155
		String dbms = Source.SQL_SERVER_2005;
156
		String strServer = "BGBM-SQL02";
157
		String strDB = "MTStandardliste";
158
		int port = 1433;
159
		String userName = "WebUser";
160
		return  makeSource(dbms, strServer, strDB, port, userName, null);
161
	}
162

    
163
	/**
164
	 * Initializes the source.
165
	 * @param dbms
166
	 * @param strServer
167
	 * @param strDB
168
	 * @param port
169
	 * @param userName
170
	 * @param pwd
171
	 * @return the source
172
	 */
173
	private static Source makeSource(String dbms, String strServer, String strDB, int port, String userName, String pwd ){
174
		//establish connection
175
		Source source = null;
176
		source = new Source(dbms, strServer, strDB);
177
		source.setPort(port);
178

    
179
		pwd = AccountStore.readOrStorePassword(dbms, strServer, userName, pwd);
180
		source.setUserAndPwd(userName, pwd);
181
		// write pwd to account store
182
		return source;
183
	}
184

    
185
}
(3-3/12)