/trunk/src/org/tela_botanica/del/client/cache/CacheClient.java |
---|
9,6 → 9,8 |
import org.tela_botanica.del.client.modeles.Protocole; |
import org.tela_botanica.del.client.modeles.Utilisateur; |
import com.google.gwt.user.client.Window.Location; |
public class CacheClient { |
private List<Protocole> listeProtocoles; |
34,6 → 36,33 |
instance = this; |
} |
public void initialiserAvecParametres() { |
String rechercheLibre = Location.getParameter("contient"); |
String famille = Location.getParameter("famille"); |
String taxon = Location.getParameter("taxon"); |
String genre = Location.getParameter("genre"); |
String commune = Location.getParameter("commune"); |
String dept = Location.getParameter("dept"); |
String auteur = Location.getParameter("auteur"); |
String date = Location.getParameter("date"); |
String tag = Location.getParameter("tag"); |
InformationsRecherche rechercheParArguments = new InformationsRecherche(); |
rechercheParArguments.setRechercheLibre(rechercheLibre); |
rechercheParArguments.setFamille(famille); |
rechercheParArguments.setTaxon(taxon); |
rechercheParArguments.setGenre(genre); |
rechercheParArguments.setCommune(commune); |
rechercheParArguments.setDepartement(dept); |
rechercheParArguments.setAuteur(auteur); |
rechercheParArguments.setDate(date); |
rechercheParArguments.setTag(tag); |
rechercheParArguments.setMotClef(tag); |
informationsRechercheImage = rechercheParArguments; |
informationsRechercheObservation = rechercheParArguments; |
} |
public Utilisateur getUtilisateur() { |
if (this.utilisateur == null) { |
this.utilisateur = new Utilisateur(null); |
/trunk/src/org/tela_botanica/del/client/Del.java |
---|
1,14 → 1,18 |
package org.tela_botanica.del.client; |
import org.tela_botanica.del.client.cache.CacheClient; |
import org.tela_botanica.del.client.gestionhistorique.GestionnaireHistorique; |
import com.google.gwt.core.client.EntryPoint; |
import com.google.gwt.user.client.History; |
import com.google.gwt.user.client.Window; |
public class Del implements EntryPoint { |
@Override |
public void onModuleLoad() { |
CacheClient.getInstance().initialiserAvecParametres(); |
History.addValueChangeHandler(new GestionnaireHistorique()); |
History.fireCurrentHistoryState(); |
} |
/trunk/src/org/tela_botanica/del/client/modeles/InformationsRecherche.java |
---|
35,7 → 35,9 |
} |
public void setRechercheLibre(String rechercheLibre) { |
this.rechercheLibre = rechercheLibre; |
if (rechercheLibre != null) { |
this.rechercheLibre = rechercheLibre; |
} |
} |
public String getDepartement() { |
43,7 → 45,9 |
} |
public void setDepartement(String departement) { |
this.departement = departement; |
if (departement != null) { |
this.departement = departement; |
} |
} |
public String getTaxon() { |
51,7 → 55,9 |
} |
public void setTaxon(String taxon) { |
this.taxon = taxon; |
if (taxon != null) { |
this.taxon = taxon; |
} |
} |
public String getGenre() { |
59,7 → 65,9 |
} |
public void setGenre(String genre) { |
this.genre = genre; |
if (genre != null) { |
this.genre = genre; |
} |
} |
public String getMotClef() { |
67,7 → 75,9 |
} |
public void setMotClef(String motClef) { |
this.motClef = motClef; |
if (motClef != null) { |
this.motClef = motClef; |
} |
} |
public String getDate() { |
75,7 → 85,9 |
} |
public void setDate(String date) { |
this.date = date; |
if (date != null) { |
this.date = date; |
} |
} |
public String getCommune() { |
83,15 → 95,16 |
} |
public void setCommune(String commune) { |
String[] tableauCommuneDpt = commune.split(" "); |
if (tableauCommuneDpt.length == 2) { |
String dpt = tableauCommuneDpt[1].replaceAll("\\(", "").replaceAll("\\)", ""); |
setDepartement(dpt); |
this.commune = tableauCommuneDpt[0]; |
} else { |
this.commune = commune; |
if (commune != null) { |
String[] tableauCommuneDpt = commune.split(" "); |
if (tableauCommuneDpt.length == 2) { |
String dpt = tableauCommuneDpt[1].replaceAll("\\(", "").replaceAll("\\)", ""); |
setDepartement(dpt); |
this.commune = tableauCommuneDpt[0]; |
} else { |
this.commune = commune; |
} |
} |
} |
public String getFamille() { |
99,7 → 112,9 |
} |
public void setFamille(String famille) { |
this.famille = famille; |
if (famille != null) { |
this.famille = famille; |
} |
} |
public String getTag() { |
107,7 → 122,9 |
} |
public void setTag(String tag) { |
this.tag = tag; |
if (tag != null) { |
this.tag = tag; |
} |
} |
public String getAuteur() { |
115,7 → 132,9 |
} |
public void setAuteur(String auteur) { |
this.auteur = auteur; |
if (auteur != null) { |
this.auteur = auteur; |
} |
} |
public ModeTri getTriParNbVotes() { |