Subversion Repositories eFlore/Applications.del

Rev

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

Rev 374 Rev 392
Line 21... Line 21...
21
import org.tela_botanica.del.client.services.rest.ObservationService;
21
import org.tela_botanica.del.client.services.rest.ObservationService;
22
import org.tela_botanica.del.client.services.rest.PropositionDeterminationService;
22
import org.tela_botanica.del.client.services.rest.PropositionDeterminationService;
23
import org.tela_botanica.del.client.services.rest.ProtocoleService;
23
import org.tela_botanica.del.client.services.rest.ProtocoleService;
24
import org.tela_botanica.del.client.services.rest.VoteProtocoleService;
24
import org.tela_botanica.del.client.services.rest.VoteProtocoleService;
25
import org.tela_botanica.del.client.services.rest.async.ImagesParTaxonCallback;
25
import org.tela_botanica.del.client.services.rest.async.ImagesParTaxonCallback;
-
 
26
import org.tela_botanica.del.client.services.rest.async.ObservationsCallback;
Line 26... Line 27...
26
 
27
 
Line 27... Line 28...
27
public class MockDatasource implements ObservationService, ImageService, ProtocoleService, VoteProtocoleService, PropositionDeterminationService {
28
public class MockDatasource implements ObservationService, ImageService, ProtocoleService, VoteProtocoleService, PropositionDeterminationService {
Line 234... Line 235...
234
	}
235
	}
Line 235... Line 236...
235
 
236
 
236
	/*
237
	/*
237
	 * (non-Javadoc)
238
	 * (non-Javadoc)
238
	 * 
-
 
239
	 * @see
-
 
240
	 * org.tela_botanica.del.client.utils.ObservationService#getObservations
-
 
241
	 * (java.util.HashMap)
-
 
242
	 */
-
 
243
	@Override
-
 
244
	public ObservationServiceResultat getObservations(InformationsRecherche informationsRecherche, int debut, int fin) {
-
 
245
 
-
 
246
		ObservationServiceResultat resultat = new ObservationServiceResultat();
-
 
247
		resultat.setNbTotalObservationsPourLaRecherche(observations.size());
-
 
248
		resultat.setObservations(getObservations(debut, fin));
-
 
249
		return resultat;
-
 
250
 
-
 
251
		// if (informationsRecherche == null) {
-
 
252
		// return getObservations(debut, fin);
-
 
253
		// } else {
-
 
254
		// int nbResultats = fin - debut;
-
 
255
		// List<Observation> resultatRecherche = new ArrayList<Observation>();
-
 
256
		// for (int i = 0; i < nbResultats; i++) {
-
 
257
		// int numeroResultat = (int) Math.round(Math.random() *
-
 
258
		// (observations.size() - 1));
-
 
259
		// resultatRecherche.add(observations.get(numeroResultat));
-
 
260
		// }
-
 
261
		// return resultatRecherche;
-
 
262
		// }
-
 
263
	}
-
 
264
 
-
 
265
	/*
-
 
266
	 * (non-Javadoc)
-
 
267
	 * 
239
	 * 
268
	 * @see org.tela_botanica.del.client.utils.ObservationService#getImages()
240
	 * @see org.tela_botanica.del.client.utils.ObservationService#getImages()
269
	 */
241
	 */
270
	public List<Image> getImages(int debut, int fin) {
242
	public List<Image> getImages(int debut, int fin) {
271
		List<Image> sousListe = new ArrayList<Image>();
243
		List<Image> sousListe = new ArrayList<Image>();
Line 437... Line 409...
437
	public void getImagesParTaxon(InformationsRecherche informationsRecherche, int debut, int fin, ImagesParTaxonCallback callback) {
409
	public void getImagesParTaxon(InformationsRecherche informationsRecherche, int debut, int fin, ImagesParTaxonCallback callback) {
438
		// TODO Auto-generated method stub
410
		// TODO Auto-generated method stub
Line 439... Line 411...
439
 
411
 
Line -... Line 412...
-
 
412
	}
-
 
413
 
-
 
414
	@Override
-
 
415
	public ObservationServiceResultat getObservations(
-
 
416
			InformationsRecherche informationsRecherche, int debut, int fin,
-
 
417
			ObservationsCallback callback) {
-
 
418
		// TODO Auto-generated method stub
-
 
419
		return null;
440
	}
420
	}