Project

General

Profile

Download (1.33 KB) Statistics
| Branch: | Revision:
1
/**
2
* Copyright (C) 2007 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

    
10
package eu.etaxonomy.cdm.app.common;
11

    
12
import java.util.regex.Matcher;
13
import java.util.regex.Pattern;
14

    
15
import eu.etaxonomy.cdm.common.AccountStore;
16
import eu.etaxonomy.cdm.io.common.Source;
17
import eu.etaxonomy.cdm.io.pesi.indexFungorum.IndexFungorumImportState;
18
import eu.etaxonomy.cdm.io.pesi.out.PesiTransformer;
19
import eu.etaxonomy.cdm.model.common.MarkerType;
20

    
21
/**
22
 * @author a.babadshanjan
23
 * @created 12.05.2009
24
 *
25
 */
26
public class ImportUtils {
27
	
28
	/**
29
	 * Initializes the source.
30
	 * @param dbms
31
	 * @param strServer
32
	 * @param strDB
33
	 * @param port
34
	 * @param userName
35
	 * @param pwd
36
	 * @return the source
37
	 */
38
	public static Source makeSource(String dbms, String strServer, String strDB, int port, String userName, String pwd ){
39
		//establish connection
40
		Source source = null;
41
		source = new Source(dbms, strServer, strDB);
42
		source.setPort(port);
43
			
44
		pwd = AccountStore.readOrStorePassword(dbms, strServer, userName, pwd);
45
		source.setUserAndPwd(userName, pwd);
46
		// write pwd to account store
47
		return source;
48
	}
49
	
50
	
51
	
52
	
53

    
54
}
(3-3/5)