Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 176 → Rev 177

/trunk/src/org/tela_botanica/client/modeles/StructureAsyncDao.java
260,6 → 260,7
"&cs_pays =" + URL.encodeComponent(str.getPays()) +
"&cs_telephone =" + URL.encodeComponent(str.getTelephone()) +
"&cs_fax =" + URL.encodeComponent(str.getFax()) +
"&cs_courriel =" + URL.encodeComponent(str.getCourriel()) +
"&cs_truk_url =" + URL.encodeComponent(str.getUrl()) +
"&cs_nbre_personne =" + URL.encodeComponent(str.getNbrePersonne()) +
"";
/trunk/src/org/tela_botanica/client/modeles/Structure.java
14,6 → 14,8
public class Structure extends aDonnee {
public static final String PREFIXE = "cs";
public static final String URL_SITE = "WEB";
public static final String URL_LOGO = "LOGO";
private BaseModelData urls = null;
/**
* Constructeur vide
20,7 → 22,8
*
*/
public Structure() {
// Constructions du tableau des urls interne
urls = new BaseModelData();
}
/**
29,6 → 32,9
* @param image
*/
public Structure(JSONObject institution) {
// Constructions du tableau des urls interne
urls = new BaseModelData();
 
// l'objet JSON est une table de hachage
Set<String> im = institution.keySet();
 
139,14 → 145,14
public Date getDateFondation() {
Date fondationDate = null;
String fondationChaine = (String) renvoyerValeurCorrecte("date_fondation");
if (!fondationChaine.isEmpty()) {
fondationDate = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss").parseStrict(fondationChaine);
if (!fondationChaine.isEmpty() && !fondationChaine.equals("0000-00-00")) {
fondationDate = DateTimeFormat.getFormat("yyyy-MM-dd").parseStrict(fondationChaine);
}
return fondationDate;
}
public void setDateFondation(Date dateFondation) {
if (dateFondation != null) {
this.set("date_fondation", DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss").format(dateFondation));
this.set("date_fondation", DateTimeFormat.getFormat("yyyy-MM-dd").format(dateFondation));
}
}
public void setDateFondation(String dateFondation) {
226,8 → 232,6
return urlsDenormalise;
}
public void setUrl(String urlsDenormalise) {
// Constructions du tableau des urls interne
urls = new BaseModelData();
if (urlsDenormalise != null && !urlsDenormalise.equals("")) {
//GWT.log(urlsDenormalise, null);
String[] tableauUrls = urlsDenormalise.split(";;");
243,7 → 247,9
}
}
public void setUrl(String type, String url) {
urls.set(type, url);
if (url != null) {
urls.set(type, url);
}
}
public String getNbrePersonne() {
263,11 → 269,17
public String toString() {
String sortie = "";
// Champs du BaseModelData
Set<String> proprietes = this.getProperties().keySet();
for (Iterator<String> it = proprietes.iterator(); it.hasNext();) {
String cle = it.next();
sortie += cle+" : "+this.get(cle)+"\n";
}
// Champs spéciaux
sortie += getUrl();
return sortie;
}