Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 474 → Rev 473

/trunk/src/org/tela_botanica/del/client/services/rest/ObservationServiceConcret.java
24,8 → 24,15
private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) {
 
String chaineRequete = "?debut=" + debut + "&limite=" + (fin - debut);
chaineRequete+= infos.versChaineRequete();
if (infos != null && infos.getTaxon() != null && !infos.getTaxon().trim().isEmpty()) {
chaineRequete += "nom_taxon=" + infos.getTaxon() + chaineRequete;
}
if(infos != null && infos.getTriParDate() != null) {
chaineRequete += "&tri=date_observation&ordre="+infos.getTriParDate().toString();
}
 
return chaineRequete;
}
 
}
/trunk/src/org/tela_botanica/del/client/services/rest/ImageServiceConcret.java
47,7 → 47,13
private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) {
 
String chaineRequete = "?debut=" + debut + "&limite=" + (fin - debut);
chaineRequete+= infos.versChaineRequete();
if (infos != null && infos.getTaxon() != null && !infos.getTaxon().trim().isEmpty()) {
chaineRequete += "nom_taxon=" + infos.getTaxon() + chaineRequete;
}
if(infos != null && infos.getTriParDate() != null) {
chaineRequete += "&tri=date_observation&ordre="+infos.getTriParDate().toString();
}
 
return chaineRequete;
}
/trunk/src/org/tela_botanica/del/client/modeles/InformationsRecherche.java
1,7 → 1,5
package org.tela_botanica.del.client.modeles;
 
import com.google.gwt.http.client.URL;
 
public class InformationsRecherche {
 
private String rechercheLibre;
124,27 → 122,4
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();
}
}
/trunk/src/org/tela_botanica/del/client/modeles/ModeTri.java
13,7 → 13,7
},
PAS_DE_TRI {
public String toString() {
return "naturel";
return "";
};
}
}