Project

General

Profile

Revision 43142f39

ID43142f39e09088d4504cf5e1b8f7d8a585702fd1
Parent c4446505
Child bff8d9fe

Added by Andreas Müller almost 3 years ago

ref #1444 add new erms source

View differences:

cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/common/CdmDestinations.java
52 52
	public static ICdmDataSource cdm_test_local_mysql_erms(){
53 53
		DatabaseTypeEnum dbType = DatabaseTypeEnum.MySQL;
54 54
		String cdmServer = "127.0.0.1";
55
		String cdmDB = "erms";
56
		String cdmUserName = "root";
57
		return CdmDestinations.makeDestination(dbType, cdmServer, cdmDB, -1, cdmUserName, null);
58
	}
59

  
60

  
61
	public static ICdmDataSource cdm_test_local_mysql_erms2(){
62
		DatabaseTypeEnum dbType = DatabaseTypeEnum.MySQL;
63
		String cdmServer = "127.0.0.1";
64
		String cdmDB = "erms2";
65
		String cdmUserName = "root";
55
		String cdmDB = "pesi_erms";
56
		String cdmUserName = "edit";
66 57
		return CdmDestinations.makeDestination(dbType, cdmServer, cdmDB, -1, cdmUserName, null);
67 58
	}
68 59

  
cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/ErmsActivator.java
41 41

  
42 42
	//database validation status (create, update, validate ...)
43 43
	static DbSchemaValidation hbm2dll = DbSchemaValidation.CREATE;
44
	static final Source ermsSource = PesiSources.PESI3_ERMS();
44
//	static final Source ermsSource = PesiSources.PESI3_ERMS();
45
	static final Source ermsSource = PesiSources.PESI2019_ERMS();
45 46
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_pesi_erms();
46 47
	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_erms();
47 48
	static final UUID treeUuid = UUID.fromString("6fa988a9-10b7-48b0-a370-2586fbc066eb");
cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/PesiSources.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
......
22 22
public class PesiSources {
23 23
	@SuppressWarnings("unused")
24 24
	private static final Logger logger = Logger.getLogger(PesiSources.class);
25
	
25

  
26 26
	public static Source faunEu_pesi3(){
27 27
		//	Fauna Europaea auf pesiimport3
28 28
		String dbms = Source.SQL_SERVER_2008;
......
32 32
		String userName = "pesiExportFaunaEu";
33 33
		return  ImportUtils.makeSource(dbms, strServer, strDB, port, userName, null);
34 34
	}
35
	
35

  
36 36
	public static Source mfn_faunEu_pesi3(){
37 37
		//	Fauna Europaea auf pesiimport3
38 38
		String dbms = Source.SQL_SERVER_2008;
......
42 42
		String userName = "pesiExportFaunaEu";
43 43
		return  ImportUtils.makeSource(dbms, strServer, strDB, port, userName, null);
44 44
	}
45
	
45

  
46 46
	public static Source faunEu(){
47 47
		//	Fauna Europaea
48 48
		String dbms = Source.SQL_SERVER_2008;
......
52 52
		String userName = "WebUser";
53 53
		return  ImportUtils.makeSource(dbms, strServer, strDB, port, userName, null);
54 54
	}
55
	
55

  
56 56
	public static Source faunaEu_previous(){
57 57
		//	Fauna Europaea
58 58
		String dbms = Source.SQL_SERVER_2008;
......
71 71
		String userName = "WebUser";
72 72
		return  ImportUtils.makeSource(dbms, strServer, strDB, port, userName, null);
73 73
	}
74
	
74

  
75 75
	public static Source PESI_ERMS(){
76 76
		//	BerlinModel - Pesi-ERMS
77 77
		String dbms = Source.SQL_SERVER_2008;
......
81 81
		String userName = "WebUser";
82 82
		return  makeSource(dbms, strServer, strDB, port, userName, null);
83 83
	}
84
	
85
	
84

  
85

  
86 86
	public static Source PESI3_ERMS(){
87 87
		//	BerlinModel - Pesi-ERMS
88 88
		String dbms = Source.SQL_SERVER_2008;
......
92 92
		String userName = "pesiexport";
93 93
		return  makeSource(dbms, strServer, strDB, port, userName, null);
94 94
	}
95
	
95

  
96
   public static Source PESI2019_ERMS(){
97
        //  BerlinModel - Pesi-ERMS
98
        String dbms = Source.SQL_SERVER_2008;
99
        String strServer = "BGBM-PESISQL\\SQLEXPRESS";
100
        String strDB = "erms";
101
        int port = 1434;
102
        String userName = "pesiimport";
103
        return  makeSource(dbms, strServer, strDB, port, userName, null);
104
    }
105

  
96 106
	public static Source PESI3_IF(){
97 107
		//	BerlinModel - Pesi-ERMS
98 108
		String dbms = Source.SQL_SERVER_2008;
......
102 112
		String userName = "pesiExportFaunaEu";
103 113
		return  makeSource(dbms, strServer, strDB, port, userName, null);
104 114
	}
105
	
115

  
106 116
	public static Source PESI_IF(){
107 117
		//	BerlinModel - Pesi-IF
108 118
		String dbms = Source.SQL_SERVER_2008;
......
112 122
		String userName = "WebUser";
113 123
		return  makeSource(dbms, strServer, strDB, port, userName, null);
114 124
	}
115
	
125

  
116 126
	/**
117 127
	 * Initializes the source.
118 128
	 * @param dbms
......
128 138
		Source source = null;
129 139
		source = new Source(dbms, strServer, strDB);
130 140
		source.setPort(port);
131
			
141

  
132 142
		pwd = AccountStore.readOrStorePassword(dbms, strServer, userName, pwd);
133 143
		source.setUserAndPwd(userName, pwd);
134 144
		// write pwd to account store
135 145
		return source;
136 146
	}
137 147

  
138
	
148

  
139 149
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)