Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 473 → Rev 474

/trunk/src/org/tela_botanica/del/client/modeles/InformationsRecherche.java
1,5 → 1,7
package org.tela_botanica.del.client.modeles;
 
import com.google.gwt.http.client.URL;
 
public class InformationsRecherche {
 
private String rechercheLibre;
122,4 → 124,27
this.triParDate = triParDate;
}
 
public String versChaineRequete() {
String chaine = "";
chaine += estNonNull(rechercheLibre) ? "&recherche="+URL.encode(rechercheLibre) : "" ;
chaine += estNonNull(departement) ? "&dpt="+URL.encode(departement) : "" ;
chaine += estNonNull(taxon) ? "&taxon="+URL.encode(taxon) : "" ;
chaine += estNonNull(genre) ? "&genre="+URL.encode(genre) : "" ;
chaine += estNonNull(motClef) ? "&mot_cle="+URL.encode(motClef) : "" ;
chaine += estNonNull(date) ? "&date_observation="+URL.encode(date) : "" ;
chaine += estNonNull(commune) ? "&commune="+URL.encode(commune) : "" ;
chaine += estNonNull(famille) ? "&famille="+URL.encode(famille) : "" ;
chaine += estNonNull(tag) ? "&tag="+URL.encode(tag) : "" ;
chaine += estNonNull(auteur) ? "&auteur="+URL.encode(auteur) : "" ;
chaine += triParDate != ModeTri.PAS_DE_TRI ? "&tri=date_observation" : "" ;
chaine += triParNbVotes != ModeTri.PAS_DE_TRI ? "&tri=nb_votes" : "" ;
chaine += triParDate != ModeTri.PAS_DE_TRI ? "&ordre="+triParDate : "" ;
chaine += triParNbVotes != ModeTri.PAS_DE_TRI ? "&ordre="+triParNbVotes : "" ;
 
return chaine;
}
private boolean estNonNull(String critere) {
return critere != null && !critere.trim().isEmpty();
}
}