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