Project

General

Profile

Download (4.39 KB) Statistics
| Branch: | Revision:
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.URI;
12
import java.net.URL;
13

    
14
import org.apache.log4j.Logger;
15

    
16
import eu.etaxonomy.cdm.app.berlinModelImport.SourceBase;
17
import eu.etaxonomy.cdm.app.tcs.TcsSources;
18
import eu.etaxonomy.cdm.io.common.Source;
19

    
20
/**
21
 * @author a.mueller
22
 * @since 21.04.2010
23
 *
24
 */
25
public class CdmImportSources extends SourceBase{
26
	@SuppressWarnings("unused")
27
	private static final Logger logger = Logger.getLogger(CdmImportSources.class);
28

    
29
	public static Source ROTE_LISTE_GEFAESSPFLANZEN_DB(){
30
		String dbms = Source.MYSQL;
31
		String strServer = "localhost";
32
		String strDB = "RL_Gefaesspflanzen_source";
33
		int port = 3306;
34
		String userName = "root";
35
		return  makeSource(dbms, strServer, strDB, port, userName, null);
36
	}
37

    
38
	public static Source ROTE_LISTE_DB(){
39
		String dbms = Source.ORACLE;
40
		String strServer = "xxx";
41
		String strDB = "dbName";
42
		int port = 1433;
43
		String userName = "adam";
44
		return  makeSource(dbms, strServer, strDB, port, userName, null);
45
	}
46

    
47

    
48
	public static Source GLOBIS(){
49
		String dbms = Source.SQL_SERVER_2005;
50
		String strServer = "LENOVO-T61";
51
		String strDB = "globis";
52
		int port = 0001;
53
		String userName = "user";
54
		return  makeSource(dbms, strServer, strDB, port, userName, null);
55
	}
56

    
57
	public static Source GLOBIS_ODBC(){
58
		String dbms = Source.ODDBC;
59
		String strServer = "LENOVO-T61";
60
		String strDB = "globis";
61
		int port = 1433;
62
		String userName = "sa";
63
		return  makeSource(dbms, strServer, strDB, port, userName, null);
64
	}
65

    
66
	public static Source GLOBIS_MDB(){
67
		String dbms = Source.ACCESS;
68
		String strServer = null;
69
		String strDB = "C:\\localCopy\\Data\\globis\\globis.mdb";
70
		int port = -1;
71
		String userName = "";
72
		return  makeSource(dbms, strServer, strDB, port, userName, null);
73
	}
74

    
75
	public static Source GLOBIS_MDB_20120928(){
76
		String dbms = Source.ACCESS;
77
		String strServer = null;
78
		String strDB = "C:\\localCopy\\Data\\globis\\globis.20120928.mdb";
79
		int port = -1;
80
		String userName = "";
81
		return  makeSource(dbms, strServer, strDB, port, userName, null);
82
	}
83

    
84
	public static Source GLOBIS_MDB_20140113(){
85
		String dbms = Source.ACCESS;
86
		String strServer = null;
87
		String strDB = "C:\\localCopy\\Data\\globis\\globis_20140113.mdb";
88
		int port = -1;
89
		String userName = "";
90
		return  makeSource(dbms, strServer, strDB, port, userName, null);
91
	}
92

    
93
	//Problem MS Access ODBC Driver does not work on PESIIMPORT 3
94
	@Deprecated
95
	public static Source GLOBIS_MDB_20140113_PESIIMPORT(){
96
		String dbms = Source.ACCESS;
97
		String strServer = null;
98
		String strDB = "\\\\PESIIMPORT3\\globis\\globis_20140113.mdb";
99
		int port = -1;
100
		String userName = "";
101
		return  makeSource(dbms, strServer, strDB, port, userName, null);
102
	}
103

    
104
	public static Source GLOBIS_MDB_20140113_PESIIMPORT_SQLSERVER(){
105
		String dbms = Source.SQL_SERVER_2008;
106
		String strServer = "PESIIMPORT3";
107
		String strDB = "globis_orig_20140113";
108
		int port = 1433;
109
		String userName = "globisImport";
110
		return  makeSource(dbms, strServer, strDB, port, userName, null);
111
	}
112

    
113
	public static URI SYNTHESYS_SPECIMEN(){
114
		//		tcsXmlTest.xml
115
		URL url = new TcsSources().getClass().getResource("/specimen/SynthesysSpecimenExample.xls");
116
		String sourceUrl = url.toString();
117
		URI uri = URI.create(sourceUrl);
118
		return uri;
119
	}
120

    
121
    public static Source EDAPHOBASE(){
122
        String dbms = Source.POSTGRESQL9;
123
        String strServer = "130.133.70.26";  //BGBM-PESISQL
124
        String strDB = "edaphobase";
125
        int port = 5432;
126
        String userName = "postgres";
127
        return  makeSource(dbms, strServer, strDB, port, userName, null);
128
    }
129

    
130
    public static Source EDAPHOBASE2(){
131
        String dbms = Source.POSTGRESQL9;
132
        String strServer = "130.133.70.26";  //BGBM-PESISQL
133
        String strDB = "edaphobase2";
134
        int port = 5432;
135
        String userName = "postgres";
136
        return  makeSource(dbms, strServer, strDB, port, userName, null);
137
    }
138

    
139
    public static Source EDAPHOBASE6(){
140
        String dbms = Source.POSTGRESQL9;
141
        String strServer = "130.133.70.26";  //BGBM-PESISQL
142
        String strDB = "edaphobase6";
143
        int port = 5432;
144
        String userName = "postgres";
145
        return  makeSource(dbms, strServer, strDB, port, userName, null);
146
    }
147

    
148
}
(3-3/5)