110690f5373147e89cecc516d108dde55fe82fd1
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.cdm
.app
.berlinModelImport
;
13 import org
.apache
.logging
.log4j
.LogManager
;
14 import org
.apache
.logging
.log4j
.Logger
;
16 import eu
.etaxonomy
.cdm
.config
.AccountStore
;
17 import eu
.etaxonomy
.cdm
.io
.common
.Source
;
20 public class BerlinModelSources
{
21 @SuppressWarnings("unused")
22 private static final Logger logger
= LogManager
.getLogger();
24 public static Source
euroMed_PESI3(){
25 // BerlinModel - Euro+Med
26 String dbms
= Source
.SQL_SERVER_2008
;
27 String strServer
= "PESIIMPORT3";
28 String strDB
= "EM_2014_06";
30 String userName
= "pesiexport";
31 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
34 public static Source
iopi(){
35 // BerlinModel - Euro+Med
36 String dbms
= Source
.SQL_SERVER_2008
;
37 String strServer
= "BGBM17";
38 String strDB
= "IOPIBM";
40 String userName
= "WebUser";
41 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
44 public static Source
euroMed_Pub2(){
45 // BerlinModel - Euro+Med
46 String dbms
= Source
.SQL_SERVER_2008
;
47 String strServer
= "bgbm-sql03";
48 String strDB
= "EuroPlusMed_Pub2";
49 int port
= 1433; //was 1247
50 String userName
= "WebUser"; //was webUser or pesiexport
51 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
54 public static Source
euroMed_BGBM42(){
55 // BerlinModel - Euro+Med
56 String dbms
= Source
.SQL_SERVER_2008
;
57 String strServer
= "BGBM42";
58 String strDB
= "EuroPlusMed_00_Edit";
59 int port
= 1433; //was 1247
60 String userName
= "Webuser"; //was webUser or pesiexport
61 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
64 public static Source
mcl(){
65 // BerlinModel - Euro+Med
66 String dbms
= Source
.SQL_SERVER_2008
;
67 String strServer
= "BGBM42";
70 String userName
= "WebUser";
71 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
74 public static Source
Campanulaceae(){
75 // BerlinModel - Campanulaceae
76 String dbms
= Source
.SQL_SERVER_2005
;
77 String strServer
= "BGBM42";
78 String strDB
= "Campanulaceae";
80 String userName
= "WebUser";
81 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
84 public static Source
ILDIS(){
85 // BerlinModel - EditWP6
86 String dbms
= Source
.SQL_SERVER_2008
;
87 String strServer
= "BGBM42";
88 String strDB
= "ILDIS_EM_BM";
90 String userName
= "webUser";
91 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
94 public static Source
EDIT_CICHORIEAE(){
95 // BerlinModel - EditWP6
96 String dbms
= Source
.SQL_SERVER_2005
;
97 String strServer
= "BGBM42";
98 String strDB
= "EditWP6";
100 String userName
= "webUser";
101 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
104 public static Source
EDIT_Taraxacum(){
105 // BerlinModel - EditWP6
106 String dbms
= Source
.SQL_SERVER_2005
;
107 String strServer
= "BGBM42";
108 String strDB
= "Edit_Taraxacum";
110 String userName
= "webUser";
111 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
114 public static Source
EDIT_Diptera(){
115 // BerlinModel - EDIT_Diptera
116 String dbms
= Source
.SQL_SERVER_2005
;
117 String strServer
= "BGBM42";
118 String strDB
= "EDIT_Diptera";
120 String userName
= "webUser";
121 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
124 public static Source
El_Salvador(){
125 // BerlinModel - El_Salvador
126 String dbms
= Source
.SQL_SERVER_2008
;
127 String strServer
= "BGBM-SQL01";
128 String strDB
= "Salvador";
130 String userName
= "WebUser";
131 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
134 public static Source
AlgaTerra(){
135 // BerlinModel - AlgaTerra
136 String dbms
= Source
.SQL_SERVER_2008
;
137 String strServer
= "BGBM-SQL01";
138 String strDB
= "Algaterra";
140 String userName
= "WebUser";
141 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
144 public static Source
PESI_ERMS(){
145 // BerlinModel - Pesi-ERMS
146 String dbms
= Source
.SQL_SERVER_2005
;
147 String strServer
= "SQL2000Intern\\SQL2005";
148 String strDB
= "BM_ERMS";
150 String userName
= "WebUser";
151 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
154 public static Source
MT_MOOSE(){
155 String dbms
= Source
.SQL_SERVER_2005
;
156 String strServer
= "BGBM-SQL02";
157 String strDB
= "MTMoose";
159 String userName
= "WebUser";
160 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
163 public static Source
MT_Standardliste(){
164 String dbms
= Source
.SQL_SERVER_2005
;
165 String strServer
= "BGBM-SQL02";
166 String strDB
= "MTStandardliste";
168 String userName
= "WebUser";
169 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
173 * Initializes the source.
182 private static Source
makeSource(String dbms
, String strServer
, String strDB
, int port
, String userName
, String pwd
){
183 //establish connection
184 Source source
= null;
185 source
= new Source(dbms
, strServer
, strDB
);
186 source
.setPort(port
);
188 pwd
= AccountStore
.readOrStorePassword(dbms
, strServer
, userName
, pwd
);
189 source
.setUserAndPwd(userName
, pwd
);
190 // write pwd to account store