Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 242 Rev 306
1
package org.tela_botanica.client.modeles;
1
package org.tela_botanica.client.modeles;
2
 
2
 
3
import java.util.Iterator;
3
import java.util.Iterator;
4
import java.util.Set;
4
import java.util.Set;
5
 
5
 
6
import com.google.gwt.json.client.JSONObject;
6
import com.google.gwt.json.client.JSONObject;
7
 
7
 
8
public class StructureConservation extends aDonnee {
8
public class StructureConservation extends aDonnee {
9
	
9
	
10
	public static final String PREFIXE = "csc";
10
	public static final String PREFIXE = "csc";
11
 
11
 
12
	/**
12
	/**
13
	 * Constructeur vide
13
	 * Constructeur vide
14
	 * 
14
	 * 
15
	 */
15
	 */
16
	public StructureConservation() {
16
	public StructureConservation() {
17
 
17
 
18
	}
18
	}
19
	
19
	
20
	/**
20
	/**
21
	 * Constructeur avec un objet JSON
21
	 * Constructeur avec un objet JSON
22
	 * 
22
	 * 
23
	 * @param image
23
	 * @param image
24
	 */
24
	 */
25
	public StructureConservation(JSONObject conservation) {
25
	public StructureConservation(JSONObject conservation) {
26
		// L'objet JSON est une table de hachage
26
		// L'objet JSON est une table de hachage
27
		Set<String> im = conservation.keySet();
27
		Set<String> im = conservation.keySet();
28
 
28
 
29
		// Parcourt pour chaque clé
29
		// Parcourt pour chaque clé
30
		for (Iterator<String> it = im.iterator(); it.hasNext();) {
30
		for (Iterator<String> it = im.iterator(); it.hasNext();) {
31
			// Si elle est associée à une valeur, nous l'ajoutons
31
			// Si elle est associée à une valeur, nous l'ajoutons
32
			String cle = it.next();
32
			String cle = it.next();
33
			if (cle.startsWith(PREFIXE+"_")) {
33
			if (cle.startsWith(PREFIXE+"_")) {
34
				// Suppression de l'abréviation du champ. Inutile dans le contexte d'un objet
34
				// Suppression de l'abréviation du champ. Inutile dans le contexte d'un objet
35
				String cleObjet = cle.replaceFirst("^"+PREFIXE+"_", "");
35
				String cleObjet = cle.replaceFirst("^"+PREFIXE+"_", "");
36
				// Sinon, nous ajoutons la clé avec une valeur vide
36
				// Sinon, nous ajoutons la clé avec une valeur vide
37
				String valeur = "";
37
				String valeur = "";
38
				if (conservation.get(cle).isString() != null) {
38
				if (conservation.get(cle).isString() != null) {
39
					valeur = conservation.get(cle).isString().stringValue();
39
					valeur = conservation.get(cle).isString().stringValue();
40
				}
40
				}
41
				this.set(cleObjet, valeur);
41
				this.set(cleObjet, valeur);
42
			}
42
			}
43
		}
43
		}
44
	}
44
	}
45
 
45
 
46
	// FORMATION
46
	// FORMATION
47
	public String getFormation() {
47
	public String getFormation() {
48
		return renvoyerValeurCorrecte("mark_formation");
48
		return renvoyerValeurCorrecte("mark_formation");
49
	}
49
	}
50
	public void setFormation(String f) {
50
	public void setFormation(String f) {
51
		this.set("mark_formation", f);
51
		this.set("mark_formation", f);
52
	}
52
	}
53
	
53
	
54
	// FORMATION INFO
54
	// FORMATION INFO
55
	public String getFormationInfo() {
55
	public String getFormationInfo() {
56
		return renvoyerValeurCorrecte("formation");
56
		return renvoyerValeurCorrecte("formation");
57
	}
57
	}
58
	public void setFormationInfo(String f) {
58
	public void setFormationInfo(String f) {
59
		this.set("formation", f);
59
		this.set("formation", f);
60
	}
60
	}
61
	
61
	
62
	// FORMATION INTÉRÊT
62
	// FORMATION INTÉRÊT
63
	public String getFormationInteret() {
63
	public String getFormationInteret() {
64
		return renvoyerValeurCorrecte("mark_formation_interet");
64
		return renvoyerValeurCorrecte("mark_formation_interet");
65
	}
65
	}
66
	public void setFormationInteret(String f) {
66
	public void setFormationInteret(String f) {
67
		this.set("mark_formation_interet", f);
67
		this.set("mark_formation_interet", f);
68
	}
68
	}
69
	
69
	
70
	// STOCKAGE LOCAL
70
	// STOCKAGE LOCAL
71
	public String getStockageLocal() {
71
	public String getStockageLocal() {
72
		return renvoyerValeurCorrecte("truk_stockage_local");
72
		return renvoyerValeurCorrecte("truk_stockage_local");
73
	}
73
	}
74
	public void setStockageLocal(String sl) {
74
	public void setStockageLocal(String sl) {
75
		this.set("truk_stockage_local", sl);
75
		this.set("truk_stockage_local", sl);
76
	}
76
	}
77
	public void setStockageLocal(String type, Object valeur) {
77
	public void setStockageLocal(String type, Object valeur) {
78
		ajouterChaineDenormaliseAvecType("truk_stockage_local", type, valeur);
78
		remplacerTypeDansChaineDenormalise("truk_stockage_local", type, valeur);
79
	}
79
	}
80
	
80
	
81
	// STOCKAGE MEUBLE
81
	// STOCKAGE MEUBLE
82
	public String getStockageMeuble() {
82
	public String getStockageMeuble() {
83
		return renvoyerValeurCorrecte("truk_stockage_meuble");
83
		return renvoyerValeurCorrecte("truk_stockage_meuble");
84
	}
84
	}
85
	public void setStockageMeuble(String sm) {
85
	public void setStockageMeuble(String sm) {
86
		this.set("truk_stockage_meuble", sm);
86
		this.set("truk_stockage_meuble", sm);
87
	}
87
	}
88
	public void setStockageMeuble(String type, Object valeur) {
88
	public void setStockageMeuble(String type, Object valeur) {
89
		ajouterChaineDenormaliseAvecType("truk_stockage_meuble", type, valeur);
89
		remplacerTypeDansChaineDenormalise("truk_stockage_meuble", type, valeur);
90
	}
90
	}
91
	
91
	
92
	// STOCKAGE PARAMÊTRE
92
	// STOCKAGE PARAMÊTRE
93
	public String getStockageParametre() {
93
	public String getStockageParametre() {
94
		return renvoyerValeurCorrecte("truk_stockage_parametre");
94
		return renvoyerValeurCorrecte("truk_stockage_parametre");
95
	}
95
	}
96
	public void setStockageParametre(String sl) {
96
	public void setStockageParametre(String sl) {
97
		this.set("truk_stockage_parametre", sl);
97
		this.set("truk_stockage_parametre", sl);
98
	}
98
	}
99
	public void setStockageParametre(String type, Object valeur) {
99
	public void setStockageParametre(String type, Object valeur) {
100
		ajouterChaineDenormaliseAvecType("truk_stockage_parametre", type, valeur);
100
		remplacerTypeDansChaineDenormalise("truk_stockage_parametre", type, valeur);
101
	}
101
	}
102
	
102
	
103
	// COLLECTION COMMUNE
103
	// COLLECTION COMMUNE
104
	public String getCollectionCommune() {
104
	public String getCollectionCommune() {
105
		return renvoyerValeurCorrecte("mark_collection_commune");
105
		return renvoyerValeurCorrecte("mark_collection_commune");
106
	}
106
	}
107
	public void setCollectionCommune(String ccm) {
107
	public void setCollectionCommune(String ccm) {
108
		this.set("mark_collection_commune", ccm);
108
		this.set("mark_collection_commune", ccm);
109
	}
109
	}
110
	
110
	
111
	// COLLECTION AUTRE
111
	// COLLECTION AUTRE
112
	public String getCollectionAutre() {
112
	public String getCollectionAutre() {
113
		return renvoyerValeurCorrecte("truk_collection_autre");
113
		return renvoyerValeurCorrecte("truk_collection_autre");
114
	}
114
	}
115
	public void setCollectionAutre(String ca) {
115
	public void setCollectionAutre(String ca) {
116
		this.set("truk_collection_autre", ca);
116
		this.set("truk_collection_autre", ca);
117
	}
117
	}
118
	public void setCollectionAutre(String type, Object valeur) {
118
	public void setCollectionAutre(String type, Object valeur) {
119
		ajouterChaineDenormaliseAvecType("truk_collection_autre", type, valeur);
119
		remplacerTypeDansChaineDenormalise("truk_collection_autre", type, valeur);
120
	}
120
	}
121
	
121
	
122
	// ACCÈS CONTROLÉ
122
	// ACCÈS CONTROLÉ
123
	public String getAccesControle() {
123
	public String getAccesControle() {
124
		return renvoyerValeurCorrecte("mark_acces_controle");
124
		return renvoyerValeurCorrecte("mark_acces_controle");
125
	}
125
	}
126
	public void setAccesControle(String ac) {
126
	public void setAccesControle(String ac) {
127
		this.set("mark_acces_controle", ac);
127
		this.set("mark_acces_controle", ac);
128
	}
128
	}
129
	
129
	
130
	// RESTAURATION
130
	// RESTAURATION
131
	public String getRestauration() {
131
	public String getRestauration() {
132
		return renvoyerValeurCorrecte("mark_restauration");
132
		return renvoyerValeurCorrecte("mark_restauration");
133
	}
133
	}
134
	public void setRestauration(String ccm) {
134
	public void setRestauration(String ccm) {
135
		this.set("mark_restauration", ccm);
135
		this.set("mark_restauration", ccm);
136
	}
136
	}
137
	
137
	
138
	// RESTAURATION OPÉRATION
138
	// RESTAURATION OPÉRATION
139
	public String getRestaurationOperation() {
139
	public String getRestaurationOperation() {
140
		return renvoyerValeurCorrecte("truk_restauration_operation");
140
		return renvoyerValeurCorrecte("truk_restauration_operation");
141
	}
141
	}
142
	public void setRestaurationOperation(String ro) {
142
	public void setRestaurationOperation(String ro) {
143
		this.set("truk_restauration_operation", ro);
143
		this.set("truk_restauration_operation", ro);
144
	}
144
	}
145
	public void setRestaurationOperation(String type, Object valeur) {
145
	public void setRestaurationOperation(String type, Object valeur) {
146
		ajouterChaineDenormaliseAvecType("truk_restauration_operation", type, valeur);
146
		ajouterChaineDenormaliseAvecType("truk_restauration_operation", type, valeur);
147
	}
147
	}
148
	
148
	
149
	// MATERIEL CONSERVATION
149
	// MATERIEL CONSERVATION
150
	public String getMaterielConservation() {
150
	public String getMaterielConservation() {
151
		return renvoyerValeurCorrecte("ce_materiel_conservation");
151
		return renvoyerValeurCorrecte("ce_materiel_conservation");
152
	}
152
	}
153
	public void setMaterielConservation(String mc) {
153
	public void setMaterielConservation(String mc) {
154
		this.set("ce_materiel_conservation", mc);
154
		this.set("ce_materiel_conservation", mc);
155
	}
155
	}
156
	
156
	
157
	// MATERIEL AUTRE
157
	// MATERIEL AUTRE
158
	public String getMaterielAutre() {
158
	public String getMaterielAutre() {
159
		return renvoyerValeurCorrecte("truk_materiel_autre");
159
		return renvoyerValeurCorrecte("truk_materiel_autre");
160
	}
160
	}
161
	public void setMaterielAutre(String ma) {
161
	public void setMaterielAutre(String ma) {
162
		this.set("truk_materiel_autre", ma);
162
		this.set("truk_materiel_autre", ma);
163
	}
163
	}
164
	public void setMaterielAutre(String type, Object valeur) {
164
	public void setMaterielAutre(String type, Object valeur) {
165
		ajouterChaineDenormaliseAvecType("truk_materiel_autre", type, valeur);
165
		ajouterChaineDenormaliseAvecType("truk_materiel_autre", type, valeur);
166
	}
166
	}
167
	
167
	
168
	// TRAITEMENT
168
	// TRAITEMENT
169
	public String getTraitement() {
169
	public String getTraitement() {
170
		return renvoyerValeurCorrecte("mark_traitement");
170
		return renvoyerValeurCorrecte("mark_traitement");
171
	}
171
	}
172
	public void setTraitement(String t) {
172
	public void setTraitement(String t) {
173
		this.set("mark_traitement", t);
173
		this.set("mark_traitement", t);
174
	}
174
	}
175
	
175
	
176
	// TRAITEMENTS
176
	// TRAITEMENTS
177
	public String getTraitements() {
177
	public String getTraitements() {
178
		return renvoyerValeurCorrecte("truk_traitement");
178
		return renvoyerValeurCorrecte("truk_traitement");
179
	}
179
	}
180
	public void setTraitements(String t) {
180
	public void setTraitements(String t) {
181
		this.set("truk_traitement", t);
181
		this.set("truk_traitement", t);
182
	}
182
	}
183
	public void setTraitements(String type, Object valeur) {
183
	public void setTraitements(String type, Object valeur) {
184
		ajouterChaineDenormaliseAvecType("truk_traitement", type, valeur);
184
		ajouterChaineDenormaliseAvecType("truk_traitement", type, valeur);
185
	}
185
	}
186
	
186
	
187
	// ACQUISITION COLLECTION
187
	// ACQUISITION COLLECTION
188
	public String getAcquisitionCollection() {
188
	public String getAcquisitionCollection() {
189
		return renvoyerValeurCorrecte("mark_acquisition_collection");
189
		return renvoyerValeurCorrecte("mark_acquisition_collection");
190
	}
190
	}
191
	public void setAcquisitionCollection(String ac) {
191
	public void setAcquisitionCollection(String ac) {
192
		this.set("mark_acquisition_collection", ac);
192
		this.set("mark_acquisition_collection", ac);
193
	}
193
	}
194
	
194
	
195
	// ACQUISITION ECHANTILLON
195
	// ACQUISITION ECHANTILLON
196
	public String getAcquisitionEchantillon() {
196
	public String getAcquisitionEchantillon() {
197
		return renvoyerValeurCorrecte("mark_acquisition_echantillon");
197
		return renvoyerValeurCorrecte("mark_acquisition_echantillon");
198
	}
198
	}
199
	public void setAcquisitionEchantillon(String ae) {
199
	public void setAcquisitionEchantillon(String ae) {
200
		this.set("mark_acquisition_echantillon", ae);
200
		this.set("mark_acquisition_echantillon", ae);
201
	}
201
	}
202
	
202
	
203
	// ACQUISITION TRAITEMENT
203
	// ACQUISITION TRAITEMENT
204
	public String getAcquisitionTraitement() {
204
	public String getAcquisitionTraitement() {
205
		return renvoyerValeurCorrecte("mark_acquisition_traitement");
205
		return renvoyerValeurCorrecte("mark_acquisition_traitement");
206
	}
206
	}
207
	public void setAcquisitionTraitement(String at) {
207
	public void setAcquisitionTraitement(String at) {
208
		this.set("mark_acquisition_traitement", at);
208
		this.set("mark_acquisition_traitement", at);
209
	}
209
	}
210
	
210
	
211
	// ACQUISITION TRAITEMENT POISON
211
	// ACQUISITION TRAITEMENT POISON
212
	public String getAcquisitionTraitementPoison() {
212
	public String getAcquisitionTraitementPoison() {
213
		return renvoyerValeurCorrecte("truk_acquisition_traitement_poison");
213
		return renvoyerValeurCorrecte("truk_acquisition_traitement_poison");
214
	}
214
	}
215
	public void setAcquisitionTraitementPoison(String atp) {
215
	public void setAcquisitionTraitementPoison(String atp) {
216
		this.set("truk_acquisition_traitement_poison", atp);
216
		this.set("truk_acquisition_traitement_poison", atp);
217
	}
217
	}
218
	public void setAcquisitionTraitementPoison(String type, Object valeur) {
218
	public void setAcquisitionTraitementPoison(String type, Object valeur) {
219
		ajouterChaineDenormaliseAvecType("truk_acquisition_traitement_poison", type, valeur);
219
		ajouterChaineDenormaliseAvecType("truk_acquisition_traitement_poison", type, valeur);
220
	}
220
	}
221
	
221
	
222
	// ACQUISITION TRAITEMENT INSECTE
222
	// ACQUISITION TRAITEMENT INSECTE
223
	public String getAcquisitionTraitementInsecte() {
223
	public String getAcquisitionTraitementInsecte() {
224
		return renvoyerValeurCorrecte("truk_acquisition_traitement_insecte");
224
		return renvoyerValeurCorrecte("truk_acquisition_traitement_insecte");
225
	}
225
	}
226
	public void setAcquisitionTraitementInsecte(String ati) {
226
	public void setAcquisitionTraitementInsecte(String ati) {
227
		this.set("truk_acquisition_traitement_insecte", ati);
227
		this.set("truk_acquisition_traitement_insecte", ati);
228
	}
228
	}
229
	public void setAcquisitionTraitementInsecte(String type, Object valeur) {
229
	public void setAcquisitionTraitementInsecte(String type, Object valeur) {
230
		ajouterChaineDenormaliseAvecType("truk_acquisition_traitement_insecte", type, valeur);
230
		ajouterChaineDenormaliseAvecType("truk_acquisition_traitement_insecte", type, valeur);
231
	}
231
	}
232
}
232
}