Subversion Repositories eFlore/Applications.del

Rev

Rev 445 | Rev 474 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 445 Rev 466
Line 34... Line 34...
34
		}
34
		}
35
	}
35
	}
Line 36... Line 36...
36
 
36
 
37
	public void getImagesParObservation(String observationId, ImagesParTaxonCallback callback) {
37
	public void getImagesParObservation(String observationId, ImagesParTaxonCallback callback) {
-
 
38
		// TODO implementer avec une methode realiste
-
 
39
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, serverUrl + "ImagesPourObservation/"+observationId);
38
		// TODO implementer avec une methode realiste
40
		try {
-
 
41
			rb.sendRequest(null, callback);
-
 
42
		} catch (Exception e) {
-
 
43
			// TODO: handle exception
39
		getImagesEfloreParTaxon("", callback);
44
		}
Line 40... Line 45...
40
	}
45
	}
Line 41... Line 46...
41
 
46
 
42
	private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) {
47
	private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) {
43
 
48
 
44
		String chaineRequete = "?debut=" + debut + "&limite=" + (fin - debut);
49
		String chaineRequete = "?debut=" + debut + "&limite=" + (fin - debut);
-
 
50
		if (infos != null && infos.getTaxon() != null && !infos.getTaxon().trim().isEmpty()) {
-
 
51
			chaineRequete += "nom_taxon=" + infos.getTaxon() + chaineRequete;
-
 
52
		}
-
 
53
		
Line 45... Line 54...
45
		if (infos != null && infos.getTaxon() != null && !infos.getTaxon().trim().isEmpty()) {
54
		if(infos != null && infos.getTriParDate() != null) {
46
			chaineRequete += "nom_taxon=" + infos.getTaxon() + chaineRequete;
55
			chaineRequete += "&tri=date_observation&ordre="+infos.getTriParDate().toString();
47
		}
56
		}