Subversion Repositories eFlore/Applications.coel

Rev

Rev 1329 | Rev 1415 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1329 Rev 1369
Line 1... Line 1...
1
package org.tela_botanica.client.modeles.structure;
1
package org.tela_botanica.client.modeles.structure;
Line 2... Line 2...
2
 
2
 
3
import java.util.Date;
3
import java.util.Date;
-
 
4
import java.util.Iterator;
4
import java.util.Iterator;
5
import java.util.Map;
Line 5... Line 6...
5
import java.util.Set;
6
import java.util.Set;
6
 
7
 
7
import org.tela_botanica.client.modeles.aDonnee;
8
import org.tela_botanica.client.modeles.aDonnee;
Line 32... Line 33...
32
		urls = new BaseModelData();
33
		urls = new BaseModelData();
33
	}
34
	}
Line 34... Line 35...
34
	
35
	
35
	public Structure(ModelData model)
36
	public Structure(ModelData model)
36
	{		
37
	{		
-
 
38
		Map<String, Object> a = model.getProperties();
-
 
39
 
-
 
40
		Set<String> cles = a.keySet();
-
 
41
		Iterator<String> it = cles.iterator();
-
 
42
		while (it.hasNext()) {
-
 
43
			String cle = it.next();			
-
 
44
			if (a.get(cle) != null) {
37
		this.set("id_structure", model.get("cs_id_structure"));
45
				String cleObjet = cle.replaceFirst("^"+getPrefixe()+"_", "");
-
 
46
				this.set(cleObjet, a.get(cle));
-
 
47
			}
38
		this.set("nom", model.get("cs_nom"));
48
		}
Line 39... Line 49...
39
	}
49
	}
40
	
50
	
41
	public Structure(JSONObject institution) {
51
	public Structure(JSONObject institution) {
Line 147... Line 157...
147
	}
157
	}
148
	public void setTypePublic(String typePublic) {
158
	public void setTypePublic(String typePublic) {
149
		this.set("ce_truk_type_public", typePublic);
159
		this.set("ce_truk_type_public", typePublic);
150
	}
160
	}
Line -... Line 161...
-
 
161
	
-
 
162
	public String getAbreviationProjet() {
-
 
163
		return renvoyerValeurCorrecte("_abreviationprojet_");
-
 
164
	}
-
 
165
	public void setAbreviationProjet(String abreviation) {
-
 
166
		this.set("_abreviationprojet_", abreviation);
-
 
167
	}
151
	
168
	
152
	public String getAdresse() {
169
	public String getAdresse() {
153
		return (String) renvoyerValeurCorrecte("adresse_01");
170
		return (String) renvoyerValeurCorrecte("adresse_01");
154
	}
171
	}
155
	public void setAdresse(String adr) {
172
	public void setAdresse(String adr) {
Line 233... Line 250...
233
	}
250
	}
Line 234... Line 251...
234
	
251
	
235
	public String getRegion() {
252
	public String getRegion() {
236
		return getChaineDenormaliseUnique("ce_truk_region");
253
		return getChaineDenormaliseUnique("ce_truk_region");
237
	}
-
 
238
	
254
	}
239
	public void setRegion(String region) {
255
	public void setRegion(String region) {
240
		this.set("ce_truk_region", region);
256
		this.set("ce_truk_region", region);
Line 241... Line 257...
241
	}
257
	}
Line 309... Line 325...
309
		Set<String> proprietes = urls.getProperties().keySet();
325
		Set<String> proprietes = urls.getProperties().keySet();
310
		for (Iterator<String> it = proprietes.iterator(); it.hasNext();) {
326
		for (Iterator<String> it = proprietes.iterator(); it.hasNext();) {
311
			String cle = it.next();
327
			String cle = it.next();
312
			urlsDenormalise += cle+"##"+urls.get(cle)+";;";
328
			urlsDenormalise += cle+"##"+urls.get(cle)+";;";
313
		}
329
		}
314
		urlsDenormalise.replaceFirst(";;$", "");
330
		urlsDenormalise = urlsDenormalise.replaceFirst(";;$", "");
315
		return urlsDenormalise;
331
		return urlsDenormalise;
316
	}
332
	}
317
	public void setUrl(String urlsDenormalise) {
333
	public void setUrl(String urlsDenormalise) {
318
		if (urlsDenormalise != null && !urlsDenormalise.equals("")) {
334
		if (urlsDenormalise != null && !urlsDenormalise.equals("")) {
319
			//GWT.log(urlsDenormalise, null);
335
			//GWT.log(urlsDenormalise, null);