/trunk/src/org/tela_botanica/client/modeles/NomRetenuAsynchroneDao.java |
---|
44,7 → 44,7 |
if ((jsonArray = jsonValue.isArray()) != null) { |
String aname = Util.toCelString(((JSONString) jsonArray.get(0)).toString()); |
String aname = ((JSONString) jsonArray.get(0)).toString(); |
// Nom |
if (aname.compareTo("null")!=0) { |
/trunk/src/org/tela_botanica/client/modeles/ListeReferentielNomAsynchroneDAO.java |
---|
119,9 → 119,9 |
if ((noms=reponse.get(i).isArray()) != null) { |
String nom=Util.toCelString(((JSONString) noms.get(0)).toString()); |
String numeroNom=Util.toCelString(((JSONString) noms.get(1)).toString()); |
String statut=Util.toCelString(((JSONString) noms.get(2)).toString()); |
String nom = ((JSONString) noms.get(0)).toString(); |
String numeroNom = ((JSONString) noms.get(1)).toString(); |
String statut= ((JSONString) noms.get(2)).toString(); |
ReferentielNom nomScientifique=new ReferentielNom(nom, numeroNom, statut); |
/trunk/src/org/tela_botanica/client/modeles/LienImageAsynchroneDAO.java |
---|
12,6 → 12,7 |
import com.google.gwt.http.client.RequestException; |
import com.google.gwt.http.client.Response; |
import com.google.gwt.json.client.JSONArray; |
import com.google.gwt.json.client.JSONObject; |
import com.google.gwt.json.client.JSONParser; |
import com.google.gwt.json.client.JSONString; |
import com.google.gwt.json.client.JSONValue; |
45,7 → 46,7 |
public void obtenirLiaisonsImagesObservations(Rafraichissable r,String id) |
{ |
String paramGet = "&id_image="+id ; |
String paramGet = "id_image="+id ; |
raf = r ; |
71,7 → 72,7 |
// si c'est un tableau |
if ((reponse=responseValue.isArray()) != null) { |
JSONArray observation; |
JSONObject observation; |
final int taillemax = reponse.size(); |
observationData = new ListeObservation(taillemax); |
78,26 → 79,9 |
for (int i = 0; i < taillemax; i++) { |
if ((observation=reponse.get(i).isArray()) != null) { |
if ((observation = reponse.get(i).isObject()) != null) { |
String transmis=((JSONString) observation.get(13)).stringValue(); |
String identifiantLocalite=((JSONString) observation.get(14)).toString(); |
String nomSaisi=Util.toCelString(((JSONString) observation.get(0)).toString()); |
String nomRetenu=Util.toCelString(((JSONString) observation.get(2)).toString()); |
String numeroNomenclaturalSaisi=((JSONString) observation.get(1)).stringValue(); |
String numeroNomenclaturalRetenu=((JSONString) observation.get(3)).stringValue(); |
String numeroTaxonomique=((JSONString) observation.get(4)).stringValue(); |
String famille=Util.toCelString(((JSONString) observation .get(5)).toString()); |
String localite=Util.toCelString(((JSONString) observation .get(6)).toString()); |
String lieudit=Util.toCelString(((JSONString) observation .get(9)).toString()); |
String station=Util.toCelString(((JSONString) observation .get(10)).toString()); |
String milieu=Util.toCelString(((JSONString) observation .get(11)).toString()); |
String commentaire=Util.toCelString(((JSONString) observation .get(12)).toString()); |
String date=((JSONString) observation .get(8)).stringValue(); |
String numeroOrdre=((JSONString) observation.get(7)).stringValue(); |
Observation obs=new Observation(transmis, nomSaisi, nomRetenu, numeroNomenclaturalSaisi, numeroNomenclaturalRetenu ,numeroTaxonomique, famille, localite, identifiantLocalite, lieudit, station, milieu, commentaire, date, numeroOrdre); |
Observation obs= new Observation(observation); |
observationData.put(obs.getNumeroOrdre(),obs); |
} |
} |
122,7 → 106,7 |
public void obtenirLiaisonsObservationsImages(Rafraichissable r,String idObs, String utilisateur) |
{ |
String paramGet = "&id_observation="+idObs ; |
String paramGet = "id_observation="+idObs ; |
raf = r ; |
// et on envoie ça au serveur |
155,10 → 139,10 |
for(int i = 0 ;i<taillemax ;i++) |
{ |
final JSONArray reponseInt = reponse.get(i).isArray(); |
String idImg = ((JSONString)reponseInt.get(0)).stringValue() ; |
String X = ((JSONString)reponseInt.get(1)).stringValue() ; |
String Y = ((JSONString)reponseInt.get(2)).stringValue() ; |
final JSONObject reponseInt = reponse.get(i).isObject(); |
String idImg = ((JSONString)reponseInt.get("id_image")).stringValue() ; |
String X = ((JSONString)reponseInt.get("hauteur")).stringValue() ; |
String Y = ((JSONString)reponseInt.get("largeur")).stringValue() ; |
imgTab[i][0] = idImg ; |
imgTab[i][1] = X ; |
imgTab[i][2] = Y ; |
186,7 → 170,7 |
String postData = ""; |
postData += "&id_image="+idsImages ; |
postData += "id_image="+idsImages ; |
postData += "&id_observation="+idsObs ; |
postData += "&ce_utilisateur="+Utilisateur.getInstance().getIdentifiantUtilisateurConsulte() ; |
240,7 → 224,7 |
Response response) { |
// quand la requête est éxecutée on le signale au modèle |
// poru qu'il mette à jour les données |
// pour qu'il mette à jour les données |
// et en notifie le médiateur |
iModele.requeteTerminee(); |
/trunk/src/org/tela_botanica/client/modeles/UtilisateurAsynchroneDAO.java |
---|
44,7 → 44,6 |
public void getEtatUtilisateur(final Rafraichissable r) { |
// Recherche identifiant utilisateur identifie |
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET,Configuration.getServiceBaseUrl() + "/User/") ; |
try { |
/trunk/src/org/tela_botanica/client/modeles/Observation.java |
---|
85,27 → 85,31 |
public Observation(JSONObject observation) { |
this.transmis=((JSONString) observation.get("transmission")).stringValue(); |
this.identifiantLocalite=((JSONString) observation.get("ce_zone_geo")).toString(); |
this.nomSaisi=Util.toCelString(((JSONString) observation.get("nom_sel")).toString()); |
this.nomRetenu=Util.toCelString(((JSONString) observation.get("nom_ret")).toString()); |
this.numeroNomenclaturalSaisi=((JSONString) observation.get("nom_sel_nn")).stringValue(); |
this.numeroNomenclaturalRetenu=((JSONString) observation.get("nom_ret_nn")).stringValue(); |
this.numeroTaxonomique=((JSONString) observation.get("nt")).stringValue(); |
this.famille=Util.toCelString(((JSONString) observation .get("famille")).toString()); |
this.localite=Util.toCelString(((JSONString) observation .get("zone_geo")).toString()); |
this.lieudit=Util.toCelString(((JSONString) observation .get("lieudit")).toString()); |
this.station=Util.toCelString(((JSONString) observation .get("station")).toString()); |
this.milieu=Util.toCelString(((JSONString) observation .get("milieu")).toString()); |
this.commentaire=Util.toCelString(((JSONString) observation .get("commentaire")).toString()); |
this.date=((JSONString) observation .get("date_observation")).stringValue(); |
this.numeroOrdre=((JSONString) observation.get("ordre")).stringValue(); |
this.id=((JSONString) observation.get("id_observation")).stringValue(); |
this.latitude=((JSONString) observation.get("latitude")).stringValue(); |
this.longitude=((JSONString) observation.get("longitude")).stringValue(); |
this.motsCles=((JSONString) observation.get("mots_cles")).stringValue(); |
this.transmis = getValeurJsonOuVide(observation, "transmission"); |
this.identifiantLocalite = getValeurJsonOuVide(observation, "ce_zone_geo"); |
this.nomSaisi = getValeurJsonOuVide(observation, "nom_sel"); |
this.nomRetenu = (getValeurJsonOuVide(observation,"nom_ret")); |
this.numeroNomenclaturalSaisi = getValeurJsonOuVide(observation,"nom_sel_nn"); |
this.numeroNomenclaturalRetenu = getValeurJsonOuVide(observation,"nom_ret_nn"); |
this.numeroTaxonomique= getValeurJsonOuVide(observation,"nt"); |
this.famille = getValeurJsonOuVide(observation,"famille"); |
this.localite = getValeurJsonOuVide(observation,"zone_geo"); |
this.lieudit = getValeurJsonOuVide(observation,"lieudit"); |
this.station= getValeurJsonOuVide(observation,"station"); |
this.milieu = getValeurJsonOuVide(observation,"milieu"); |
this.commentaire = getValeurJsonOuVide(observation,"commentaire"); |
this.date = getValeurJsonOuVide(observation,"date_observation"); |
this.numeroOrdre = getValeurJsonOuVide(observation,"ordre"); |
this.id = getValeurJsonOuVide(observation,"id_observation"); |
this.latitude = getValeurJsonOuVide(observation,"latitude"); |
this.longitude = getValeurJsonOuVide(observation,"longitude"); |
this.motsCles = getValeurJsonOuVide(observation,"mots_cles"); |
} |
private String getValeurJsonOuVide(JSONObject jo, String index) { |
return (jo.get(index) != null) ? ((JSONString)jo.get(index)).stringValue() : ""; |
} |
/** |