Subversion Repositories eFlore/Applications.coel

Rev

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

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