1017ae12b8b9c9475f72f1943f49987da2336c20
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
.common
;
13 import org
.apache
.log4j
.Logger
;
15 import eu
.etaxonomy
.cdm
.common
.AccountStore
;
16 import eu
.etaxonomy
.cdm
.io
.common
.Source
;
19 public class BerlinModelSources
{
20 @SuppressWarnings("unused")
21 private static final Logger logger
= Logger
.getLogger(BerlinModelSources
.class);
23 public static Source
EDIT_Diptera(){
24 // BerlinModel - EDIT_Diptera
25 String dbms
= Source
.SQL_SERVER_2008
;
26 String strServer
= "BGBM42";
27 String strDB
= "EDIT_Diptera";
29 String userName
= "webUser";
30 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
33 public static Source
euroMed_local(){
34 // BerlinModel - Euro+Med
35 String dbms
= Source
.SQL_SERVER_2005
;
36 String strServer
= "LENOVO-T61";
37 String strDB
= "euroMed";
39 String userName
= "webUser";
40 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
43 public static Source
euroMed(){
44 // BerlinModel - Euro+Med
45 String dbms
= Source
.SQL_SERVER_2005
;
46 String strServer
= "BGBM42";
47 String strDB
= "EuroPlusMed_00_Edit";
49 String userName
= "webUser";
50 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
53 public static Source
PESI_ERMS(){
54 // BerlinModel - Pesi-ERMS
55 String dbms
= Source
.SQL_SERVER_2005
;
56 String strServer
= "SQL2000Intern\\SQL2005";
57 String strDB
= "BM_ERMS";
59 String userName
= "WebUser";
60 return makeSource(dbms
, strServer
, strDB
, port
, userName
, null);
64 * Initializes the source.
73 private static Source
makeSource(String dbms
, String strServer
, String strDB
, int port
, String userName
, String pwd
){
74 //establish connection
76 source
= new Source(dbms
, strServer
, strDB
);
79 pwd
= AccountStore
.readOrStorePassword(dbms
, strServer
, userName
, pwd
);
80 source
.setUserAndPwd(userName
, pwd
);
81 // write pwd to account store