Line 1... |
Line 1... |
1 |
package org.tela_botanica.client.modeles.dao;
|
1 |
package org.tela_botanica.client.modeles.dao;
|
Line 2... |
Line -... |
2 |
|
- |
|
3 |
import org.tela_botanica.client.interfaces.FournisseurListe;
|
2 |
|
4 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
3 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
5 |
import org.tela_botanica.client.modeles.objets.Configuration;
|
4 |
import org.tela_botanica.client.modeles.objets.Configuration;
|
6 |
import org.tela_botanica.client.modeles.objets.EntiteGeographiqueObservation;
|
5 |
import org.tela_botanica.client.modeles.objets.EntiteGeographiqueObservation;
|
7 |
import org.tela_botanica.client.modeles.objets.ListeEntiteGeographiqueObservation;
|
6 |
import org.tela_botanica.client.modeles.objets.ListeEntiteGeographiqueObservation;
|
8 |
import org.tela_botanica.client.observation.ObservationModele;
|
7 |
import org.tela_botanica.client.observation.ObservationModele;
|
Line 9... |
Line -... |
9 |
import org.tela_botanica.client.util.Util;
|
- |
|
10 |
|
8 |
import org.tela_botanica.client.util.Util;
|
11 |
import com.google.gwt.core.client.GWT;
|
9 |
|
12 |
import com.google.gwt.http.client.Request;
|
10 |
import com.google.gwt.http.client.Request;
|
13 |
import com.google.gwt.http.client.RequestBuilder;
|
11 |
import com.google.gwt.http.client.RequestBuilder;
|
14 |
import com.google.gwt.http.client.RequestCallback;
|
12 |
import com.google.gwt.http.client.RequestCallback;
|
15 |
import com.google.gwt.http.client.RequestException;
|
13 |
import com.google.gwt.http.client.RequestException;
|
16 |
import com.google.gwt.http.client.Response;
|
14 |
import com.google.gwt.http.client.Response;
|
17 |
import com.google.gwt.json.client.JSONArray;
|
15 |
import com.google.gwt.json.client.JSONArray;
|
18 |
import com.google.gwt.json.client.JSONObject;
|
- |
|
19 |
import com.google.gwt.json.client.JSONParser;
|
16 |
import com.google.gwt.json.client.JSONObject;
|
20 |
import com.google.gwt.json.client.JSONString;
|
- |
|
Line 21... |
Line 17... |
21 |
import com.google.gwt.json.client.JSONValue;
|
17 |
import com.google.gwt.json.client.JSONParser;
|
22 |
import com.google.gwt.user.client.Window;
|
18 |
import com.google.gwt.json.client.JSONValue;
|
23 |
|
19 |
|
24 |
/**
|
20 |
/**
|
Line 63... |
Line 59... |
63 |
|
59 |
|
Line 64... |
Line 60... |
64 |
try {
|
60 |
try {
|
Line -... |
Line 61... |
- |
|
61 |
|
65 |
|
62 |
rb.sendRequest(null, new RequestCallback() {
|
66 |
rb.sendRequest(null, new RequestCallback() {
|
63 |
|
Line 67... |
Line 64... |
67 |
|
64 |
@Override
|
Line -... |
Line 65... |
- |
|
65 |
public void onError(final Request request, final Throwable exception) {
|
68 |
public void onError(final Request request, final Throwable exception) {
|
66 |
// TODO Auto-generated method stub
|
69 |
// TODO Auto-generated method stub
|
67 |
|
Line 70... |
Line 68... |
70 |
|
68 |
}
|
Line 90... |
Line 88... |
90 |
listeEntiteGeographiqueObservation = new ListeEntiteGeographiqueObservation(taillemax);
|
88 |
listeEntiteGeographiqueObservation = new ListeEntiteGeographiqueObservation(taillemax);
|
Line 91... |
Line 89... |
91 |
|
89 |
|
92 |
for (int i = 0; i < taillemax; i++) {
|
90 |
for (int i = 0; i < taillemax; i++) {
|
Line 93... |
Line 91... |
93 |
if ((entites = reponse.get(i).isObject()) != null) {
|
91 |
if ((entites = reponse.get(i).isObject()) != null) {
|
94 |
|
92 |
|
95 |
String idZoneGeo = Util.convertirChaineZoneGeoVersDepartement(((JSONString) entites.get("ce_zone_geo")).stringValue());
|
93 |
String idZoneGeo = Util.convertirChaineZoneGeoVersDepartement(Util.getValeurJsonOuVide(entites, "ce_zone_geo"));
|
96 |
String zoneGeo = ((JSONString) entites.get("zone_geo")).stringValue();
|
94 |
String zoneGeo = Util.getValeurJsonOuVide(entites, "zone_geo");
|
Line 97... |
Line 95... |
97 |
String lieuDit = ((JSONString) entites.get("lieudit")).stringValue();
|
95 |
String lieuDit = Util.getValeurJsonOuVide(entites, "lieudit");
|
98 |
String station = ((JSONString) entites.get("station")).stringValue();
|
96 |
String station = Util.getValeurJsonOuVide(entites, "station");
|
99 |
|
97 |
|
100 |
EntiteGeographiqueObservation ent = new EntiteGeographiqueObservation(idZoneGeo, zoneGeo, lieuDit, station);
|
98 |
EntiteGeographiqueObservation ent = new EntiteGeographiqueObservation(idZoneGeo, zoneGeo, lieuDit, station);
|