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