Line 1... |
Line 1... |
1 |
package org.tela_botanica.client.modeles;
|
1 |
package org.tela_botanica.client.modeles;
|
Line 2... |
Line 2... |
2 |
|
2 |
|
3 |
import org.tela_botanica.client.interfaces.FournisseurListe;
|
3 |
import org.tela_botanica.client.interfaces.FournisseurListe;
|
4 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
4 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
- |
|
5 |
import org.tela_botanica.client.observation.ObservationModele;
|
Line -... |
Line 6... |
- |
|
6 |
import org.tela_botanica.client.util.Util;
|
5 |
import org.tela_botanica.client.observation.ObservationModele;
|
7 |
|
6 |
|
8 |
import com.google.gwt.core.client.GWT;
|
7 |
import com.google.gwt.http.client.Request;
|
9 |
import com.google.gwt.http.client.Request;
|
8 |
import com.google.gwt.http.client.RequestBuilder;
|
10 |
import com.google.gwt.http.client.RequestBuilder;
|
9 |
import com.google.gwt.http.client.RequestCallback;
|
11 |
import com.google.gwt.http.client.RequestCallback;
|
10 |
import com.google.gwt.http.client.RequestException;
|
12 |
import com.google.gwt.http.client.RequestException;
|
- |
|
13 |
import com.google.gwt.http.client.Response;
|
11 |
import com.google.gwt.http.client.Response;
|
14 |
import com.google.gwt.json.client.JSONArray;
|
12 |
import com.google.gwt.json.client.JSONArray;
|
15 |
import com.google.gwt.json.client.JSONObject;
|
13 |
import com.google.gwt.json.client.JSONParser;
|
16 |
import com.google.gwt.json.client.JSONParser;
|
14 |
import com.google.gwt.json.client.JSONString;
|
17 |
import com.google.gwt.json.client.JSONString;
|
Line 76... |
Line 79... |
76 |
|
79 |
|
77 |
|
80 |
|
Line 78... |
Line 81... |
78 |
// si c'est un tableau
|
81 |
// si c'est un tableau
|
79 |
if ((reponse = responseValue.isArray()) != null) {
|
82 |
if ((reponse = responseValue.isArray()) != null) {
|
Line 80... |
Line 83... |
80 |
|
83 |
|
Line 81... |
Line 84... |
81 |
JSONArray entites;
|
84 |
JSONObject entites;
|
82 |
final int taillemax = reponse.size();
|
85 |
final int taillemax = reponse.size();
|
Line 83... |
Line 86... |
83 |
|
86 |
|
84 |
listeEntiteGeographiqueObservation = new ListeEntiteGeographiqueObservation(taillemax);
|
87 |
listeEntiteGeographiqueObservation = new ListeEntiteGeographiqueObservation(taillemax);
|
85 |
|
88 |
|
86 |
for (int i = 0; i < taillemax; i++) {
|
89 |
for (int i = 0; i < taillemax; i++) {
|
Line 87... |
Line 90... |
87 |
if ((entites = reponse.get(i).isArray()) != null) {
|
90 |
if ((entites = reponse.get(i).isObject()) != null) {
|
88 |
|
91 |
|
89 |
String localite = ((JSONString) entites.get(0)).stringValue();
|
92 |
String idZoneGeo = Util.convertirChaineZoneGeoVersDepartement(((JSONString) entites.get("ce_zone_geo")).stringValue());
|
90 |
String commune = ((JSONString) entites.get(1)).stringValue();
|
93 |
String zoneGeo = ((JSONString) entites.get("zone_geo")).stringValue();
|
91 |
String lieuDit = ((JSONString) entites.get(2)).stringValue();
|
94 |
String lieuDit = ((JSONString) entites.get("lieudit")).stringValue();
|