Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 970 → Rev 971

/trunk/src/org/tela_botanica/client/modeles/ListeObservationAsynchroneDAO.java
108,32 → 108,8
if ((observation=reponse.get(i).isObject()) != null) {
String transmis=((JSONString) observation.get("transmission")).stringValue();
String identifiantLocalite=((JSONString) observation.get("ce_zone_geo")).toString();
String nomSaisi=Util.toCelString(((JSONString) observation.get("nom_sel")).toString());
String nomRetenu=Util.toCelString(((JSONString) observation.get("nom_ret")).toString());
String numeroNomenclaturalSaisi=((JSONString) observation.get("nom_sel_nn")).stringValue();
String numeroNomenclaturalRetenu=((JSONString) observation.get("nom_ret_nn")).stringValue();
String numeroTaxonomique=((JSONString) observation.get("nt")).stringValue();
String famille=Util.toCelString(((JSONString) observation .get("famille")).toString());
String localite=Util.toCelString(((JSONString) observation .get("zone_geo")).toString());
String lieudit=Util.toCelString(((JSONString) observation .get("lieudit")).toString());
String station=Util.toCelString(((JSONString) observation .get("station")).toString());
String milieu=Util.toCelString(((JSONString) observation .get("milieu")).toString());
String commentaire=Util.toCelString(((JSONString) observation .get("commentaire")).toString());
String date=((JSONString) observation .get("date_observation")).stringValue();
String numeroOrdre=((JSONString) observation.get("ordre")).stringValue();
String numeroId=((JSONString) observation.get("id_observation")).stringValue();
String coordX=((JSONString) observation.get("latitude")).stringValue();
String coordY=((JSONString) observation.get("longitude")).stringValue();
String motsCles=((JSONString) observation.get("mots_cles")).stringValue();
Observation obs=new Observation(transmis, nomSaisi, nomRetenu, numeroNomenclaturalSaisi, numeroNomenclaturalRetenu ,numeroTaxonomique, famille, localite, identifiantLocalite, lieudit, station, milieu, commentaire, date, numeroOrdre/*, motsCles*/);
obs.setCoordonneeX(coordX);
obs.setCoordonneeY(coordY);
obs.setId(numeroId);
obs.setMotsCles(motsCles);
observationData.put(obs.getNumeroOrdre(),obs);
Observation obs = new Observation(observation);
observationData.put(obs.getNumeroOrdre(),obs);
}
}
} else {
160,21 → 136,21
 
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST,Configuration.getServiceBaseUrl()+ "/InventoryObservationList/" + identifiant + "/" + obs.getNumeroOrdre()+ "/") ;
String postData = "identifiant="
String postData = "ce_utilisateur="
+ identifiant ;
if(obs.getNomSaisi() != null) {
postData += "&nom_sel=" + URL.encodeComponent(obs.getNomSaisi());
}
if(obs.getNumeroNomenclaturalSaisi() != null) {
postData += "&num_nom_sel=" + obs.getNumeroNomenclaturalSaisi();
postData += "&nom_sel_nn=" + obs.getNumeroNomenclaturalSaisi();
}
if(obs.getIdentifiantLocalite() != null) {
postData += "&id_location=" + obs.getIdentifiantLocalite();
postData += "&ce_zone_geo=" + obs.getIdentifiantLocalite();
}
if(obs.getLocalite() != null) {
postData += "&location=" + URL.encodeComponent(obs.getLocalite());
postData += "&zone_geo=" + URL.encodeComponent(obs.getLocalite());
}
if(obs.getDate() != null) {
198,11 → 174,11
}
if(obs.getLatitude() != null ) {
postData += "&coord_x="+URL.encodeComponent(""+obs.getLatitude());
postData += "&latitude="+URL.encodeComponent(""+obs.getLatitude());
}
if(obs.getLongitude() != null) {
postData += "&coord_y="+URL.encodeComponent(""+obs.getLongitude());
postData += "&longitude="+URL.encodeComponent(""+obs.getLongitude());
}
 
try {