Line 1... |
Line 1... |
1 |
package org.tela_botanica.client.modeles.objets;
|
1 |
package org.tela_botanica.client.modeles.objets;
|
Line 2... |
Line 2... |
2 |
|
2 |
|
Line 3... |
Line 3... |
3 |
import org.tela_botanica.client.util.Util;
|
3 |
import org.tela_botanica.client.util.Util;
|
4 |
|
- |
|
Line 5... |
Line 4... |
5 |
import com.google.gwt.json.client.JSONObject;
|
4 |
|
Line 6... |
Line 5... |
6 |
import com.google.gwt.json.client.JSONString;
|
5 |
import com.google.gwt.json.client.JSONObject;
|
Line 82... |
Line 81... |
82 |
}
|
81 |
}
|
83 |
this.motsCles = "";
|
82 |
this.motsCles = "";
|
84 |
}
|
83 |
}
|
Line 85... |
Line 84... |
85 |
|
84 |
|
- |
|
85 |
public Observation(JSONObject observation) {
|
- |
|
86 |
this.transmis = Util.getValeurJsonOuVide(observation, "transmission");
|
- |
|
87 |
this.identifiantLocalite = Util.getValeurJsonOuVide(observation, "ce_zone_geo");
|
- |
|
88 |
this.nomSaisi = Util.getValeurJsonOuVide(observation, "nom_sel");
|
- |
|
89 |
this.nomRetenu = (Util.getValeurJsonOuVide(observation,"nom_ret"));
|
- |
|
90 |
this.numeroNomenclaturalSaisi = Util.getValeurJsonOuVide(observation,"nom_sel_nn");
|
- |
|
91 |
this.numeroNomenclaturalRetenu = Util.getValeurJsonOuVide(observation,"nom_ret_nn");
|
- |
|
92 |
this.numeroTaxonomique= Util.getValeurJsonOuVide(observation,"nt");
|
- |
|
93 |
this.famille = Util.getValeurJsonOuVide(observation,"famille");
|
- |
|
94 |
this.localite = Util.getValeurJsonOuVide(observation,"zone_geo");
|
- |
|
95 |
this.lieudit = Util.getValeurJsonOuVide(observation,"lieudit");
|
- |
|
96 |
this.station= Util.getValeurJsonOuVide(observation,"station");
|
- |
|
97 |
this.milieu = Util.getValeurJsonOuVide(observation,"milieu");
|
- |
|
98 |
this.commentaire = Util.getValeurJsonOuVide(observation,"commentaire");
|
- |
|
99 |
this.date = Util.getValeurJsonOuVide(observation,"date_observation");
|
- |
|
100 |
this.numeroOrdre = Util.getValeurJsonOuVide(observation,"ordre");
|
- |
|
101 |
this.id = Util.getValeurJsonOuVide(observation,"id_observation");
|
- |
|
102 |
this.latitude = Util.getValeurJsonOuVide(observation,"latitude");
|
- |
|
103 |
this.longitude = Util.getValeurJsonOuVide(observation,"longitude");
|
Line 86... |
Line -... |
86 |
public Observation(JSONObject observation) {
|
- |
|
87 |
|
- |
|
88 |
this.transmis = getValeurJsonOuVide(observation, "transmission");
|
- |
|
89 |
this.identifiantLocalite = getValeurJsonOuVide(observation, "ce_zone_geo");
|
- |
|
90 |
this.nomSaisi = getValeurJsonOuVide(observation, "nom_sel");
|
- |
|
91 |
this.nomRetenu = (getValeurJsonOuVide(observation,"nom_ret"));
|
- |
|
92 |
this.numeroNomenclaturalSaisi = getValeurJsonOuVide(observation,"nom_sel_nn");
|
- |
|
93 |
this.numeroNomenclaturalRetenu = getValeurJsonOuVide(observation,"nom_ret_nn");
|
- |
|
94 |
this.numeroTaxonomique= getValeurJsonOuVide(observation,"nt");
|
- |
|
95 |
this.famille = getValeurJsonOuVide(observation,"famille");
|
- |
|
96 |
this.localite = getValeurJsonOuVide(observation,"zone_geo");
|
- |
|
97 |
this.lieudit = getValeurJsonOuVide(observation,"lieudit");
|
- |
|
98 |
this.station= getValeurJsonOuVide(observation,"station");
|
- |
|
99 |
this.milieu = getValeurJsonOuVide(observation,"milieu");
|
- |
|
100 |
this.commentaire = getValeurJsonOuVide(observation,"commentaire");
|
- |
|
101 |
this.date = getValeurJsonOuVide(observation,"date_observation");
|
- |
|
102 |
this.numeroOrdre = getValeurJsonOuVide(observation,"ordre");
|
- |
|
103 |
this.id = getValeurJsonOuVide(observation,"id_observation");
|
- |
|
104 |
this.latitude = getValeurJsonOuVide(observation,"latitude");
|
- |
|
105 |
this.longitude = getValeurJsonOuVide(observation,"longitude");
|
- |
|
106 |
this.motsCles = getValeurJsonOuVide(observation,"mots_cles");
|
- |
|
107 |
|
- |
|
108 |
}
|
- |
|
109 |
|
- |
|
110 |
private String getValeurJsonOuVide(JSONObject jo, String index) {
|
104 |
this.motsCles = Util.getValeurJsonOuVide(observation,"mots_cles");
|
111 |
return (jo.get(index) != null) ? ((JSONString)jo.get(index)).stringValue() : "";
|
- |
|
Line 112... |
Line 105... |
112 |
}
|
105 |
|
113 |
|
106 |
}
|
114 |
|
107 |
|
115 |
/**
|
108 |
/**
|