Subversion Repositories eFlore/Applications.coel

Rev

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

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