| Line 83... |
Line 83... |
| 83 |
this.motsCles = "";
|
83 |
this.motsCles = "";
|
| 84 |
}
|
84 |
}
|
| Line 85... |
Line 85... |
| 85 |
|
85 |
|
| Line 86... |
Line 86... |
| 86 |
public Observation(JSONObject observation) {
|
86 |
public Observation(JSONObject observation) {
|
| 87 |
|
87 |
|
| 88 |
this.transmis=((JSONString) observation.get("transmission")).stringValue();
|
88 |
this.transmis = getValeurJsonOuVide(observation, "transmission");
|
| 89 |
this.identifiantLocalite=((JSONString) observation.get("ce_zone_geo")).toString();
|
89 |
this.identifiantLocalite = getValeurJsonOuVide(observation, "ce_zone_geo");
|
| 90 |
this.nomSaisi=Util.toCelString(((JSONString) observation.get("nom_sel")).toString());
|
90 |
this.nomSaisi = getValeurJsonOuVide(observation, "nom_sel");
|
| 91 |
this.nomRetenu=Util.toCelString(((JSONString) observation.get("nom_ret")).toString());
|
91 |
this.nomRetenu = (getValeurJsonOuVide(observation,"nom_ret"));
|
| 92 |
this.numeroNomenclaturalSaisi=((JSONString) observation.get("nom_sel_nn")).stringValue();
|
92 |
this.numeroNomenclaturalSaisi = getValeurJsonOuVide(observation,"nom_sel_nn");
|
| 93 |
this.numeroNomenclaturalRetenu=((JSONString) observation.get("nom_ret_nn")).stringValue();
|
93 |
this.numeroNomenclaturalRetenu = getValeurJsonOuVide(observation,"nom_ret_nn");
|
| 94 |
this.numeroTaxonomique=((JSONString) observation.get("nt")).stringValue();
|
94 |
this.numeroTaxonomique= getValeurJsonOuVide(observation,"nt");
|
| 95 |
this.famille=Util.toCelString(((JSONString) observation .get("famille")).toString());
|
95 |
this.famille = getValeurJsonOuVide(observation,"famille");
|
| 96 |
this.localite=Util.toCelString(((JSONString) observation .get("zone_geo")).toString());
|
96 |
this.localite = getValeurJsonOuVide(observation,"zone_geo");
|
| 97 |
this.lieudit=Util.toCelString(((JSONString) observation .get("lieudit")).toString());
|
97 |
this.lieudit = getValeurJsonOuVide(observation,"lieudit");
|
| 98 |
this.station=Util.toCelString(((JSONString) observation .get("station")).toString());
|
98 |
this.station= getValeurJsonOuVide(observation,"station");
|
| 99 |
this.milieu=Util.toCelString(((JSONString) observation .get("milieu")).toString());
|
99 |
this.milieu = getValeurJsonOuVide(observation,"milieu");
|
| 100 |
this.commentaire=Util.toCelString(((JSONString) observation .get("commentaire")).toString());
|
100 |
this.commentaire = getValeurJsonOuVide(observation,"commentaire");
|
| 101 |
this.date=((JSONString) observation .get("date_observation")).stringValue();
|
101 |
this.date = getValeurJsonOuVide(observation,"date_observation");
|
| 102 |
this.numeroOrdre=((JSONString) observation.get("ordre")).stringValue();
|
102 |
this.numeroOrdre = getValeurJsonOuVide(observation,"ordre");
|
| 103 |
this.id=((JSONString) observation.get("id_observation")).stringValue();
|
103 |
this.id = getValeurJsonOuVide(observation,"id_observation");
|
| 104 |
this.latitude=((JSONString) observation.get("latitude")).stringValue();
|
104 |
this.latitude = getValeurJsonOuVide(observation,"latitude");
|
| Line 105... |
Line 105... |
| 105 |
this.longitude=((JSONString) observation.get("longitude")).stringValue();
|
105 |
this.longitude = getValeurJsonOuVide(observation,"longitude");
|
| - |
|
106 |
this.motsCles = getValeurJsonOuVide(observation,"mots_cles");
|
| - |
|
107 |
|
| - |
|
108 |
}
|
| - |
|
109 |
|
| Line 106... |
Line 110... |
| 106 |
this.motsCles=((JSONString) observation.get("mots_cles")).stringValue();
|
110 |
private String getValeurJsonOuVide(JSONObject jo, String index) {
|
| 107 |
|
111 |
return (jo.get(index) != null) ? ((JSONString)jo.get(index)).stringValue() : "";
|
| 108 |
}
|
112 |
}
|