Subversion Repositories eFlore/Applications.del

Rev

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

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