Subversion Repositories eFlore/Applications.coel

Rev

Rev 1354 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1354 Rev 1364
1
package org.tela_botanica.client.modeles.structure;
1
package org.tela_botanica.client.modeles.structure;
2
 
2
 
3
import java.util.Date;
3
import java.util.Date;
4
import java.util.Iterator;
4
import java.util.Iterator;
5
import java.util.Map;
5
import java.util.Map;
6
import java.util.Set;
6
import java.util.Set;
7
 
7
 
8
import org.tela_botanica.client.modeles.aDonnee;
8
import org.tela_botanica.client.modeles.aDonnee;
9
import org.tela_botanica.client.modeles.personne.Personne;
9
import org.tela_botanica.client.modeles.personne.Personne;
10
import org.tela_botanica.client.util.UtilString;
10
import org.tela_botanica.client.util.UtilString;
11
 
11
 
12
import com.extjs.gxt.ui.client.data.BaseModelData;
12
import com.extjs.gxt.ui.client.data.BaseModelData;
13
import com.extjs.gxt.ui.client.data.ModelData;
13
import com.extjs.gxt.ui.client.data.ModelData;
14
import com.google.gwt.i18n.client.DateTimeFormat;
14
import com.google.gwt.i18n.client.DateTimeFormat;
15
import com.google.gwt.json.client.JSONObject;
15
import com.google.gwt.json.client.JSONObject;
16
 
16
 
17
public class Structure extends aDonnee {
17
public class Structure extends aDonnee {
18
	
18
	
19
	private static final long serialVersionUID = -5623886668593288218L;
19
	private static final long serialVersionUID = -5623886668593288218L;
20
 
20
 
21
	public static final String PREFIXE = "cs";
21
	public static final String PREFIXE = "cs";
22
	public static final String URL_SITE = "WEB";
22
	public static final String URL_SITE = "WEB";
23
	public static final String URL_LOGO = "LOGO";
23
	public static final String URL_LOGO = "LOGO";
24
	
24
	
25
	private BaseModelData urls = null;
25
	private BaseModelData urls = null;
26
	private StructureAPersonneListe personnel = null;
26
	private StructureAPersonneListe personnel = null;
27
	private StructureValorisation valorisation = null;
27
	private StructureValorisation valorisation = null;
28
	private StructureConservation conservation = null;
28
	private StructureConservation conservation = null;
29
	public static String[] champsObligatoires = {"cs_id_structure", "csc_id_structure", "csv_id_structure"};
29
	public static String[] champsObligatoires = {"cs_id_structure", "csc_id_structure", "csv_id_structure"};
30
	
30
	
31
	public Structure() {
31
	public Structure() {
32
		// Constructions du tableau des urls interne
32
		// Constructions du tableau des urls interne
33
		urls = new BaseModelData();
33
		urls = new BaseModelData();
34
	}
34
	}
35
	
35
	
36
	public Structure(ModelData model)
36
	public Structure(ModelData model)
37
	{		
37
	{		
38
		Map<String, Object> a = model.getProperties();
38
		Map<String, Object> a = model.getProperties();
39
 
39
 
40
		Set<String> cles = a.keySet();
40
		Set<String> cles = a.keySet();
41
		Iterator<String> it = cles.iterator();
41
		Iterator<String> it = cles.iterator();
42
		while (it.hasNext()) {
42
		while (it.hasNext()) {
43
			String cle = it.next();			
43
			String cle = it.next();			
44
			if (a.get(cle) != null) {
44
			if (a.get(cle) != null) {
45
				String cleObjet = cle.replaceFirst("^"+getPrefixe()+"_", "");
45
				String cleObjet = cle.replaceFirst("^"+getPrefixe()+"_", "");
46
				this.set(cleObjet, a.get(cle));
46
				this.set(cleObjet, a.get(cle));
47
			}
47
			}
48
		}
48
		}
49
	}
49
	}
50
	
50
	
51
	public Structure(JSONObject institution) {
51
	public Structure(JSONObject institution) {
52
		// Constructions du tableau des urls interne
52
		// Constructions du tableau des urls interne
53
		urls = new BaseModelData();
53
		urls = new BaseModelData();
54
 
54
 
55
		// l'objet JSON est une table de hachage
55
		// l'objet JSON est une table de hachage
56
		Set<String> im = institution.keySet();
56
		Set<String> im = institution.keySet();
57
 
57
 
58
		// Parcourt pour chaque clé
58
		// Parcourt pour chaque clé
59
		for (Iterator<String> it = im.iterator(); it.hasNext();) {
59
		for (Iterator<String> it = im.iterator(); it.hasNext();) {
60
			// Si elle est associée à une valeur, nous l'ajoutons
60
			// Si elle est associée à une valeur, nous l'ajoutons
61
			String cle = it.next();
61
			String cle = it.next();
62
			if (cle.startsWith(PREFIXE+"_")) {
62
			if (cle.startsWith(PREFIXE+"_")) {
63
				// Suppression de l'abréviation du champ. Inutile dans le contexte d'un objet
63
				// Suppression de l'abréviation du champ. Inutile dans le contexte d'un objet
64
				String cleObjet = cle.replaceFirst("^"+PREFIXE+"_", "");
64
				String cleObjet = cle.replaceFirst("^"+PREFIXE+"_", "");
65
				// Sinon, nous ajoutons la clé avec une valeur vide
65
				// Sinon, nous ajoutons la clé avec une valeur vide
66
				String valeur = "";
66
				String valeur = "";
67
				if (institution.get(cle).isString() != null) {
67
				if (institution.get(cle).isString() != null) {
68
					valeur = institution.get(cle).isString().stringValue();
68
					valeur = institution.get(cle).isString().stringValue();
69
				}
69
				}
70
				if (cleObjet.equals("truk_url")) {
70
				if (cleObjet.equals("truk_url")) {
71
					this.setUrl(valeur);
71
					this.setUrl(valeur);
72
				} else {
72
				} else {
73
					this.set(cleObjet, valeur);
73
					this.set(cleObjet, valeur);
74
				}
74
				}
75
			}
75
			}
76
		}
76
		}
77
	}
77
	}
78
	
78
	
79
	@Override
79
	@Override
80
	protected String getPrefixe() {
80
	protected String getPrefixe() {
81
		return PREFIXE;
81
		return PREFIXE;
82
	}
82
	}
83
	
83
	
84
	protected String[] getChampsObligatoires()	{
84
	protected String[] getChampsObligatoires()	{
85
		return champsObligatoires;
85
		return champsObligatoires;
86
	}
86
	}
87
	
87
	
88
	public String getId() {
88
	public String getId() {
89
		return renvoyerValeurCorrecte("id_structure");
89
		return renvoyerValeurCorrecte("id_structure");
90
	}
90
	}
91
	public void setId(String idStructure) {
91
	public void setId(String idStructure) {
92
		this.set("id_structure", idStructure);
92
		this.set("id_structure", idStructure);
93
	}
93
	}
94
	
94
	
95
	public String getIdProjet() {
95
	public String getIdProjet() {
96
		return renvoyerValeurCorrecte("ce_projet");
96
		return renvoyerValeurCorrecte("ce_projet");
97
	}
97
	}
98
	public void setIdProjet(String idProjet) {
98
	public void setIdProjet(String idProjet) {
99
		this.set("ce_projet", idProjet);
99
		this.set("ce_projet", idProjet);
100
	}
100
	}
101
	
101
	
102
	public String getIdMere() {
102
	public String getIdMere() {
103
		return renvoyerValeurCorrecte("ce_mere");
103
		return renvoyerValeurCorrecte("ce_mere");
104
	}
104
	}
105
	public void setIdMere(String idMere) {
105
	public void setIdMere(String idMere) {
106
		this.set("ce_mere", idMere);
106
		this.set("ce_mere", idMere);
107
	}
107
	}
108
	
108
	
109
	public String getGuid() {
109
	public String getGuid() {
110
		return renvoyerValeurCorrecte("guid");
110
		return renvoyerValeurCorrecte("guid");
111
	}
111
	}
112
	public void setGuid(String guid) {
112
	public void setGuid(String guid) {
113
		this.set("guid", guid);
113
		this.set("guid", guid);
114
	}
114
	}
115
	
115
	
116
	public String getIdAlternatif() {
116
	public String getIdAlternatif() {
117
		return renvoyerValeurCorrecte("truk_identifiant_alternatif");
117
		return renvoyerValeurCorrecte("truk_identifiant_alternatif");
118
	}
118
	}
119
	public void setIdAlternatif(String idAlter) {
119
	public void setIdAlternatif(String idAlter) {
120
		this.set("truk_identifiant_alternatif", idAlter);
120
		this.set("truk_identifiant_alternatif", idAlter);
121
	}
121
	}
122
	
122
	
123
	public String getNom() {
123
	public String getNom() {
124
		return renvoyerValeurCorrecte("nom");
124
		return renvoyerValeurCorrecte("nom");
125
	}
125
	}
126
	public void setNom(String nom) {
126
	public void setNom(String nom) {
127
		this.set("nom", nom);
127
		this.set("nom", nom);
128
	}
128
	}
129
	
129
	
130
	public String getNomAlternatif() {
130
	public String getNomAlternatif() {
131
		return renvoyerValeurCorrecte("truk_nom_alternatif");
131
		return renvoyerValeurCorrecte("truk_nom_alternatif");
132
	}
132
	}
133
	
133
	
134
	public String getDescription() {
134
	public String getDescription() {
135
		return renvoyerValeurCorrecte("description");
135
		return renvoyerValeurCorrecte("description");
136
	}
136
	}
137
	public void setDescription(String description) {
137
	public void setDescription(String description) {
138
		this.set("description", description);
138
		this.set("description", description);
139
	}
139
	}
140
	
140
	
141
	public String getType() {
141
	public String getType() {
142
		return renvoyerValeurCorrecte("ce_type");
142
		return renvoyerValeurCorrecte("ce_type");
143
	}
143
	}
144
	public void setType(String type) {
144
	public void setType(String type) {
145
		this.set("ce_type", type);
145
		this.set("ce_type", type);
146
	}
146
	}
147
	
147
	
148
	public String getTypePrive() {
148
	public String getTypePrive() {
149
		return renvoyerValeurCorrecte("ce_truk_type_prive");
149
		return renvoyerValeurCorrecte("ce_truk_type_prive");
150
	}
150
	}
151
	public void setTypePrive(String typePrive) {
151
	public void setTypePrive(String typePrive) {
152
		this.set("ce_truk_type_prive", typePrive);
152
		this.set("ce_truk_type_prive", typePrive);
153
	}
153
	}
154
	
154
	
155
	public String getTypePublic() {
155
	public String getTypePublic() {
156
		return renvoyerValeurCorrecte("ce_truk_type_public");
156
		return renvoyerValeurCorrecte("ce_truk_type_public");
157
	}
157
	}
158
	public void setTypePublic(String typePublic) {
158
	public void setTypePublic(String typePublic) {
159
		this.set("ce_truk_type_public", typePublic);
159
		this.set("ce_truk_type_public", typePublic);
160
	}
160
	}
-
 
161
	
-
 
162
	public String getAbreviationProjet() {
-
 
163
		return renvoyerValeurCorrecte("_abreviationprojet_");
-
 
164
	}
-
 
165
	public void setAbreviationProjet(String abreviation) {
-
 
166
		this.set("_abreviationprojet_", abreviation);
-
 
167
	}
161
	
168
	
162
	public String getAdresse() {
169
	public String getAdresse() {
163
		return (String) renvoyerValeurCorrecte("adresse_01");
170
		return (String) renvoyerValeurCorrecte("adresse_01");
164
	}
171
	}
165
	public void setAdresse(String adr) {
172
	public void setAdresse(String adr) {
166
		this.set("adresse_01", adr);
173
		this.set("adresse_01", adr);
167
	}
174
	}
168
	
175
	
169
	public String getAdresseComplement() {
176
	public String getAdresseComplement() {
170
		return renvoyerValeurCorrecte("adresse_02");
177
		return renvoyerValeurCorrecte("adresse_02");
171
	}
178
	}
172
	public void setAdresseComplement(String adr) {
179
	public void setAdresseComplement(String adr) {
173
		this.set("adresse_02", adr);
180
		this.set("adresse_02", adr);
174
	}
181
	}
175
 
182
 
176
	public String getDateFondationFormatMysql() {
183
	public String getDateFondationFormatMysql() {
177
		return renvoyerValeurCorrecte("date_fondation");
184
		return renvoyerValeurCorrecte("date_fondation");
178
	}
185
	}
179
	public String getDateFondationFormatLong() {
186
	public String getDateFondationFormatLong() {
180
		String dateFormatee = "";
187
		String dateFormatee = "";
181
		Date dateFondation = getDateFondation();
188
		Date dateFondation = getDateFondation();
182
		if (dateFondation != null) {
189
		if (dateFondation != null) {
183
			dateFormatee = DateTimeFormat.getLongDateFormat().format(dateFondation);
190
			dateFormatee = DateTimeFormat.getLongDateFormat().format(dateFondation);
184
		}
191
		}
185
		return dateFormatee;
192
		return dateFormatee;
186
	}
193
	}
187
	
194
	
188
	public String getAnneOuDateFondationFormatLong() {
195
	public String getAnneOuDateFondationFormatLong() {
189
		String dateFormatee = "";
196
		String dateFormatee = "";
190
		String dateFondation =  renvoyerValeurCorrecte("date_fondation");
197
		String dateFondation =  renvoyerValeurCorrecte("date_fondation");
191
		if (!dateFondation.equals(""))	{
198
		if (!dateFondation.equals(""))	{
192
			if (dateFondation.endsWith("00-00"))	{
199
			if (dateFondation.endsWith("00-00"))	{
193
			dateFormatee = dateFondation.substring(0, 4);
200
			dateFormatee = dateFondation.substring(0, 4);
194
			} else {
201
			} else {
195
				Date date = DateTimeFormat.getFormat("yyyy-MM-dd").parse(dateFondation);
202
				Date date = DateTimeFormat.getFormat("yyyy-MM-dd").parse(dateFondation);
196
				dateFormatee = DateTimeFormat.getLongDateFormat().format(date);
203
				dateFormatee = DateTimeFormat.getLongDateFormat().format(date);
197
			}
204
			}
198
		}
205
		}
199
		return dateFormatee;
206
		return dateFormatee;
200
	}
207
	}
201
	public Date getDateFondation() {
208
	public Date getDateFondation() {
202
		Date fondationDate = null;
209
		Date fondationDate = null;
203
		String fondationChaine = renvoyerValeurCorrecte("date_fondation");
210
		String fondationChaine = renvoyerValeurCorrecte("date_fondation");
204
		if (!fondationChaine.isEmpty() && !fondationChaine.equals("0000-00-00")) {
211
		if (!fondationChaine.isEmpty() && !fondationChaine.equals("0000-00-00")) {
205
			fondationDate = DateTimeFormat.getFormat("yyyy-MM-dd").parseStrict(fondationChaine);
212
			fondationDate = DateTimeFormat.getFormat("yyyy-MM-dd").parseStrict(fondationChaine);
206
		}
213
		}
207
		return fondationDate;
214
		return fondationDate;
208
	}
215
	}
209
	
216
	
210
	public String getAnneeOuDateFondation()	{
217
	public String getAnneeOuDateFondation()	{
211
		 String valeurDateFondation = get("date_fondation");
218
		 String valeurDateFondation = get("date_fondation");
212
		 if (!UtilString.isEmpty(valeurDateFondation) && valeurDateFondation.endsWith("00-00")) {
219
		 if (!UtilString.isEmpty(valeurDateFondation) && valeurDateFondation.endsWith("00-00")) {
213
			 valeurDateFondation = valeurDateFondation.substring(0, 4);
220
			 valeurDateFondation = valeurDateFondation.substring(0, 4);
214
		 } else if (UtilString.isEmpty(valeurDateFondation) && valeurDateFondation.equals("0000-00-00")) {
221
		 } else if (UtilString.isEmpty(valeurDateFondation) && valeurDateFondation.equals("0000-00-00")) {
215
			 valeurDateFondation  = "";
222
			 valeurDateFondation  = "";
216
		 }
223
		 }
217
		 return valeurDateFondation;
224
		 return valeurDateFondation;
218
	}
225
	}
219
	
226
	
220
	public void setDateFondation(Date dateFondation) {
227
	public void setDateFondation(Date dateFondation) {
221
		if (dateFondation != null) {
228
		if (dateFondation != null) {
222
			this.set("date_fondation", DateTimeFormat.getFormat("yyyy-MM-dd").format(dateFondation));
229
			this.set("date_fondation", DateTimeFormat.getFormat("yyyy-MM-dd").format(dateFondation));
223
		}
230
		}
224
	}
231
	}
225
	public void setDateFondation(String dateFondation) {
232
	public void setDateFondation(String dateFondation) {
226
		if (dateFondation != null) {
233
		if (dateFondation != null) {
227
			this.set("date_fondation", dateFondation);
234
			this.set("date_fondation", dateFondation);
228
		}
235
		}
229
	}
236
	}
230
		
237
		
231
	public String getCodePostal() {
238
	public String getCodePostal() {
232
		return renvoyerValeurCorrecte("code_postal");
239
		return renvoyerValeurCorrecte("code_postal");
233
	}
240
	}
234
	public void setCodePostal(String codePostal) {
241
	public void setCodePostal(String codePostal) {
235
		this.set("code_postal", codePostal);
242
		this.set("code_postal", codePostal);
236
	}
243
	}
237
	
244
	
238
	public String getVille() {
245
	public String getVille() {
239
		return renvoyerValeurCorrecte("ville");
246
		return renvoyerValeurCorrecte("ville");
240
	}
247
	}
241
	public void setVille(String ville) {
248
	public void setVille(String ville) {
242
		this.set("ville", ville);
249
		this.set("ville", ville);
243
	}
250
	}
244
	
251
	
245
	public String getRegion() {
252
	public String getRegion() {
246
		return getChaineDenormaliseUnique("ce_truk_region");
253
		return getChaineDenormaliseUnique("ce_truk_region");
247
	}
254
	}
248
	public void setRegion(String region) {
255
	public void setRegion(String region) {
249
		this.set("ce_truk_region", region);
256
		this.set("ce_truk_region", region);
250
	}
257
	}
251
	
258
	
252
	public String getPays() {
259
	public String getPays() {
253
		return getChaineDenormaliseUnique("ce_truk_pays");
260
		return getChaineDenormaliseUnique("ce_truk_pays");
254
	}
261
	}
255
	public void setPays(String pays) {
262
	public void setPays(String pays) {
256
		this.set("ce_truk_pays", pays);
263
		this.set("ce_truk_pays", pays);
257
	}
264
	}
258
	
265
	
259
	public String getLatitude() {
266
	public String getLatitude() {
260
		return renvoyerValeurCorrecte("latitude");
267
		return renvoyerValeurCorrecte("latitude");
261
	}
268
	}
262
	public void setLatitude(String latitude) {
269
	public void setLatitude(String latitude) {
263
		if (latitude != null)	{
270
		if (latitude != null)	{
264
			latitude = latitude.replace(".", ",");
271
			latitude = latitude.replace(".", ",");
265
		}
272
		}
266
		this.set("latitude", latitude);
273
		this.set("latitude", latitude);
267
	}
274
	}
268
 
275
 
269
	public String getLongitude() {
276
	public String getLongitude() {
270
		return renvoyerValeurCorrecte("longitude");
277
		return renvoyerValeurCorrecte("longitude");
271
	}
278
	}
272
	public void setLongitude(String longitude) {
279
	public void setLongitude(String longitude) {
273
		if (longitude != null)	{
280
		if (longitude != null)	{
274
			longitude = longitude.replace(".", ",");
281
			longitude = longitude.replace(".", ",");
275
		}
282
		}
276
		this.set("longitude", longitude);
283
		this.set("longitude", longitude);
277
	}
284
	}
278
	
285
	
279
	// TELEPHONE
286
	// TELEPHONE
280
	public String getTelephone() {
287
	public String getTelephone() {
281
		return renvoyerValeurCorrecte("truk_telephone");
288
		return renvoyerValeurCorrecte("truk_telephone");
282
	}
289
	}
283
	public void setTelephone(String tel) {
290
	public void setTelephone(String tel) {
284
		this.set("truk_telephone", tel);
291
		this.set("truk_telephone", tel);
285
	}	
292
	}	
286
 
293
 
287
	// TELEPHONE FIXE
294
	// TELEPHONE FIXE
288
	public String getTelephoneFixe() {
295
	public String getTelephoneFixe() {
289
		return getInfoDenormaliseParType(renvoyerValeurCorrecte("truk_telephone"), Personne.TELEPHONE_FIXE);
296
		return getInfoDenormaliseParType(renvoyerValeurCorrecte("truk_telephone"), Personne.TELEPHONE_FIXE);
290
	}
297
	}
291
	public void setTelephoneFixe(String fixe) {
298
	public void setTelephoneFixe(String fixe) {
292
		modifierChaineDenormaliseParType("truk_telephone", Personne.TELEPHONE_FIXE, fixe);
299
		modifierChaineDenormaliseParType("truk_telephone", Personne.TELEPHONE_FIXE, fixe);
293
	}
300
	}
294
	
301
	
295
	//TELEPHONE FAX
302
	//TELEPHONE FAX
296
	public String getFax() {
303
	public String getFax() {
297
		return getInfoDenormaliseParType(renvoyerValeurCorrecte("truk_telephone"), Personne.TELEPHONE_FAX);
304
		return getInfoDenormaliseParType(renvoyerValeurCorrecte("truk_telephone"), Personne.TELEPHONE_FAX);
298
	}
305
	}
299
	public void setFax(String fax) {
306
	public void setFax(String fax) {
300
		modifierChaineDenormaliseParType("truk_telephone", Personne.TELEPHONE_FAX, fax);
307
		modifierChaineDenormaliseParType("truk_telephone", Personne.TELEPHONE_FAX, fax);
301
	}
308
	}
302
 
309
 
303
	
310
	
304
	// COURRIEL
311
	// COURRIEL
305
	public String getCourriel() {
312
	public String getCourriel() {
306
		return renvoyerValeurCorrecte("courriel");
313
		return renvoyerValeurCorrecte("courriel");
307
	}
314
	}
308
	public void setCourriel(String courriel) {
315
	public void setCourriel(String courriel) {
309
		this.set("courriel", courriel);
316
		this.set("courriel", courriel);
310
	}
317
	}
311
	
318
	
312
	// URL
319
	// URL
313
	public String getUrl(String type) {
320
	public String getUrl(String type) {
314
		return urls.get(type);
321
		return urls.get(type);
315
	}
322
	}
316
	public String getUrl() {
323
	public String getUrl() {
317
		String urlsDenormalise = "";
324
		String urlsDenormalise = "";
318
		Set<String> proprietes = urls.getProperties().keySet();
325
		Set<String> proprietes = urls.getProperties().keySet();
319
		for (Iterator<String> it = proprietes.iterator(); it.hasNext();) {
326
		for (Iterator<String> it = proprietes.iterator(); it.hasNext();) {
320
			String cle = it.next();
327
			String cle = it.next();
321
			urlsDenormalise += cle+"##"+urls.get(cle)+";;";
328
			urlsDenormalise += cle+"##"+urls.get(cle)+";;";
322
		}
329
		}
323
		urlsDenormalise = urlsDenormalise.replaceFirst(";;$", "");
330
		urlsDenormalise = urlsDenormalise.replaceFirst(";;$", "");
324
		return urlsDenormalise;
331
		return urlsDenormalise;
325
	}
332
	}
326
	public void setUrl(String urlsDenormalise) {
333
	public void setUrl(String urlsDenormalise) {
327
		if (urlsDenormalise != null && !urlsDenormalise.equals("")) {
334
		if (urlsDenormalise != null && !urlsDenormalise.equals("")) {
328
			//GWT.log(urlsDenormalise, null);
335
			//GWT.log(urlsDenormalise, null);
329
			String[] tableauUrls = urlsDenormalise.split(";;");
336
			String[] tableauUrls = urlsDenormalise.split(";;");
330
			for (int i = 0; i < tableauUrls.length; i++) {
337
			for (int i = 0; i < tableauUrls.length; i++) {
331
				String url = tableauUrls[i];
338
				String url = tableauUrls[i];
332
				//GWT.log("\t"+url, null);
339
				//GWT.log("\t"+url, null);
333
				String[] tableauUrl = url.split("##");
340
				String[] tableauUrl = url.split("##");
334
				if (tableauUrl.length == 2) {
341
				if (tableauUrl.length == 2) {
335
					//GWT.log("\t\t"+tableauUrl[0]+"-"+tableauUrl[1], null);
342
					//GWT.log("\t\t"+tableauUrl[0]+"-"+tableauUrl[1], null);
336
					urls.set(tableauUrl[0], tableauUrl[1]);
343
					urls.set(tableauUrl[0], tableauUrl[1]);
337
				}
344
				}
338
			}
345
			}
339
		}
346
		}
340
	}
347
	}
341
	public void setUrl(String type, String url) {
348
	public void setUrl(String type, String url) {
342
		if (url != null) {
349
		if (url != null) {
343
			urls.set(type, url);
350
			urls.set(type, url);
344
		}
351
		}
345
	}
352
	}
346
	
353
	
347
	public int getNbrePersonne() {
354
	public int getNbrePersonne() {
348
		if (renvoyerValeurCorrecte("nbre_personne").equals("")) {
355
		if (renvoyerValeurCorrecte("nbre_personne").equals("")) {
349
			return 0;
356
			return 0;
350
		} else {
357
		} else {
351
			return Integer.parseInt(renvoyerValeurCorrecte("nbre_personne"));
358
			return Integer.parseInt(renvoyerValeurCorrecte("nbre_personne"));
352
		}
359
		}
353
	}
360
	}
354
	public void setNbrePersonne(int nbrePersonne) {
361
	public void setNbrePersonne(int nbrePersonne) {
355
		this.set("nbre_personne", Integer.toString(nbrePersonne));
362
		this.set("nbre_personne", Integer.toString(nbrePersonne));
356
	}
363
	}
357
	
364
	
358
	public String getConditionAcces() {
365
	public String getConditionAcces() {
359
		return renvoyerValeurCorrecte("condition_acces");
366
		return renvoyerValeurCorrecte("condition_acces");
360
	}
367
	}
361
	public void setConditionAcces(String acces) {
368
	public void setConditionAcces(String acces) {
362
		this.set("condition_acces", acces);
369
		this.set("condition_acces", acces);
363
	}
370
	}
364
 
371
 
365
	public String getConditionUsage() {
372
	public String getConditionUsage() {
366
		return renvoyerValeurCorrecte("condition_usage");
373
		return renvoyerValeurCorrecte("condition_usage");
367
	}
374
	}
368
	public void setConditionUsage(String usage) {
375
	public void setConditionUsage(String usage) {
369
		this.set("condition_usage", usage);
376
		this.set("condition_usage", usage);
370
	}
377
	}
371
	
378
	
372
	public StructureAPersonneListe getPersonnel() {
379
	public StructureAPersonneListe getPersonnel() {
373
		return personnel;
380
		return personnel;
374
	}
381
	}
375
	public void setPersonnel(StructureAPersonneListe personnelAStocker) {
382
	public void setPersonnel(StructureAPersonneListe personnelAStocker) {
376
		personnel = personnelAStocker;
383
		personnel = personnelAStocker;
377
	}
384
	}
378
	
385
	
379
	public StructureValorisation getValorisation() {
386
	public StructureValorisation getValorisation() {
380
		return valorisation;
387
		return valorisation;
381
	}
388
	}
382
	public void setValorisation(StructureValorisation valorisationAStocker) {
389
	public void setValorisation(StructureValorisation valorisationAStocker) {
383
		valorisation = valorisationAStocker;
390
		valorisation = valorisationAStocker;
384
	}
391
	}
385
	
392
	
386
	public StructureConservation getConservation() {
393
	public StructureConservation getConservation() {
387
		return conservation;
394
		return conservation;
388
	}
395
	}
389
	public void setConservation(StructureConservation conservationAStocker) {
396
	public void setConservation(StructureConservation conservationAStocker) {
390
		conservation = conservationAStocker;
397
		conservation = conservationAStocker;
391
	}
398
	}
392
	
399
	
393
	public String toString() {
400
	public String toString() {
394
		String sortie = "";
401
		String sortie = "";
395
		
402
		
396
		// Champs du BaseModelData
403
		// Champs du BaseModelData
397
		Set<String> proprietes = this.getProperties().keySet();
404
		Set<String> proprietes = this.getProperties().keySet();
398
		for (Iterator<String> it = proprietes.iterator(); it.hasNext();) {
405
		for (Iterator<String> it = proprietes.iterator(); it.hasNext();) {
399
			String cle = it.next();
406
			String cle = it.next();
400
			sortie += cle+" : "+this.get(cle)+"\n";
407
			sortie += cle+" : "+this.get(cle)+"\n";
401
		}
408
		}
402
		
409
		
403
		// Champs spéciaux
410
		// Champs spéciaux
404
		sortie += getUrl();
411
		sortie += getUrl();
405
		
412
		
406
		return sortie;
413
		return sortie;
407
	}
414
	}
408
	
415
	
409
}
416
}