Subversion Repositories eFlore/Applications.del

Rev

Rev 533 | Rev 552 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 533 Rev 545
1
package org.tela_botanica.del.client.composants.moteurrecherche;
1
package org.tela_botanica.del.client.composants.moteurrecherche;
2
 
2
 
3
import org.tela_botanica.del.client.cache.CacheClient;
3
import org.tela_botanica.del.client.cache.CacheClient;
4
import org.tela_botanica.del.client.composants.formulaires.AutoCompletionComboBoxPresenteur;
4
import org.tela_botanica.del.client.composants.formulaires.AutoCompletionComboBoxPresenteur;
5
import org.tela_botanica.del.client.composants.formulaires.AutoCompletionComboBoxVue;
5
import org.tela_botanica.del.client.composants.formulaires.AutoCompletionComboBoxVue;
6
import org.tela_botanica.del.client.composants.presenteur.Presenteur;
6
import org.tela_botanica.del.client.composants.presenteur.Presenteur;
7
import org.tela_botanica.del.client.modeles.InformationsRecherche;
7
import org.tela_botanica.del.client.modeles.InformationsRecherche;
8
import org.tela_botanica.del.client.modeles.ModeRecherche;
8
import org.tela_botanica.del.client.modeles.ModeRecherche;
9
import org.tela_botanica.del.client.utils.UtilitairesAutoCompletionService;
9
import org.tela_botanica.del.client.utils.UtilitairesAutoCompletionService;
10
 
10
 
11
import com.google.gwt.event.dom.client.ClickEvent;
11
import com.google.gwt.event.dom.client.ClickEvent;
12
import com.google.gwt.event.dom.client.ClickHandler;
12
import com.google.gwt.event.dom.client.ClickHandler;
13
import com.google.gwt.event.dom.client.HasClickHandlers;
13
import com.google.gwt.event.dom.client.HasClickHandlers;
14
import com.google.gwt.event.dom.client.HasKeyPressHandlers;
14
import com.google.gwt.event.dom.client.HasKeyPressHandlers;
15
import com.google.gwt.event.dom.client.KeyCodes;
15
import com.google.gwt.event.dom.client.KeyCodes;
16
import com.google.gwt.event.dom.client.KeyPressEvent;
16
import com.google.gwt.event.dom.client.KeyPressEvent;
17
import com.google.gwt.event.dom.client.KeyPressHandler;
17
import com.google.gwt.event.dom.client.KeyPressHandler;
18
import com.google.gwt.http.client.Response;
18
import com.google.gwt.http.client.Response;
19
import com.google.gwt.user.client.ui.HasWidgets;
19
import com.google.gwt.user.client.ui.HasWidgets;
20
import com.google.gwt.user.client.ui.IsWidget;
20
import com.google.gwt.user.client.ui.IsWidget;
21
 
21
 
22
public abstract class MoteurRecherchePresenteur extends Presenteur {
22
public abstract class MoteurRecherchePresenteur extends Presenteur {
23
 
23
 
24
	public abstract interface Vue extends IsWidget {
24
	public abstract interface Vue extends IsWidget {
25
 
-
 
26
		public abstract void ajouterVue(HasWidgets composite);
25
		public void ajouterVue(HasWidgets composite);
27
		public abstract HasClickHandlers getLienRechercheAvancee();
26
		public HasClickHandlers getLienRechercheAvancee();
28
		public abstract void basculerAffichageZoneCache();
27
		public void basculerAffichageZoneCache();
29
		public abstract HasClickHandlers getBoutonRechercheSimple();
28
		public HasClickHandlers getBoutonRechercheSimple();
30
		public abstract HasClickHandlers getBoutonFermer();
29
		public HasClickHandlers getBoutonFermer();
31
		public abstract HasClickHandlers getBoutonVider();
30
		public HasClickHandlers getBoutonVider();
32
		public abstract HasClickHandlers getBoutonRechercheAvancee();
31
		public HasClickHandlers getBoutonRechercheAvancee();
33
		public abstract HasKeyPressHandlers getChampSaisie();
32
		public HasKeyPressHandlers getChampSaisie();
34
		public abstract HasClickHandlers getChampSaisieCliquable();
33
		public HasClickHandlers getChampSaisieCliquable();
35
		public abstract String getValeurRechercheSimple();
34
		public String getValeurRechercheSimple();
36
		public String getLabelRecherche();
35
		public String getLabelRecherche();
37
		public String getContientMots();
36
		public String getContientMots();
38
		public String getDepartement();
37
		public String getDepartement();
39
		public HasWidgets getCommune();
38
		public HasWidgets getCommune();
40
		public HasWidgets getTaxon();
39
		public HasWidgets getTaxon();
41
		public String getFamille();
40
		public String getFamille();
42
		public String getGenre();
41
		public String getGenre();
43
		public String getTag();
42
		public String getTag();
44
		public String getMotCle();
43
		public String getMotCle();
45
		public String getAuteur();
44
		public String getAuteur();
46
		public String getDate();
45
		public String getDate();
47
		public void setValeurRechercheSimple(String valeurRecherche);
46
		public void setValeurRechercheSimple(String valeurRecherche);
48
		public void setContientMots(String mots);
47
		public void setContientMots(String mots);
49
		public void setValeurDepartement(String dpt);
48
		public void setValeurDepartement(String dpt);
50
		public void chargerValeursRecherchePrecedente(InformationsRecherche informationsRecherche);
49
		public void chargerValeursRecherchePrecedente(InformationsRecherche informationsRecherche);
51
		public void focusSaisie();
50
		public void focusSaisie();
52
		public void nettoyer();
51
		public void nettoyer();
53
	}
52
	}
54
 
53
 
55
	private final Vue vue;
54
	private final Vue vue;
56
	private ModeRecherche modeRecherche;
55
	private ModeRecherche modeRecherche;
57
	public enum TypeMoteur {SIMPLE, AVANCEE};
56
	public enum TypeMoteur {SIMPLE, AVANCEE};
58
	private TypeMoteur typeMoteur = TypeMoteur.SIMPLE;
57
	private TypeMoteur typeMoteur = TypeMoteur.SIMPLE;
59
 
58
 
60
	private AutoCompletionComboBoxPresenteur autoCompletionNomTaxonsPresenteur;
59
	private AutoCompletionComboBoxPresenteur completionTaxonsPresenteur;
61
	private AutoCompletionComboBoxPresenteur autoCompletionCommunesPresenteur;
60
	private AutoCompletionComboBoxPresenteur completionCommunesPresenteur;
62
	
-
 
63
	public MoteurRecherchePresenteur(Vue vue, ModeRecherche mode) {
-
 
64
		
-
 
65
		AutoCompletionComboBoxPresenteur completionNomTaxonsPresenteur = new AutoCompletionComboBoxPresenteur(new AutoCompletionComboBoxVue(), UtilitairesAutoCompletionService.urlServiceCompletionNomLocale) {
-
 
66
 
-
 
67
			protected String effectuerPreTraitementChaineRequete(String requete) {
-
 
68
				return UtilitairesAutoCompletionService.effectuerPreTraitementChaineRequeteGenreEspeceSlash(requete);
-
 
69
				// A décommenter lors de l'utilisation des web services eflore
-
 
70
				// return
-
 
71
				// RetourAutoCompletionService.effectuerPreTraitementChaineRequeteGenreEspeceEflore(requete);
-
 
72
			}
-
 
73
 
-
 
74
			@Override
-
 
75
			protected String[] parserResultatRequete(Response response) {
-
 
76
				return UtilitairesAutoCompletionService.parserRetourSimple(response);
-
 
77
				// A décommenter lors de l'utilisation des web services eflore
-
 
78
				// return RetourAutoCompletionService.parserRetourOss(response);
-
 
79
			}
-
 
80
		};
-
 
81
		
-
 
82
		AutoCompletionComboBoxPresenteur completionCommunesPresenteur = new AutoCompletionComboBoxPresenteur(new AutoCompletionComboBoxVue(), UtilitairesAutoCompletionService.urlServiceCompletionCommunes) {
-
 
83
 
-
 
84
			protected String effectuerPreTraitementChaineRequete(String requete) {
-
 
85
				return requete;
-
 
86
			}
-
 
87
			
-
 
88
			@Override
-
 
89
			protected void surSelectionSuggestion(String suggestion) {
-
 
90
				String[] tableauCommuneDpt = suggestion.split(" ");
-
 
91
				if(tableauCommuneDpt.length == 2) {
-
 
92
					String dpt = tableauCommuneDpt[1].replaceAll("\\(", "").replaceAll("\\)", "");
-
 
93
					getVue().setValeurDepartement(dpt);
-
 
94
					setValeur(tableauCommuneDpt[0]);
-
 
95
				}
-
 
96
			}
-
 
97
 
-
 
98
			@Override
-
 
99
			protected String[] parserResultatRequete(Response response) {
-
 
100
				return UtilitairesAutoCompletionService.parserRetourSimple(response);
-
 
101
			}
61
	
102
		};
62
	public MoteurRecherchePresenteur(Vue vue, ModeRecherche mode) {
103
		this.vue = vue;
-
 
104
		setMode(mode);
63
		this.vue = vue;
105
 
64
		setMode(mode);
106
		autoCompletionCommunesPresenteur = completionCommunesPresenteur;
65
		this.creerCompletionTaxons();
107
		autoCompletionNomTaxonsPresenteur = completionNomTaxonsPresenteur;
66
		this.creerCompletionCommunes();
108
		gererEvenements();
67
		gererEvenements();
109
	}
68
	}
110
	
69
	
111
	public MoteurRecherchePresenteur(AutoCompletionComboBoxPresenteur presenteurAutoCompletionTaxon, 
70
	public MoteurRecherchePresenteur(AutoCompletionComboBoxPresenteur presenteurAutoCompletionTaxon, 
112
									AutoCompletionComboBoxPresenteur presenteurAutoCompletionCommunes,
71
									AutoCompletionComboBoxPresenteur presenteurAutoCompletionCommunes,
113
									Vue vue, ModeRecherche mode) {
72
									Vue vue, ModeRecherche mode) {
114
		this.vue = vue;
73
		this.vue = vue;
115
		setMode(mode);
74
		setMode(mode);
116
		autoCompletionNomTaxonsPresenteur = presenteurAutoCompletionTaxon;
75
		completionTaxonsPresenteur = presenteurAutoCompletionTaxon;
117
		autoCompletionCommunesPresenteur = presenteurAutoCompletionCommunes;
76
		completionCommunesPresenteur = presenteurAutoCompletionCommunes;
118
		gererEvenements();
77
		gererEvenements();
119
	}
78
	}
120
	
79
	
121
	private Vue getVue() {
80
	private Vue getVue() {
122
		return vue;
81
		return vue;
123
	}
82
	}
124
	
83
	
125
	public ModeRecherche getMode() {
84
	public ModeRecherche getMode() {
126
		return modeRecherche;
85
		return modeRecherche;
127
	}
86
	}
128
	
87
	
129
	private void setMode(ModeRecherche mode) {
88
	private void setMode(ModeRecherche mode) {
130
		modeRecherche = mode;
89
		modeRecherche = mode;
131
	}
90
	}
132
	
91
	
133
	public void setTypeMoteur(TypeMoteur typeMoteur) {
92
	public void setTypeMoteur(TypeMoteur typeMoteur) {
134
		this.typeMoteur = typeMoteur;
93
		this.typeMoteur = typeMoteur;
135
	}
94
	}
136
 
95
 
137
	public boolean estPourRechercheImages() {
96
	public boolean estPourRechercheImages() {
138
		return (modeRecherche == ModeRecherche.MODE_IMAGE);
97
		return (modeRecherche == ModeRecherche.MODE_IMAGE);
139
	}
98
	}
140
 
99
 
141
	public boolean estPourRechercheObservations() {
100
	public boolean estPourRechercheObservations() {
142
		return (modeRecherche == ModeRecherche.MODE_OBSERVATION);
101
		return (modeRecherche == ModeRecherche.MODE_OBSERVATION);
143
	}	
102
	}	
-
 
103
 
-
 
104
	private void creerCompletionTaxons() {
-
 
105
		completionTaxonsPresenteur = new AutoCompletionComboBoxPresenteur(new AutoCompletionComboBoxVue(), UtilitairesAutoCompletionService.urlServiceCompletionNomLocale) {
-
 
106
			protected String effectuerPreTraitementChaineRequete(String requete) {
-
 
107
				return UtilitairesAutoCompletionService.effectuerPreTraitementChaineRequeteGenreEspeceSlash(requete);
-
 
108
				// A décommenter lors de l'utilisation des web services eflore
-
 
109
				// return
-
 
110
				// RetourAutoCompletionService.effectuerPreTraitementChaineRequeteGenreEspeceEflore(requete);
-
 
111
			}
-
 
112
 
-
 
113
			@Override
-
 
114
			protected String[] parserResultatRequete(Response response) {
-
 
115
				return UtilitairesAutoCompletionService.parserRetourSimple(response);
-
 
116
				// A décommenter lors de l'utilisation des web services eflore
-
 
117
				// return RetourAutoCompletionService.parserRetourOss(response);
-
 
118
			}
-
 
119
		};
-
 
120
	}
-
 
121
	
-
 
122
	private void creerCompletionCommunes() {
-
 
123
		completionCommunesPresenteur = new AutoCompletionComboBoxPresenteur(new AutoCompletionComboBoxVue(), UtilitairesAutoCompletionService.urlServiceCompletionCommunes) {
-
 
124
			protected String effectuerPreTraitementChaineRequete(String requete) {
-
 
125
				return requete;
-
 
126
			}
-
 
127
			
-
 
128
			@Override
-
 
129
			protected void surSelectionSuggestion(String suggestion) {
-
 
130
				String[] tableauCommuneDpt = suggestion.split(" ");
-
 
131
				if(tableauCommuneDpt.length == 2) {
-
 
132
					String dpt = tableauCommuneDpt[1].replaceAll("\\(", "").replaceAll("\\)", "");
-
 
133
					getVue().setValeurDepartement(dpt);
-
 
134
					setValeur(tableauCommuneDpt[0]);
-
 
135
				}
-
 
136
			}
-
 
137
 
-
 
138
			@Override
-
 
139
			protected String[] parserResultatRequete(Response response) {
-
 
140
				return UtilitairesAutoCompletionService.parserRetourSimple(response);
-
 
141
			}
-
 
142
		};
-
 
143
	}
144
 
144
	
145
	@Override
145
	@Override
146
	public void go(HasWidgets composite) {
146
	public void go(HasWidgets composite) {
147
		afficherRequeteEtLancerRecherche();
147
		afficherRequeteEtLancerRecherche();
148
		autoCompletionNomTaxonsPresenteur.go(vue.getTaxon());
148
		completionTaxonsPresenteur.go(vue.getTaxon());
149
		autoCompletionCommunesPresenteur.go(vue.getCommune());
149
		completionCommunesPresenteur.go(vue.getCommune());
150
		vue.ajouterVue(composite);
150
		vue.ajouterVue(composite);
151
		vue.focusSaisie();
151
		vue.focusSaisie();
152
	}
152
	}
153
 
153
 
154
	@Override
154
	@Override
155
	protected void gererEvenements() {
155
	protected void gererEvenements() {
156
		vue.getLienRechercheAvancee().addClickHandler(new ClickHandler() {
156
		vue.getLienRechercheAvancee().addClickHandler(new ClickHandler() {
157
			public void onClick(ClickEvent event) {
157
			public void onClick(ClickEvent event) {
158
				vue.setContientMots(vue.getValeurRechercheSimple());
158
				vue.setContientMots(vue.getValeurRechercheSimple());
159
				vue.basculerAffichageZoneCache();
159
				vue.basculerAffichageZoneCache();
160
			}
160
			}
161
		});
161
		});
162
 
162
 
163
		vue.getBoutonRechercheSimple().addClickHandler(new ClickHandler() {
163
		vue.getBoutonRechercheSimple().addClickHandler(new ClickHandler() {
164
			public void onClick(ClickEvent event) {
164
			public void onClick(ClickEvent event) {
165
				setTypeMoteur(TypeMoteur.SIMPLE);
165
				setTypeMoteur(TypeMoteur.SIMPLE);
166
				collecterInfosRecherche();
166
				collecterInfosRecherche();
167
				afficherRequeteEtLancerRecherche();
167
				afficherRequeteEtLancerRecherche();
168
			}
168
			}
169
		});
169
		});
170
 
170
 
171
		vue.getBoutonFermer().addClickHandler(new ClickHandler() {
171
		vue.getBoutonFermer().addClickHandler(new ClickHandler() {
172
			public void onClick(ClickEvent event) {
172
			public void onClick(ClickEvent event) {
173
				vue.setValeurRechercheSimple(vue.getContientMots());
173
				vue.setValeurRechercheSimple(vue.getContientMots());
174
				vue.basculerAffichageZoneCache();
174
				vue.basculerAffichageZoneCache();
175
			}
175
			}
176
		});
176
		});
177
 
177
 
178
		vue.getBoutonVider().addClickHandler(new ClickHandler() {
178
		vue.getBoutonVider().addClickHandler(new ClickHandler() {
179
			public void onClick(ClickEvent event) {
179
			public void onClick(ClickEvent event) {
180
				nettoyerChamps();
180
				nettoyerChamps();
181
				InformationsRecherche infosRecherche = new InformationsRecherche();
181
				InformationsRecherche infosRecherche = new InformationsRecherche();
182
				if (estPourRechercheImages()) {
182
				if (estPourRechercheImages()) {
183
					CacheClient.getInstance().setInformationsRechercheImage(infosRecherche);
183
					CacheClient.getInstance().setInformationsRechercheImage(infosRecherche);
184
				} else if (estPourRechercheObservations()) {
184
				} else if (estPourRechercheObservations()) {
185
					CacheClient.getInstance().setInformationsRechercheObservation(infosRecherche);
185
					CacheClient.getInstance().setInformationsRechercheObservation(infosRecherche);
186
				}
186
				}
187
			}
187
			}
188
		});
188
		});
189
 
189
 
190
		vue.getBoutonRechercheAvancee().addClickHandler(new ClickHandler() {
190
		vue.getBoutonRechercheAvancee().addClickHandler(new ClickHandler() {
191
			public void onClick(ClickEvent event) {
191
			public void onClick(ClickEvent event) {
192
				setTypeMoteur(TypeMoteur.AVANCEE);
192
				setTypeMoteur(TypeMoteur.AVANCEE);
193
				collecterInfosRecherche();
193
				collecterInfosRecherche();
194
				vue.basculerAffichageZoneCache();
194
				vue.basculerAffichageZoneCache();
195
				afficherRequeteEtLancerRecherche();
195
				afficherRequeteEtLancerRecherche();
196
			}
196
			}
197
		});
197
		});
198
 
198
 
199
		vue.getChampSaisie().addKeyPressHandler(new KeyPressHandler() {
199
		vue.getChampSaisie().addKeyPressHandler(new KeyPressHandler() {
200
			public void onKeyPress(KeyPressEvent event) {
200
			public void onKeyPress(KeyPressEvent event) {
201
				if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
201
				if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
202
					setTypeMoteur(TypeMoteur.SIMPLE);
202
					setTypeMoteur(TypeMoteur.SIMPLE);
203
					collecterInfosRecherche();
203
					collecterInfosRecherche();
204
					afficherRequeteEtLancerRecherche();
204
					afficherRequeteEtLancerRecherche();
205
				}
205
				}
206
			}
206
			}
207
		});
207
		});
208
 
208
 
209
		vue.getChampSaisieCliquable().addClickHandler(new ClickHandler() {
209
		vue.getChampSaisieCliquable().addClickHandler(new ClickHandler() {
210
			public void onClick(ClickEvent event) {
210
			public void onClick(ClickEvent event) {
211
				if (vue.getValeurRechercheSimple().equals(vue.getLabelRecherche())) {
211
				if (vue.getValeurRechercheSimple().equals(vue.getLabelRecherche())) {
212
					vue.setValeurRechercheSimple("");
212
					vue.setValeurRechercheSimple("");
213
				}
213
				}
214
			}
214
			}
215
		});
215
		});
216
	}
216
	}
217
	
217
	
218
	private void nettoyerChamps() {
218
	private void nettoyerChamps() {
219
		autoCompletionCommunesPresenteur.nettoyer();
219
		completionCommunesPresenteur.nettoyer();
220
		autoCompletionNomTaxonsPresenteur.nettoyer();
220
		completionTaxonsPresenteur.nettoyer();
221
		vue.nettoyer();
221
		vue.nettoyer();
222
	}
222
	}
223
 
223
 
224
	public void collecterInfosRecherche() {
224
	public void collecterInfosRecherche() {
225
		InformationsRecherche informationRecherche = new InformationsRecherche();
225
		InformationsRecherche informationRecherche = new InformationsRecherche();
226
		informationRecherche.setTaxon(autoCompletionNomTaxonsPresenteur.getValeur());
-
 
227
		informationRecherche.setDepartement(vue.getDepartement());
-
 
228
		informationRecherche.setCommune(autoCompletionCommunesPresenteur.getValeur());
-
 
229
		informationRecherche.setFamille(vue.getFamille());
-
 
230
		informationRecherche.setGenre(vue.getGenre());
-
 
231
		informationRecherche.setTag(vue.getTag());
-
 
232
		informationRecherche.setMotClef(vue.getMotCle());
-
 
233
		informationRecherche.setAuteur(vue.getAuteur());
-
 
234
		informationRecherche.setDate(vue.getDate());
-
 
235
		informationRecherche.setRechercheLibre(this.getRechercheLibre());
226
		informationRecherche.setRechercheLibre(this.getRechercheLibre());
-
 
227
		if (this.typeMoteur == TypeMoteur.AVANCEE) {
-
 
228
			informationRecherche.setTaxon(completionTaxonsPresenteur.getValeur());
-
 
229
			informationRecherche.setDepartement(vue.getDepartement());
-
 
230
			informationRecherche.setCommune(completionCommunesPresenteur.getValeur());
-
 
231
			informationRecherche.setFamille(vue.getFamille());
-
 
232
			informationRecherche.setGenre(vue.getGenre());
-
 
233
			informationRecherche.setTag(vue.getTag());
-
 
234
			informationRecherche.setMotClef(vue.getMotCle());
-
 
235
			informationRecherche.setAuteur(vue.getAuteur());
-
 
236
			informationRecherche.setDate(vue.getDate());
-
 
237
		}
236
 
238
 
237
		if (estPourRechercheImages()) {
239
		if (estPourRechercheImages()) {
238
			CacheClient.getInstance().setPageCouranteRechercheImages(1);
240
			CacheClient.getInstance().setPageCouranteRechercheImages(1);
239
			CacheClient.getInstance().setInformationsRechercheImage(informationRecherche);
241
			CacheClient.getInstance().setInformationsRechercheImage(informationRecherche);
240
		} else if (estPourRechercheObservations()) {
242
		} else if (estPourRechercheObservations()) {
241
			CacheClient.getInstance().setPageCouranteRechercheObservations(1);
243
			CacheClient.getInstance().setPageCouranteRechercheObservations(1);
242
			CacheClient.getInstance().setInformationsRechercheObservation(informationRecherche);
244
			CacheClient.getInstance().setInformationsRechercheObservation(informationRecherche);
243
		}
245
		}
244
	}
246
	}
245
	
247
	
246
	private String getRechercheLibre() {
248
	private String getRechercheLibre() {
247
		String rechercheLibre = "";
249
		String rechercheLibre = "";
248
		switch (this.typeMoteur) {
250
		switch (this.typeMoteur) {
249
			case SIMPLE : 
251
			case SIMPLE : 
250
				rechercheLibre = vue.getValeurRechercheSimple();
252
				rechercheLibre = vue.getValeurRechercheSimple();
251
				break;
253
				break;
252
			case AVANCEE : 
254
			case AVANCEE : 
253
				rechercheLibre = vue.getContientMots();
255
				rechercheLibre = vue.getContientMots();
254
				break;
256
				break;
255
			default:
257
			default:
256
				// TODO : voir comment gérer les exceptions proprement
258
				// TODO : voir comment gérer les exceptions proprement
257
				//throw new Exception("Le type de moteur de recherche indiqué n'est pas disponilbe");
259
				//throw new Exception("Le type de moteur de recherche indiqué n'est pas disponilbe");
258
		}
260
		}
259
		return rechercheLibre;
261
		return rechercheLibre;
260
	}
262
	}
261
 
263
 
262
	private InformationsRecherche getInformationsRechercheEnCache() {
264
	private InformationsRecherche getInformationsRechercheEnCache() {
263
		if (estPourRechercheImages()) {
265
		if (estPourRechercheImages()) {
264
			return CacheClient.getInstance().getInformationsRechercheImage();
266
			return CacheClient.getInstance().getInformationsRechercheImage();
265
		} else if (estPourRechercheObservations()) {
267
		} else if (estPourRechercheObservations()) {
266
			return CacheClient.getInstance().getInformationsRechercheObservation();
268
			return CacheClient.getInstance().getInformationsRechercheObservation();
267
		}
269
		}
268
		return null;
270
		return null;
269
	}
271
	}
270
 
272
 
271
	public void afficherRequeteEtLancerRecherche() {
273
	public void afficherRequeteEtLancerRecherche() {
272
		InformationsRecherche informationsRecherche = getInformationsRechercheEnCache();
274
		InformationsRecherche informationsRecherche = getInformationsRechercheEnCache();
273
		if (informationsRecherche != null) {
275
		if (informationsRecherche != null) {
274
			autoCompletionNomTaxonsPresenteur.setValeur(informationsRecherche.getTaxon());
276
			completionTaxonsPresenteur.setValeur(informationsRecherche.getTaxon());
275
			vue.chargerValeursRecherchePrecedente(informationsRecherche);
277
			vue.chargerValeursRecherchePrecedente(informationsRecherche);
276
		}
278
		}
277
		lancerRecherche();
279
		lancerRecherche();
278
	}
280
	}
279
 
281
 
280
	public abstract void lancerRecherche();
282
	public abstract void lancerRecherche();
281
}
283
}