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