Subversion Repositories eFlore/Applications.coel

Rev

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

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