3,7 → 3,6 |
import org.tela_botanica.client.util.Util; |
|
import com.google.gwt.json.client.JSONObject; |
import com.google.gwt.json.client.JSONString; |
|
|
public class Observation { |
84,34 → 83,28 |
} |
|
public Observation(JSONObject observation) { |
this.transmis = Util.getValeurJsonOuVide(observation, "transmission"); |
this.identifiantLocalite = Util.getValeurJsonOuVide(observation, "ce_zone_geo"); |
this.nomSaisi = Util.getValeurJsonOuVide(observation, "nom_sel"); |
this.nomRetenu = (Util.getValeurJsonOuVide(observation,"nom_ret")); |
this.numeroNomenclaturalSaisi = Util.getValeurJsonOuVide(observation,"nom_sel_nn"); |
this.numeroNomenclaturalRetenu = Util.getValeurJsonOuVide(observation,"nom_ret_nn"); |
this.numeroTaxonomique= Util.getValeurJsonOuVide(observation,"nt"); |
this.famille = Util.getValeurJsonOuVide(observation,"famille"); |
this.localite = Util.getValeurJsonOuVide(observation,"zone_geo"); |
this.lieudit = Util.getValeurJsonOuVide(observation,"lieudit"); |
this.station= Util.getValeurJsonOuVide(observation,"station"); |
this.milieu = Util.getValeurJsonOuVide(observation,"milieu"); |
this.commentaire = Util.getValeurJsonOuVide(observation,"commentaire"); |
this.date = Util.getValeurJsonOuVide(observation,"date_observation"); |
this.numeroOrdre = Util.getValeurJsonOuVide(observation,"ordre"); |
this.id = Util.getValeurJsonOuVide(observation,"id_observation"); |
this.latitude = Util.getValeurJsonOuVide(observation,"latitude"); |
this.longitude = Util.getValeurJsonOuVide(observation,"longitude"); |
this.motsCles = Util.getValeurJsonOuVide(observation,"mots_cles"); |
|
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() : ""; |
} |
|
|
/** |
* Une observation saisie ou modifiee |
* |