Subversion Repositories eFlore/Applications.del

Rev

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

Rev 530 Rev 765
Line 24... Line 24...
24
 
24
 
25
		// RequestBuilder rb = new RequestBuilder(RequestBuilder.GET,
25
		// RequestBuilder rb = new RequestBuilder(RequestBuilder.GET,
26
		// serverUrl+"ImagesEflore");
26
		// serverUrl+"ImagesEflore");
27
		// adresse ajoutee temporairement le temps de faire fonctionner le
27
		// adresse ajoutee temporairement le temps de faire fonctionner le
28
		// service d'images eflore
28
		// service d'images eflore
29
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "Images?nom_taxon=" + taxon);
29
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "images?nom_taxon=" + taxon);
30
		try {
30
		try {
31
			rb.sendRequest(null, callback);
31
			rb.sendRequest(null, callback);
32
		} catch (Exception e) {
32
		} catch (Exception e) {
33
			// TODO: handle exception
33
			// TODO: handle exception
34
		}
34
		}
Line 35... Line 35...
35
	}
35
	}
36
 
36
 
37
	@Override
37
	@Override
38
	public void getImagesParTaxon(InformationsRecherche infos, int debut, int fin, ImagesParTaxonCallback callback) {
38
	public void getImagesParTaxon(InformationsRecherche infos, int debut, int fin, ImagesParTaxonCallback callback) {
39
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "Images" + assemblerChaineRequete(infos, debut, fin));
39
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "images" + assemblerChaineRequete(infos, debut, fin));
40
		try {
40
		try {
41
			rb.sendRequest(null, callback);
41
			rb.sendRequest(null, callback);
42
		} catch (Exception e) {
42
		} catch (Exception e) {
43
			// TODO: handle exception
43
			// TODO: handle exception
Line 44... Line 44...
44
		}
44
		}
45
	}
45
	}
46
 
46
 
47
	public void getImagesParObservation(String observationId, ImagesParTaxonCallback callback) {
47
	public void getImagesParObservation(String observationId, ImagesParTaxonCallback callback) {
48
		// TODO implementer avec une methode realiste
48
		// TODO implementer avec une methode realiste
49
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "ImagesPourObservation/"+observationId);
49
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "observations/"+observationId);
50
		try {
50
		try {
51
			rb.sendRequest(null, callback);
51
			rb.sendRequest(null, callback);
52
		} catch (Exception e) {
52
		} catch (Exception e) {
Line 53... Line 53...
53
			// TODO: handle exception
53
			// TODO: handle exception
Line 54... Line 54...
54
		}
54
		}
55
	}
55
	}
Line 56... Line 56...
56
 
56
 
57
	private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) {
57
	private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) {
58
 
58