Subversion Repositories eFlore/Applications.cel

Rev

Rev 1286 | Rev 1542 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1286 Rev 1488
1
package org.tela_botanica.client.modeles.objets;
1
package org.tela_botanica.client.modeles.objets;
2
 
2
 
3
import org.tela_botanica.client.util.Util;
3
import org.tela_botanica.client.util.Util;
4
 
4
 
5
import com.google.gwt.json.client.JSONObject;
5
import com.google.gwt.json.client.JSONObject;
6
 
6
 
7
 
7
 
8
public class Observation {
8
public class Observation {
9
 
9
 
10
	private String id=null;
10
	private String id=null;
11
	private String transmis=null;
11
	private String transmis=null;
12
	private String nomSaisi=null;
12
	private String nomSaisi=null;
13
	private String nomRetenu=null;
13
	private String nomRetenu=null;
14
	private String numeroNomenclaturalSaisi=null;
14
	private String numeroNomenclaturalSaisi=null;
15
	private String numeroNomenclaturalRetenu=null;
15
	private String numeroNomenclaturalRetenu=null;
16
	private String numeroTaxonomique=null;
16
	private String numeroTaxonomique=null;
17
	private String famille=null;
17
	private String famille=null;
18
	private String localite=null;
18
	private String localite=null;
19
	private String identifiantLocalite=null;
19
	private String identifiantLocalite=null;
20
	private String lieudit=null;
20
	private String lieudit=null;
21
	private String station=null;
21
	private String station=null;
22
	private String milieu=null;
22
	private String milieu=null;
23
	private String commentaire=null;
23
	private String commentaire=null;
24
	private String date=null;
24
	private String date=null;
25
	private String numeroOrdre=null;
25
	private String numeroOrdre=null;
26
	private String motsCles=null;
26
	private String motsCles=null;
27
	private String latitude=null;
27
	private String latitude=null;
28
	private String longitude=null;
28
	private String longitude=null;
29
	private String referentielGeo=null;
29
	private String referentielGeo=null;
-
 
30
	private String abondance=null;
-
 
31
	private String certitude=null;
30
 
32
 
31
	public Observation() {
33
	public Observation() {
32
	}
34
	}
33
 
35
 
34
	
36
	
35
	/**
37
	/**
36
	 * Une observation telle que stockee dans la base de donnee
38
	 * Une observation telle que stockee dans la base de donnee
37
	 * 
39
	 * 
38
	 * @param transmis
40
	 * @param transmis
39
	 * @param nomSaisi
41
	 * @param nomSaisi
40
	 * @param nomRetenu
42
	 * @param nomRetenu
41
	 * @param numeroNomenclaturalSaisi
43
	 * @param numeroNomenclaturalSaisi
42
	 * @param numeroNomenclaturalRetenu
44
	 * @param numeroNomenclaturalRetenu
43
	 * @param numeroTaxonomique
45
	 * @param numeroTaxonomique
44
	 * @param famille
46
	 * @param famille
45
	 * @param localite
47
	 * @param localite
46
	 * @param IdentifiantLocalite
48
	 * @param IdentifiantLocalite
47
	 * @param lieudit
49
	 * @param lieudit
48
	 * @param station
50
	 * @param station
49
	 * @param milieu
51
	 * @param milieu
50
	 * @param commentaire
52
	 * @param commentaire
51
	 * @param date
53
	 * @param date
52
	 * @param numeroOrdre
54
	 * @param numeroOrdre
53
	 */
55
	 */
54
	public Observation(String transmis, String nomSaisi, String nomRetenu, String numeroNomenclaturalSaisi,  String numeroNomenclaturalRetenu, String numeroTaxonomique, String famille, String localite, String identifiantLocalite, String lieudit, String station, String milieu, String commentaire, String date, String numeroOrdre) {
56
	public Observation(String transmis, String nomSaisi, String nomRetenu, String numeroNomenclaturalSaisi,  String numeroNomenclaturalRetenu, String numeroTaxonomique, String famille, String localite, String identifiantLocalite, String lieudit, String station, String milieu, String commentaire, String date, String numeroOrdre) {
55
		
57
		
56
		this.transmis = transmis;
58
		this.transmis = transmis;
57
		this.nomSaisi = nomSaisi;
59
		this.nomSaisi = nomSaisi;
58
		this.nomRetenu = nomRetenu;
60
		this.nomRetenu = nomRetenu;
59
		this.numeroNomenclaturalSaisi = numeroNomenclaturalSaisi;
61
		this.numeroNomenclaturalSaisi = numeroNomenclaturalSaisi;
60
		this.numeroNomenclaturalRetenu = numeroNomenclaturalRetenu;
62
		this.numeroNomenclaturalRetenu = numeroNomenclaturalRetenu;
61
		this.numeroTaxonomique = numeroTaxonomique;
63
		this.numeroTaxonomique = numeroTaxonomique;
62
		this.famille = famille;
64
		this.famille = famille;
63
		
65
		
64
		this.identifiantLocalite = identifiantLocalite;		
66
		this.identifiantLocalite = identifiantLocalite;		
65
		this.lieudit = lieudit;
67
		this.lieudit = lieudit;
66
		this.station = station;
68
		this.station = station;
67
		this.milieu = milieu;
69
		this.milieu = milieu;
68
		this.commentaire = commentaire;
70
		this.commentaire = commentaire;
69
		this.date = date;
71
		this.date = date;
70
		this.numeroOrdre = numeroOrdre;
72
		this.numeroOrdre = numeroOrdre;
71
		
73
		
72
		 // Suppresion indication departementale (on pourrait faire mieux !!)
74
		 // Suppresion indication departementale (on pourrait faire mieux !!)
73
		if(localite != null) {
75
		if(localite != null) {
74
			int pos=localite.indexOf(" (" );
76
			int pos=localite.indexOf(" (" );
75
			if (pos>=0) {
77
			if (pos>=0) {
76
	    	this.localite=localite.substring(0,pos);
78
	    	this.localite=localite.substring(0,pos);
77
			}
79
			}
78
			else {
80
			else {
79
			 this.localite=localite;
81
			 this.localite=localite;
80
			}
82
			}
81
		}
83
		}
82
	    this.motsCles = "";	
84
	    this.motsCles = "";	
83
	}
85
	}
84
	
86
	
85
	public Observation(JSONObject observation) {
87
	public Observation(JSONObject observation) {
86
		this.transmis = Util.getValeurJsonOuVide(observation, "transmission");
88
		this.transmis = Util.getValeurJsonOuVide(observation, "transmission");
87
		this.identifiantLocalite = Util.getValeurJsonOuVide(observation, "ce_zone_geo");
89
		this.identifiantLocalite = Util.getValeurJsonOuVide(observation, "ce_zone_geo");
88
		this.nomSaisi = Util.getValeurJsonOuVide(observation, "nom_sel");
90
		this.nomSaisi = Util.getValeurJsonOuVide(observation, "nom_sel");
89
		this.nomRetenu = (Util.getValeurJsonOuVide(observation,"nom_ret"));
91
		this.nomRetenu = (Util.getValeurJsonOuVide(observation,"nom_ret"));
90
		this.numeroNomenclaturalSaisi = Util.getValeurJsonOuVide(observation,"nom_sel_nn");
92
		this.numeroNomenclaturalSaisi = Util.getValeurJsonOuVide(observation,"nom_sel_nn");
91
		this.numeroNomenclaturalRetenu = Util.getValeurJsonOuVide(observation,"nom_ret_nn");
93
		this.numeroNomenclaturalRetenu = Util.getValeurJsonOuVide(observation,"nom_ret_nn");
92
		this.numeroTaxonomique= Util.getValeurJsonOuVide(observation,"nt");
94
		this.numeroTaxonomique= Util.getValeurJsonOuVide(observation,"nt");
93
		this.famille = Util.getValeurJsonOuVide(observation,"famille");
95
		this.famille = Util.getValeurJsonOuVide(observation,"famille");
94
		this.localite = Util.getValeurJsonOuVide(observation,"zone_geo");
96
		this.localite = Util.getValeurJsonOuVide(observation,"zone_geo");
95
		this.lieudit = Util.getValeurJsonOuVide(observation,"lieudit");
97
		this.lieudit = Util.getValeurJsonOuVide(observation,"lieudit");
96
		this.station= Util.getValeurJsonOuVide(observation,"station");
98
		this.station= Util.getValeurJsonOuVide(observation,"station");
97
		this.milieu = Util.getValeurJsonOuVide(observation,"milieu");
99
		this.milieu = Util.getValeurJsonOuVide(observation,"milieu");
98
		this.commentaire = Util.getValeurJsonOuVide(observation,"commentaire");
100
		this.commentaire = Util.getValeurJsonOuVide(observation,"commentaire");
99
		this.date = Util.getValeurJsonOuVide(observation,"date_observation");
101
		this.date = Util.getValeurJsonOuVide(observation,"date_observation");
100
		this.numeroOrdre = Util.getValeurJsonOuVide(observation,"ordre");
102
		this.numeroOrdre = Util.getValeurJsonOuVide(observation,"ordre");
101
		this.id = Util.getValeurJsonOuVide(observation,"id_observation");
103
		this.id = Util.getValeurJsonOuVide(observation,"id_observation");
102
		this.latitude = Util.getValeurJsonOuVide(observation,"latitude");
104
		this.latitude = Util.getValeurJsonOuVide(observation,"latitude");
103
		this.longitude = Util.getValeurJsonOuVide(observation,"longitude");
105
		this.longitude = Util.getValeurJsonOuVide(observation,"longitude");
104
		this.motsCles = Util.getValeurJsonOuVide(observation,"mots_cles");
106
		this.motsCles = Util.getValeurJsonOuVide(observation,"mots_cles");
105
		
-
 
-
 
107
		this.abondance = Util.getValeurJsonOuVide(observation,"abondance");
-
 
108
		this.certitude = Util.getValeurJsonOuVide(observation,"certitude");
106
	}
109
	}
107
	
110
	
108
	/**
111
	/**
109
	 * Une observation saisie ou modifiee
112
	 * Une observation saisie ou modifiee
110
	 * 
113
	 * 
111
	 * @param nomSaisi
114
	 * @param nomSaisi
112
	 * @param numeroNomenclaturalSaisi
115
	 * @param numeroNomenclaturalSaisi
113
	 * @param localite
116
	 * @param localite
114
	 * @param IdentifiantLocalite
117
	 * @param IdentifiantLocalite
115
	 * @param lieudit
118
	 * @param lieudit
116
	 * @param station
119
	 * @param station
117
	 * @param milieu
120
	 * @param milieu
118
	 * @param commentaire
121
	 * @param commentaire
119
	 * @param date
122
	 * @param date
120
	 * 
123
	 * 
121
	 */
124
	 */
122
	
125
	
123
	public Observation(String nomSaisi, String numeroNomenclaturalSaisi,   String localite, String identifiantLocalite, String lieudit, String station, String milieu, String commentaire, String date) {
126
	public Observation(String nomSaisi, String numeroNomenclaturalSaisi,   String localite, String identifiantLocalite, String lieudit, String station, String milieu, String commentaire, String date) {
124
		
127
		
125
		this.nomSaisi = nomSaisi;
128
		this.nomSaisi = nomSaisi;
126
		this.numeroNomenclaturalSaisi = numeroNomenclaturalSaisi;
129
		this.numeroNomenclaturalSaisi = numeroNomenclaturalSaisi;
127
		
130
		
128
		this.identifiantLocalite = identifiantLocalite;		
131
		this.identifiantLocalite = identifiantLocalite;		
129
		this.lieudit = lieudit;
132
		this.lieudit = lieudit;
130
		this.station = station;
133
		this.station = station;
131
		this.milieu = milieu;
134
		this.milieu = milieu;
132
		this.commentaire = commentaire;
135
		this.commentaire = commentaire;
133
		this.date = date;
136
		this.date = date;
134
		
137
		
135
		 // Suppresion indication departementale (on pourrait faire mieux !!)
138
		 // Suppresion indication departementale (on pourrait faire mieux !!)
136
		if(localite != null) {
139
		if(localite != null) {
137
			int pos=localite.indexOf(" (" );
140
			int pos=localite.indexOf(" (" );
138
		    if (pos>=0) {
141
		    if (pos>=0) {
139
		    	this.localite=localite.substring(0,pos);
142
		    	this.localite=localite.substring(0,pos);
140
		    }
143
		    }
141
			else {
144
			else {
142
				 this.localite=localite;
145
				 this.localite=localite;
143
			}
146
			}
144
		}
147
		}
145
	    
148
	    
146
	    this.motsCles = "" ;
149
	    this.motsCles = "" ;
147
		
150
		
148
	}
151
	}
149
 
152
 
150
 
153
 
151
	public String getNomSaisi() {
154
	public String getNomSaisi() {
152
		return nomSaisi;
155
		return nomSaisi;
153
	}
156
	}
154
 
157
 
155
 
158
 
156
	public String getNumeroOrdre() {
159
	public String getNumeroOrdre() {
157
		return numeroOrdre;
160
		return numeroOrdre;
158
	}
161
	}
159
 
162
 
160
 
163
 
161
	public String getCommentaire() {
164
	public String getCommentaire() {
162
		return commentaire;
165
		return commentaire;
163
	}
166
	}
164
 
167
 
165
 
168
 
166
	public String getDate() {
169
	public String getDate() {
167
		return date;
170
		return date;
168
	}
171
	}
169
 
172
 
170
 
173
 
171
	public String getFamille() {
174
	public String getFamille() {
172
		return famille;
175
		return famille;
173
	}
176
	}
174
 
177
 
175
 
178
 
176
	public String getLieudit() {
179
	public String getLieudit() {
177
		return lieudit;
180
		return lieudit;
178
	}
181
	}
179
 
182
 
180
 
183
 
181
	public String getLocalite() {
184
	public String getLocalite() {
182
		return localite;
185
		return localite;
183
	}
186
	}
184
 
187
 
185
 
188
 
186
	public String getIdentifiantLocalite() {
189
	public String getIdentifiantLocalite() {
187
		if(identifiantLocalite != null) {
190
		if(identifiantLocalite != null) {
188
			identifiantLocalite = identifiantLocalite.replaceAll("\"", "");
191
			identifiantLocalite = identifiantLocalite.replaceAll("\"", "");
189
		}
192
		}
190
		return identifiantLocalite; 
193
		return identifiantLocalite; 
191
	}
194
	}
192
 
195
 
193
	
196
	
194
	public String getMilieu() {
197
	public String getMilieu() {
195
		return milieu;
198
		return milieu;
196
	}
199
	}
197
 
200
 
198
 
201
 
199
	public String getNomRetenu() {
202
	public String getNomRetenu() {
200
		return nomRetenu;
203
		return nomRetenu;
201
	}
204
	}
202
 
205
 
203
 
206
 
204
	public String getNumeroNomenclaturalSaisi() {
207
	public String getNumeroNomenclaturalSaisi() {
205
		return numeroNomenclaturalSaisi;
208
		return numeroNomenclaturalSaisi;
206
	}
209
	}
207
 
210
 
208
 
211
 
209
	public String getNumeroNomenclaturalRetenu() {
212
	public String getNumeroNomenclaturalRetenu() {
210
		return numeroNomenclaturalRetenu;
213
		return numeroNomenclaturalRetenu;
211
	}
214
	}
212
 
215
 
213
 
216
 
214
	public String getNumeroTaxonomique() {
217
	public String getNumeroTaxonomique() {
215
		return numeroTaxonomique;
218
		return numeroTaxonomique;
216
	}
219
	}
217
 
220
 
218
 
221
 
219
	public String getStation() {
222
	public String getStation() {
220
		return station;
223
		return station;
221
	}
224
	}
222
 
225
 
223
 
226
 
224
	public String getTransmis() {
227
	public String getTransmis() {
225
		return transmis;
228
		return transmis;
226
	}
229
	}
227
	
230
	
228
	public String getMotsCles() {
231
	public String getMotsCles() {
229
		return motsCles;
232
		return motsCles;
230
	}
233
	}
231
	
234
	
232
	public String getLatitude() {
235
	public String getLatitude() {
233
		return this.latitude ;
236
		return this.latitude ;
234
	}
237
	}
235
	
238
	
236
	public String getLongitude() {
239
	public String getLongitude() {
237
		return this.longitude ;
240
		return this.longitude ;
238
	}
241
	}
239
	
242
	
240
	public String getReferentielGeo() {
243
	public String getReferentielGeo() {
241
		return this.referentielGeo ;
244
		return this.referentielGeo ;
242
	}
245
	}
243
	
246
	
244
	public String getId() {
247
	public String getId() {
245
		return this.id;
248
		return this.id;
246
	}
249
	}
-
 
250
	
-
 
251
	public String getAbondance() {
-
 
252
		return this.abondance;
-
 
253
	}
-
 
254
	
-
 
255
	public String getCertitude() {
-
 
256
		return this.certitude;
-
 
257
	}
247
	
258
	
248
	public void setMotsCles(String motsCles) {
259
	public void setMotsCles(String motsCles) {
249
		this.motsCles = motsCles;
260
		this.motsCles = motsCles;
250
	}
261
	}
251
	
262
	
252
	public void setNumeroOrdre(String numeroOrdre) {
263
	public void setNumeroOrdre(String numeroOrdre) {
253
		this.numeroOrdre = numeroOrdre;
264
		this.numeroOrdre = numeroOrdre;
254
	}
265
	}
255
	
266
	
256
	public void setLatitude(String latitude) {
267
	public void setLatitude(String latitude) {
257
		this.latitude = latitude;
268
		this.latitude = latitude;
258
	}
269
	}
259
	
270
	
260
	public void setLongitude(String longitude) {
271
	public void setLongitude(String longitude) {
261
		this.longitude = longitude;
272
		this.longitude = longitude;
262
	}
273
	}
263
	
274
	
264
	public void setReferentielGeo(String refGeo) {
275
	public void setReferentielGeo(String refGeo) {
265
		this.referentielGeo = refGeo;
276
		this.referentielGeo = refGeo;
266
	}
277
	}
267
 
-
 
268
 
278
 
269
	public void setId(String id) {
279
	public void setId(String id) {
270
		this.id = id;
280
		this.id = id;
271
	}
281
	}
272
 
282
	
-
 
283
	public void setAbondance(String abondance) {
-
 
284
		this.abondance = abondance;
-
 
285
	}
273
 
286
	
-
 
287
	public void setCertitude(String certitude) {
-
 
288
		this.certitude = certitude;
-
 
289
	}
274
}
290
}