Subversion Repositories eFlore/Applications.coel

Rev

Rev 69 | Rev 156 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
60 jpm 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
 
69 jpm 8
public class Structure extends aDonnee {
119 jpm 9
 
10
	public static final String PREFIXE = "cs";
11
 
60 jpm 12
	/**
13
	 * Constructeur vide
14
	 *
15
	 */
16
	public Structure() {
17
 
18
	}
19
 
20
	/**
21
	 * Constructeur avec un objet JSON
22
	 *
23
	 * @param image
24
	 */
25
	public Structure(JSONObject institution) {
26
		// l'objet JSON est une table de hachage
27
		Set<String> im = institution.keySet();
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();
33
			// Suppression de l'abréviation du champ. Inutile dans le contexte d'un objet
119 jpm 34
			String cleObjet = cle.replaceFirst("^"+Structure.PREFIXE+"_", "");
60 jpm 35
			if (institution.get(cle).isString() != null) {
36
				String valeur = institution.get(cle).isString().stringValue();
37
				this.set(cleObjet, valeur);
38
			} else {
39
				// Sinon, nous ajoutons la clé avec une valeur vide
40
				String valeur = " ";
41
				this.set(cleObjet, valeur);
42
			}
43
		}
44
	}
45
 
46
	public String getId() {
47
		return (String) renvoyerValeurCorrecte("id_structure");
48
	}
119 jpm 49
	public void setId(String idStructure) {
50
		this.set("id_structure", idStructure);
51
	}
60 jpm 52
 
119 jpm 53
	public String getIdProjet() {
54
		return (String) renvoyerValeurCorrecte("ce_projet");
55
	}
56
	public void setIdProjet(String idProjet) {
57
		this.set("ce_projet", idProjet);
58
	}
59
 
60
	public String getIdMere() {
61
		return (String) renvoyerValeurCorrecte("ce_mere");
62
	}
63
	public void setIdMere(String idMere) {
64
		this.set("ce_mere", idMere);
65
	}
66
 
67
	public String getGuid() {
68
		return (String) renvoyerValeurCorrecte("guid");
69
	}
70
	public void setGuid(String guid) {
71
		this.set("guid", guid);
72
	}
73
 
74
	public String getIdAlternatif() {
75
		return (String) renvoyerValeurCorrecte("truk_identifiant_alternatif");
76
	}
77
	public void setIdAlternatif(String idAlter) {
78
		this.set("truk_identifiant_alternatif", idAlter);
79
	}
80
 
60 jpm 81
	public String getNom() {
82
		return (String) renvoyerValeurCorrecte("nom");
83
	}
119 jpm 84
	public void setNom(String nom) {
85
		this.set("nom", nom);
86
	}
60 jpm 87
 
119 jpm 88
	public String getNomAlternatif() {
89
		return (String) renvoyerValeurCorrecte("truk_nom_alternatif");
90
	}
91
 
60 jpm 92
	public String getDescription() {
93
		return (String) renvoyerValeurCorrecte("description");
94
	}
95
 
119 jpm 96
	public String getType() {
97
		return (String) renvoyerValeurCorrecte("ce_type");
98
	}
99
	public void setType(String type) {
100
		this.set("ce_type", type);
101
	}
102
 
103
	public String getTypePrive() {
104
		return (String) renvoyerValeurCorrecte("ce_truk_type_prive");
105
	}
106
	public void setTypePrive(String typePrive) {
107
		this.set("ce_truk_type_prive", typePrive);
108
	}
109
 
110
	public String getTypePublic() {
111
		return (String) renvoyerValeurCorrecte("ce_truk_type_public");
112
	}
113
	public void setTypePublic(String typePublic) {
114
		this.set("ce_truk_type_public", typePublic);
115
	}
116
 
117
	public String getAdresse() {
60 jpm 118
		return (String) renvoyerValeurCorrecte("adresse_01");
119
	}
119 jpm 120
	public void setAdresse(String adr) {
121
		this.set("adresse_01", adr);
122
	}
123
 
124
	public String getAdresseComplement() {
125
		return (String) renvoyerValeurCorrecte("adresse_02");
126
	}
60 jpm 127
 
119 jpm 128
	public String getDateFondation() {
129
		return (String) renvoyerValeurCorrecte("date_fondation");
130
	}
131
	public void setDateFondation(String dateFondation) {
132
		this.set("date_fondation", dateFondation);
133
	}
134
 
60 jpm 135
	public String getCodePostal() {
136
		return (String) renvoyerValeurCorrecte("code_postal");
137
	}
119 jpm 138
	public void setCodePostal(String codePostal) {
139
		this.set("code_postal", codePostal);
140
	}
141
 
60 jpm 142
	public String getVille() {
143
		return (String) renvoyerValeurCorrecte("ville");
144
	}
119 jpm 145
	public void setVille(String ville) {
146
		this.set("ville", ville);
147
	}
148
 
60 jpm 149
	public String getRegion() {
150
		return (String) renvoyerValeurCorrecte("region");
151
	}
119 jpm 152
	public void setRegion(String region) {
153
		this.set("region", region);
154
	}
155
 
60 jpm 156
	public String getPays() {
157
		return (String) renvoyerValeurCorrecte("pays");
158
	}
119 jpm 159
	public void setPays(String pays) {
160
		this.set("pays", pays);
161
	}
60 jpm 162
 
119 jpm 163
	public String getLatitude() {
164
		return (String) renvoyerValeurCorrecte("latitude");
165
	}
166
 
167
	public String getLongitude() {
168
		return (String) renvoyerValeurCorrecte("longitude");
169
	}
170
 
60 jpm 171
	public String getTelephone() {
172
		return (String) renvoyerValeurCorrecte("telephone");
173
	}
119 jpm 174
	public void setTelephone(String tel) {
175
		this.set("telephone", tel);
176
	}
60 jpm 177
 
178
	public String getFax() {
179
		return (String) renvoyerValeurCorrecte("fax");
180
	}
119 jpm 181
	public void setFax(String fax) {
182
		this.set("fax", fax);
183
	}
60 jpm 184
 
185
	public String getCourriel() {
186
		return (String) renvoyerValeurCorrecte("courriel");
187
	}
119 jpm 188
	public void setCourriel(String courriel) {
189
		this.set("courriel", courriel);
190
	}
60 jpm 191
 
119 jpm 192
	public String getUrl() {
193
		return (String) renvoyerValeurCorrecte("truk_url");
194
	}
195
	public void setUrl(String url) {
196
		this.set("truk_url", url);
197
	}
198
 
199
	public String getNbrePersonne() {
200
		return (String) renvoyerValeurCorrecte("nbre_personne");
201
	}
202
	public void setNbrePersonne(String nbrePersonne) {
203
		this.set("nbre_personne", nbrePersonne);
204
	}
205
 
60 jpm 206
	public String getConditionAcces() {
207
		return (String) renvoyerValeurCorrecte("condition_acces");
208
	}
119 jpm 209
 
210
	public String getConditionUsage() {
211
		return (String) renvoyerValeurCorrecte("condition_usage");
212
	}
213
 
60 jpm 214
}