Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 972 → Rev 973

/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() : "";
}
 
/**