Subversion Repositories eFlore/Applications.del

Rev

Rev 329 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 329 Rev 335
Line 8... Line 8...
8
import java.util.List;
8
import java.util.List;
Line 9... Line 9...
9
 
9
 
10
import org.tela_botanica.del.client.exceptions.ExceptionClient;
10
import org.tela_botanica.del.client.exceptions.ExceptionClient;
11
import org.tela_botanica.del.client.modeles.Commentaire;
11
import org.tela_botanica.del.client.modeles.Commentaire;
-
 
12
import org.tela_botanica.del.client.modeles.Image;
12
import org.tela_botanica.del.client.modeles.Image;
13
import org.tela_botanica.del.client.modeles.InformationsRecherche;
13
import org.tela_botanica.del.client.modeles.Observation;
14
import org.tela_botanica.del.client.modeles.Observation;
14
import org.tela_botanica.del.client.modeles.PropositionDetermination;
15
import org.tela_botanica.del.client.modeles.PropositionDetermination;
15
import org.tela_botanica.del.client.modeles.Protocole;
16
import org.tela_botanica.del.client.modeles.Protocole;
16
import org.tela_botanica.del.client.modeles.VoteDetermination;
17
import org.tela_botanica.del.client.modeles.VoteDetermination;
Line 236... Line 237...
236
	 * @see
237
	 * @see
237
	 * org.tela_botanica.del.client.utils.ObservationService#getObservations
238
	 * org.tela_botanica.del.client.utils.ObservationService#getObservations
238
	 * (java.util.HashMap)
239
	 * (java.util.HashMap)
239
	 */
240
	 */
240
	@Override
241
	@Override
241
	public List<Observation> getObservations(HashMap<String, String> champsRecherche) {
242
	public List<Observation> getObservations(InformationsRecherche informationsRecherche) {
242
		if (champsRecherche == null) {
243
		if (informationsRecherche == null) {
243
			return getObservations();
244
			return getObservations();
244
		} else {
245
		} else {
245
			int nbResultats = (int) Math.round(Math.random() * 20);
246
			int nbResultats = (int) Math.round(Math.random() * 20);
246
			List<Observation> resultatRecherche = new ArrayList<Observation>();
247
			List<Observation> resultatRecherche = new ArrayList<Observation>();
247
			for (int i = 0; i < nbResultats; i++) {
248
			for (int i = 0; i < nbResultats; i++) {
Line 398... Line 399...
398
		}
399
		}
399
		return instance;
400
		return instance;
400
	}
401
	}
Line 401... Line 402...
401
 
402
 
402
	@Override
403
	@Override
403
	public List<Image> getImagesParTaxon(String taxon, int debut, int fin) {
404
	public List<Image> getImagesParTaxon(InformationsRecherche informationsRecherche, int debut, int fin) {
404
		return MockDatasource.getInstance().getImages(debut, fin);
405
		return MockDatasource.getInstance().getImages(debut, fin);
Line 405... Line 406...
405
	}
406
	}