2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.app
.common
;
12 import java
.lang
.reflect
.Method
;
14 import org
.apache
.logging
.log4j
.LogManager
;
15 import org
.apache
.logging
.log4j
.Logger
;
17 import eu
.etaxonomy
.cdm
.config
.AccountStore
;
18 import eu
.etaxonomy
.cdm
.database
.CdmDataSource
;
19 import eu
.etaxonomy
.cdm
.database
.DatabaseTypeEnum
;
20 import eu
.etaxonomy
.cdm
.database
.ICdmDataSource
;
22 public class CdmDestinations
{
24 @SuppressWarnings("unused")
25 private static final Logger logger
= LogManager
.getLogger();
27 public static ICdmDataSource
cdm_pesi2019_final(){
28 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
29 String cdmServer
= "127.0.0.1";
30 String cdmDB
= "cdm_pesi_2019final";
31 String cdmUserName
= "edit";
33 return CdmDestinations
.makeDestination(dbType
, cdmServer
, cdmDB
, port
, cdmUserName
, null);
36 public static ICdmDataSource
cdm_local_redlist_animalia(){
37 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
38 String cdmServer
= "localhost";
39 String cdmDB
= "cdm_bfn_imports_animalia";
40 String cdmUserName
= "edit";
41 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
44 public static ICdmDataSource
cdm_redlist_animalia_production(){
45 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
46 String cdmServer
= "160.45.63.171";
47 String cdmDB
= "cdm_production_rl_animalia";
48 String cdmUserName
= "edit";
49 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
52 public static ICdmDataSource
cdm_additivity_ontology(){
53 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
54 String cdmServer
= "160.45.63.171";
55 String cdmDB
= "cdm_production_additivity_ontology";
56 String cdmUserName
= "edit";
57 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
60 public static ICdmDataSource
cdm_redlist_animalia_production_final(){
61 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
62 String cdmServer
= "160.45.63.171";
63 String cdmDB
= "cdm_production_rl_animalia_final";
64 String cdmUserName
= "edit";
65 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
68 public static ICdmDataSource
cdm_local_redlist_plant(){
69 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
70 String cdmServer
= "localhost";
71 String cdmDB
= "cdm_bfn_imports_plants";
72 String cdmUserName
= "edit";
73 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
76 public static ICdmDataSource
cdm_local_testDB(){
77 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
78 String cdmServer
= "localhost";
79 String cdmDB
= "testDB";
80 String cdmUserName
= "root";
81 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
84 public static ICdmDataSource
cdm_local_test_mysql(){
85 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
86 String cdmServer
= "127.0.0.1";
87 String cdmDB
= "test";
88 String cdmUserName
= "root";
89 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
92 public static ICdmDataSource
cdm_local_cdmtest_mysql(){
93 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
94 String cdmServer
= "127.0.0.1";
95 String cdmDB
= "cdm_test";
96 String cdmUserName
= "root";
97 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
100 public static ICdmDataSource
cdm_local_terms(){
101 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
102 String cdmServer
= "127.0.0.1";
103 String cdmDB
= "cdm_local_terms";
104 String cdmUserName
= "edit";
105 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
108 public static ICdmDataSource
cdm_local_greece_bupleurum(){
109 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
110 String cdmServer
= "127.0.0.1";
111 String cdmDB
= "cdm_local_greece_bupleurum";
112 String cdmUserName
= "edit";
113 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
116 public static ICdmDataSource
cdm_local_uzbekistan(){
117 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
118 String cdmServer
= "127.0.0.1";
119 String cdmDB
= "cdm_uzbekistan";
120 String cdmUserName
= "edit";
121 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
124 public static ICdmDataSource
cdm_local_redlist_gefaesspflanzen(){
125 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
126 String cdmServer
= "127.0.0.1";
127 String cdmDB
= "rl2020_gefaesspflanzen";
128 String cdmUserName
= "root";
129 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
133 public static ICdmDataSource
cdm_local_test_mysql_moose(){
134 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
135 String cdmServer
= "127.0.0.1";
136 String cdmDB
= "moose";
137 String cdmUserName
= "edit";
138 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
141 public static ICdmDataSource
cdm_local_test_mysql_standardliste(){
142 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
143 String cdmServer
= "127.0.0.1";
144 String cdmDB
= "standardliste";
145 String cdmUserName
= "root";
146 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
150 public static ICdmDataSource
cdm_local_test_mysql_dwca(){
151 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
152 String cdmServer
= "127.0.0.1";
153 String cdmDB
= "dwca";
154 String cdmUserName
= "edit";
155 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
159 public static ICdmDataSource
cdm_local_mysql_fdac(){
160 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
161 String cdmServer
= "127.0.0.1";
162 String cdmDB
= "fdac";
163 String cdmUserName
= "edit";
164 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
167 public static ICdmDataSource
cdm_test_local_mysql_test(){
168 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
169 String cdmServer
= "127.0.0.1";
170 String cdmDB
= "test";
171 String cdmUserName
= "edit"; //root on pesiimport2
172 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
175 public static ICdmDataSource
cdm_local_greece(){
176 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
177 String cdmServer
= "127.0.0.1";
178 String cdmDB
= "cdm_test_greece";
179 String cdmUserName
= "edit";
180 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
183 public static ICdmDataSource
cdm_local_casearia(){
184 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
185 String cdmServer
= "127.0.0.1";
186 String cdmDB
= "cdm_casearia";
187 String cdmUserName
= "edit"; //root on pesiimport2
188 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
191 public static ICdmDataSource
cdm_local_mysql_pesi_euromed(){
192 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
193 String cdmServer
= "127.0.0.1";
194 String cdmDB
= "cdm_pesi_euromed";
195 String cdmUserName
= "edit";
197 return CdmDestinations
.makeDestination(dbType
, cdmServer
, cdmDB
, port
, cdmUserName
, null);
200 public static ICdmDataSource
cdm_local_euromed(){
201 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
202 String cdmServer
= "127.0.0.1";
203 String cdmDB
= "cdm_euromed";
204 String cdmUserName
= "edit";
206 return CdmDestinations
.makeDestination(dbType
, cdmServer
, cdmDB
, port
, cdmUserName
, null);
209 public static ICdmDataSource
cdm_local_mysql_tmpTest(){
210 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
211 String cdmServer
= "127.0.0.1";
212 String cdmDB
= "tmpTest";
213 String cdmUserName
= "edit";
215 return CdmDestinations
.makeDestination(dbType
, cdmServer
, cdmDB
, port
, cdmUserName
, null);
218 public static ICdmDataSource
cdm_local_euromed2(){
219 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
220 String cdmServer
= "127.0.0.1";
221 String cdmDB
= "euroMed2";
222 String cdmUserName
= "edit";
223 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
225 public static ICdmDataSource
cdm_local_euromed_caucasus(){
226 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
227 String cdmServer
= "127.0.0.1";
228 String cdmDB
= "euromed_caucasus";
229 String cdmUserName
= "edit";
230 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
235 public static ICdmDataSource
cdm_local_test_euromed3(){
236 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
237 String cdmServer
= "127.0.0.1";
238 String cdmDB
= "euroMed3";
239 String cdmUserName
= "root";
240 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
243 public static ICdmDataSource
cdm_test_col(){
244 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
245 String cdmServer
= "160.45.63.175";
246 String cdmDB
= "cdm_col";
247 String cdmUserName
= "edit";
248 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
251 public static ICdmDataSource
cdm_test_col2(){
252 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
253 String cdmServer
= "160.45.63.175";
254 String cdmDB
= "cdm_col2";
255 String cdmUserName
= "edit";
256 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
259 public static ICdmDataSource
cdm_local_col(){
260 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
261 String cdmServer
= "127.0.0.1";
262 String cdmDB
= "col_test";
263 String cdmUserName
= "edit";
264 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
267 public static ICdmDataSource
cdm_local_col2(){
268 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
269 String cdmServer
= "127.0.0.1";
270 String cdmDB
= "col_test2";
271 String cdmUserName
= "edit";
272 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
276 public static ICdmDataSource
cdm_local_EDITImport(){
277 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
278 String cdmServer
= "127.0.0.1";
279 String cdmDB
= "EDITImport";
280 String cdmUserName
= "edit"; //root on pesiimport2
281 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
284 public static ICdmDataSource
cdm_test_euroMed(){
285 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
286 String cdmServer
= "160.45.63.175";
287 String cdmDB
= "cdm_test_euromed";
288 String cdmUserName
= "edit";
289 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
292 public static ICdmDataSource
cdm_production_euromed(){
293 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
294 String cdmServer
= "160.45.63.171";
295 String cdmDB
= "cdm_production_euromed";
296 String cdmUserName
= "edit";
297 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
300 public static ICdmDataSource
cdm_production_euromed_caucasus(){
301 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
302 String cdmServer
= "160.45.63.171";
303 String cdmDB
= "cdm_production_euromed_caucasus";
304 String cdmUserName
= "edit";
305 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
308 public static ICdmDataSource
cdm_test_corvidae(){
309 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
310 String cdmServer
= "160.45.63.175";
311 String cdmDB
= "cdm_corvidae";
312 String cdmUserName
= "edit";
313 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
316 public static ICdmDataSource
cdm_test_redlist_mammalia(){
317 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
318 String cdmServer
= "160.45.63.175";
319 String cdmDB
= "cdm_rl_mammalia";
320 String cdmUserName
= "edit";
321 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
324 public static ICdmDataSource
cdm_test_redlist_moose(){
325 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
326 String cdmServer
= "160.45.63.175";
327 String cdmDB
= "cdm_mt_moose";
328 String cdmUserName
= "edit";
329 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
332 public static ICdmDataSource
cdm_redlist_moose_production(){
333 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
334 String cdmServer
= "160.45.63.171";
335 String cdmDB
= "cdm_production_rl_moose";
336 String cdmUserName
= "edit";
337 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
340 public static ICdmDataSource
cdm_test_redlist_standardlist(){
341 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
342 String cdmServer
= "160.45.63.175";
343 String cdmDB
= "cdm_mt_standardliste";
344 String cdmUserName
= "edit";
345 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
348 public static ICdmDataSource
cdm_test_redlist_germanSL(){
349 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
350 String cdmServer
= "160.45.63.175";
351 String cdmDB
= "cdm_rl_german_sl";
352 String cdmUserName
= "edit";
353 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
356 public static ICdmDataSource
cdm_production_germanSL(){
357 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
358 String cdmServer
= "160.45.63.171";
359 String cdmDB
= "cdm_production_rl_german_sl";
360 String cdmUserName
= "edit";
361 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
364 public static ICdmDataSource
local_cyprus(){
365 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
366 String cdmServer
= "localhost";
367 String cdmDB
= "cdm_cyprus";
368 String cdmUserName
= "edit";
369 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
372 public static ICdmDataSource
cdm_test_cyprus(){
373 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
374 String cdmServer
= "160.45.63.175";
375 String cdmDB
= "cdm_cyprus";
376 String cdmUserName
= "edit";
377 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
380 public static ICdmDataSource
cdm_test_bupleurum(){
381 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
382 String cdmServer
= "160.45.63.175";
383 String cdmDB
= "cdm_test_bupleurum";
384 String cdmUserName
= "edit";
385 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
388 public static ICdmDataSource
cdm_production_cyprus(){
389 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
390 String cdmServer
= "160.45.63.171";
391 String cdmDB
= "cdm_production_cyprus";
392 String cdmUserName
= "edit";
393 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
396 public static ICdmDataSource
cdm_production_casearia(){
397 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
398 String cdmServer
= "160.45.63.171";
399 String cdmDB
= "cdm_production_casearia";
400 String cdmUserName
= "edit";
401 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
404 public static ICdmDataSource
cdm_production_uzbekistan(){
405 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
406 String cdmServer
= "160.45.63.171";
407 String cdmDB
= "cdm_production_flora_uzbekistan";
408 String cdmUserName
= "edit";
409 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
412 public static ICdmDataSource
cdm_phycobank_production(){
413 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
414 String cdmServer
= "160.45.63.171";
415 String cdmDB
= "cdm_production_phycobank";
416 String cdmUserName
= "edit";
417 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
420 public static ICdmDataSource
cdm_production_flora_cuba(){
421 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
422 String cdmServer
= "160.45.63.171";
423 String cdmDB
= "cdm_production_flora_cuba";
424 String cdmUserName
= "edit";
425 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
428 public static ICdmDataSource
cdm_production_greece_checklist(){
429 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
430 String cdmServer
= "160.45.63.171";
431 String cdmDB
= "cdm_production_flora_greece";
432 String cdmUserName
= "edit";
433 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
436 public static ICdmDataSource
cdm_production_greece_bupleurum(){
437 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
438 String cdmServer
= "160.45.63.171";
439 String cdmDB
= "cdm_production_greece_bupleurum";
440 String cdmUserName
= "edit";
441 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
444 public static ICdmDataSource
cdm_production_lichenes(){
445 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
446 String cdmServer
= "160.45.63.171";
447 String cdmDB
= "cdm_production_lichenes";
448 String cdmUserName
= "edit";
449 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
452 public static ICdmDataSource
cdm_production_mexico_rubiaceae(){
453 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
454 String cdmServer
= "160.45.63.171";
455 String cdmDB
= "cdm_production_rubiaceae_mexico";
456 String cdmUserName
= "edit";
457 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
460 public static ICdmDataSource
cdm_production_bogota(){
461 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
462 String cdmServer
= "160.45.63.171";
463 String cdmDB
= "cdm_production_flora_bogota";
464 String cdmUserName
= "edit";
465 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
468 public static ICdmDataSource
cdm_production_tunnel_cyprus(){
469 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
470 String cdmServer
= "127.0.0.1";
472 String cdmDB
= "cdm_production_cyprus";
473 String cdmUserName
= "edit";
474 return makeDestination(dbType
, cdmServer
, cdmDB
, port
, cdmUserName
, null);
477 public static ICdmDataSource
cdm_production_campanulaceae(){
478 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
479 String cdmServer
= "160.45.63.171";
480 String cdmDB
= "cdm_production_campanulaceae";
481 String cdmUserName
= "edit";
482 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
485 public static ICdmDataSource
cdm_local_portal_test(){
486 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
487 String cdmServer
= "127.0.0.1";
488 String cdmDB
= "cdm_portal_test";
489 String cdmUserName
= "edit";
490 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
493 public static ICdmDataSource
cdm_local_portal_test2(){
494 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
495 String cdmServer
= "127.0.0.1";
496 String cdmDB
= "cdm_portal_test2";
497 String cdmUserName
= "edit";
498 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
501 public static ICdmDataSource
cdm_local_cichorieae(){
502 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
503 String cdmServer
= "127.0.0.1";
504 String cdmDB
= "cdm_edit_cichorieae";
505 String cdmUserName
= "edit";
506 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
509 public static ICdmDataSource
cdm_local_cyprus(){
510 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
511 String cdmServer
= "127.0.0.1";
512 String cdmDB
= "cdm_cyprus";
513 String cdmUserName
= "edit";
514 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
517 public static ICdmDataSource
cdm_local_mexico(){
518 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
519 String cdmServer
= "127.0.0.1";
520 String cdmDB
= "cdm_mexico";
521 String cdmUserName
= "edit";
522 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
524 public static ICdmDataSource
cdm_local_mexico2(){
525 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
526 String cdmServer
= "127.0.0.1";
527 String cdmDB
= "cdm_mexico2";
528 String cdmUserName
= "edit";
529 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
532 public static ICdmDataSource
cdm_local_palmae(){
533 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
534 String cdmServer
= "127.0.0.1";
535 String cdmDB
= "cdm_edit_caryo";
536 String cdmUserName
= "edit";
537 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
540 public static ICdmDataSource
cdm_local_cuba(){
541 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
542 String cdmServer
= "127.0.0.1";
543 String cdmDB
= "cdm_flora_cuba";
544 String cdmUserName
= "edit";
545 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
548 public static ICdmDataSource
cdm_local_caryo(){
549 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
550 String cdmServer
= "127.0.0.1";
551 String cdmDB
= "cdm_caryo_spp";
552 String cdmUserName
= "edit";
553 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
556 public static ICdmDataSource
cdm_local_algaterranew(){
557 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
558 String cdmServer
= "127.0.0.1";
559 String cdmDB
= "cdm_production_algaterranew";
560 String cdmUserName
= "root";
561 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
564 public static ICdmDataSource
cdm_test_globis(){
565 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
566 String cdmServer
= "160.45.63.175";
567 String cdmDB
= "cdm_edit_globis";
568 String cdmUserName
= "edit";
569 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
572 public static ICdmDataSource
cdm_local_edaphobase(){
573 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
574 String cdmServer
= "127.0.0.1";
575 String cdmDB
= "edaphobase";
576 String cdmUserName
= "edit";
577 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
580 public static ICdmDataSource
cdm_postgres_edaphobase(){
581 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.PostgreSQL
;
582 String cdmServer
= "130.133.70.26";
583 String cdmDB
= "cdm_edaphobase";
584 String cdmUserName
= "edaphobase";
586 return makeDestination(dbType
, cdmServer
, cdmDB
, port
, cdmUserName
, null);
589 public static ICdmDataSource
cdm_test_postgres_edaphobase(){
590 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.PostgreSQL
;
591 String cdmServer
= "160.45.63.175";
592 String cdmDB
= "cdm_edaphobase";
593 String cdmUserName
= "edaphobase";
595 return makeDestination(dbType
, cdmServer
, cdmDB
, port
, cdmUserName
, null);
598 public static ICdmDataSource
cdm_test_postgres__ssh_edaphobase(){
599 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.PostgreSQL
;
600 String cdmServer
= "localhost";
601 String cdmDB
= "cdm_edaphobase";
602 String cdmUserName
= "edaphobase";
604 return makeDestination(dbType
, cdmServer
, cdmDB
, port
, cdmUserName
, null);
607 public static ICdmDataSource
cdm_local_caryo_spp(){
608 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
609 String cdmServer
= "127.0.0.1";
610 String cdmDB
= "cdm_local_caryophyllales_spp";
611 String cdmUserName
= "edit";
612 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
615 public static ICdmDataSource
cdm_local_caryo_spp2(){
616 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
617 String cdmServer
= "127.0.0.1";
618 String cdmDB
= "cdm_caryo_spp2";
619 String cdmUserName
= "edit";
620 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
623 public static ICdmDataSource
cdm_production_globis(){
624 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
625 String cdmServer
= "160.45.63.171";
626 String cdmDB
= "cdm_production_globis";
627 String cdmUserName
= "edit";
628 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
631 public static ICdmDataSource
cdm_local_globis(){
632 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
633 String cdmServer
= "127.0.0.1";
634 String cdmDB
= "cdm_globis";
635 String cdmUserName
= "edit";
636 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
639 public static ICdmDataSource
cdm_local_postgres_CdmTest(){
640 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.PostgreSQL
;
641 String cdmServer
= "127.0.0.1";
642 String cdmDB
= "CdmTest";
643 String cdmUserName
= "edit";
644 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
646 public static ICdmDataSource
cdm_mexico_flora(){
647 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
648 String cdmServer
= "132.248.13.83";
649 String cdmDB
= "cdm_flora_mexico";
650 String cdmUserName
= "bgbm-developer";
651 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
655 public static ICdmDataSource
localH2(){
656 return CdmDataSource
.NewH2EmbeddedInstance("cdm", "sa", "");
659 public static ICdmDataSource
localH2Edapho(){
660 return CdmDataSource
.NewH2EmbeddedInstance("cdmEdapho", "sa", "");
663 public static ICdmDataSource
localH2Salvador(){
664 return CdmDataSource
.NewH2EmbeddedInstance("salvador", "sa", "");
667 public static ICdmDataSource
localH2Armeria(){
668 return CdmDataSource
.NewH2EmbeddedInstance("armeria", "sa", "");
671 public static ICdmDataSource
localH2Standardliste(){
672 return CdmDataSource
.NewH2EmbeddedInstance("standardliste", "sa", "");
675 public static ICdmDataSource
localH2Cichorieae(){
676 return CdmDataSource
.NewH2EmbeddedInstance("cichorieae", "sa", "");
679 public static ICdmDataSource
localH2Palmae(){
680 return CdmDataSource
.NewH2EmbeddedInstance("palmae", "sa", "");
683 public static ICdmDataSource
localH2EuroMed(){
684 return CdmDataSource
.NewH2EmbeddedInstance("euroMed", "sa", "");
687 public static ICdmDataSource
localH2Erms(){
688 return CdmDataSource
.NewH2EmbeddedInstance("erms", "sa", "");
692 public static ICdmDataSource
cdm_test_test1(){
693 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
694 String cdmServer
= "160.45.63.175";
695 String cdmDB
= "cdm_test1";
696 String cdmUserName
= "edit";
697 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
699 public static ICdmDataSource
cdm_test_test2(){
700 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
701 String cdmServer
= "160.45.63.175";
702 String cdmDB
= "cdm_test2";
703 String cdmUserName
= "edit";
704 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
706 public static ICdmDataSource
cdm_test_test3(){
707 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
708 String cdmServer
= "160.45.63.175";
709 String cdmDB
= "cdm_test3";
710 String cdmUserName
= "edit";
711 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
714 public static ICdmDataSource
cdm_test_phycobank(){
715 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
716 String cdmServer
= "160.45.63.175";
717 String cdmDB
= "cdm_phycobank";
718 String cdmUserName
= "edit";
719 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
722 public static ICdmDataSource
cdm_test_algaterra(){
723 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
724 String cdmServer
= "160.45.63.175";
725 String cdmDB
= "cdm_edit_algaterra";
726 String cdmUserName
= "edit";
727 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
730 public static ICdmDataSource
cdm_algaterra_production(){
731 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
732 String cdmServer
= "160.45.63.171";
733 String cdmDB
= "cdm_production_algaterra";
734 String cdmUserName
= "edit";
735 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
738 public static ICdmDataSource
cdm_test_salvador(){
739 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
740 String cdmServer
= "160.45.63.175";
741 String cdmDB
= "cdm_salvador";
742 String cdmUserName
= "edit";
743 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
746 public static ICdmDataSource
cdm_production_salvador(){
747 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
748 String cdmServer
= "160.45.63.171";
749 String cdmDB
= "cdm_production_salvador";
750 String cdmUserName
= "edit";
751 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
754 public static ICdmDataSource
cdm_test_cichorieae(){
755 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
756 String cdmServer
= "160.45.63.175";
757 String cdmDB
= "cdm_edit_cichorieae";
758 String cdmUserName
= "edit";
759 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
762 public static ICdmDataSource
cdm_int_flora_malesiana(){
763 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
764 String cdmServer
= "160.45.63.201";
765 String cdmDB
= "cdm_integration_flora_malesiana";
766 String cdmUserName
= "edit";
767 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
770 public static ICdmDataSource
cdm_test_caryo_spp(){
771 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
772 String cdmServer
= "160.45.63.175";
773 String cdmDB
= "cdm_caryo_spp";
774 String cdmUserName
= "edit";
775 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
778 public static ICdmDataSource
cdm_production_cichorieae(){
779 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
780 String cdmServer
= "160.45.63.171";
781 String cdmDB
= "cdm_production_cichorieae";
782 String cdmUserName
= "edit";
783 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
786 public static ICdmDataSource
cdm_production_cuba(){
787 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
788 String cdmServer
= "160.45.63.171";
789 String cdmDB
= "cdm_production_flora_cuba";
790 String cdmUserName
= "edit";
791 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
794 public static ICdmDataSource
cdm_production_buxales(){
795 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
796 String cdmServer
= "160.45.63.171";
797 String cdmDB
= "cdm_production_buxales";
798 String cdmUserName
= "edit";
799 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
802 public static ICdmDataSource
cdm_production_palmae(){
803 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
804 String cdmServer
= "160.45.63.171";
805 String cdmDB
= "cdm_production_palmae";
806 String cdmUserName
= "edit";
807 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
810 public static ICdmDataSource
cdm_production_flora_deutschland(){
811 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
812 String cdmServer
= "160.45.63.171";
813 String cdmDB
= "cdm_production_rl_standardliste";
814 String cdmUserName
= "edit";
815 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
818 public static ICdmDataSource
cdm_production_caryophyllales_genus(){
819 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
820 String cdmServer
= "160.45.63.171";
821 String cdmDB
= "cdm_production_caryophyllales";
822 String cdmUserName
= "edit";
823 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
826 public static ICdmDataSource
cdm_production_caryophyllales_spp(){
827 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
828 String cdmServer
= "160.45.63.171";
829 String cdmDB
= "cdm_production_caryophyllales_spp";
830 String cdmUserName
= "edit";
831 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
834 public static ICdmDataSource
cdm_production_caryophyllales_nepenthaceae(){
835 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
836 String cdmServer
= "160.45.63.171";
837 String cdmDB
= "cdm_production_caryo_nepenthaceae";
838 String cdmUserName
= "edit";
839 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
842 public static ICdmDataSource
cdm_local_caryophyllales_nepenthaceae(){
843 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
844 String cdmServer
= "127.0.0.1";
845 String cdmDB
= "cdm_local_caryo_nepenthaceae";
846 String cdmUserName
= "root";
847 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
850 public static ICdmDataSource
cdm_production_redlist_gefaesspflanzen(){
851 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
852 String cdmServer
= "160.45.63.171";
853 String cdmDB
= "cdm_production_rl_plantae";
854 String cdmUserName
= "edit";
855 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
858 public static ICdmDataSource
cdm_production_edaphobase(){
859 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
860 String cdmServer
= "160.45.63.171";
861 String cdmDB
= "cdm_production_edaphobase";
862 String cdmUserName
= "edit";
863 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
866 public static ICdmDataSource
cdm_production_piB(String database
){
867 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
868 String cdmServer
= "160.45.63.171";
869 String cdmDB
= "cdm_production_" + database
+ "_pilot";
870 String cdmUserName
= "edit";
871 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
874 public static ICdmDataSource
cdm_local_piB(String database
){
875 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
876 String cdmServer
= "127.0.0.1";
877 String cdmDB
= "piB_" + database
;
878 String cdmUserName
= "root";
879 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
882 public static ICdmDataSource
cdm_local_proibiosphere_chenopodium() {
883 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
884 String cdmServer
= "localhost";
885 String cdmDB
= "cdm_production_proibiosphere_chenopodium_pilot";
886 String cdmUserName
= "root";
887 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
890 public static ICdmDataSource
cdm_local_proibiosphere_spiders() {
891 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
892 String cdmServer
= "localhost";
893 String cdmDB
= "cdm_production_proibiosphere_spiders_pilot";
894 String cdmUserName
= "root";
895 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
898 public static ICdmDataSource
cdm_test_pesi_fauna_europaea(){
899 DatabaseTypeEnum dbType
= DatabaseTypeEnum
.MySQL
;
900 String cdmServer
= "160.45.63.175";
901 String cdmDB
= "cdm_pesi_fauna_europaea";
902 String cdmUserName
= "edit";
903 return makeDestination(dbType
, cdmServer
, cdmDB
, -1, cdmUserName
, null);
910 * TODO only supports MySQL and PostgreSQL
920 public static ICdmDataSource
makeDestination(DatabaseTypeEnum dbType
, String cdmServer
, String cdmDB
, int port
, String cdmUserName
, String pwd
){
921 //establish connection
922 pwd
= AccountStore
.readOrStorePassword(cdmServer
, cdmDB
, cdmUserName
, pwd
);
923 ICdmDataSource destination
;
924 if(dbType
.equals(DatabaseTypeEnum
.MySQL
)){
925 destination
= CdmDataSource
.NewMySqlInstance(cdmServer
, cdmDB
, port
, cdmUserName
, pwd
);
926 } else if(dbType
.equals(DatabaseTypeEnum
.PostgreSQL
)){
927 destination
= CdmDataSource
.NewPostgreSQLInstance(cdmServer
, cdmDB
, port
, cdmUserName
, pwd
);
930 throw new RuntimeException("Unsupported DatabaseType");
938 * Accepts a string array and tries to find a method returning an ICdmDataSource with
939 * the name of the given first string in the array
944 public static ICdmDataSource
chooseDestination(String
[] args
) {
949 if(args
.length
!= 1) {
953 String possibleDestination
= args
[0];
955 Method
[] methods
= CdmDestinations
.class.getMethods();
957 for (Method method
: methods
){
958 if(method
.getName().equals(possibleDestination
)){
960 return (ICdmDataSource
) method
.invoke(null, null);
961 } catch (Exception e
) {
963 throw new RuntimeException(e
);