Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 1285 → Rev 1286

/trunk/src/org/tela_botanica/client/modeles/objets/Observation.java
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
*
/trunk/src/org/tela_botanica/client/modeles/objets/ImageCarnet.java
4,10 → 4,9
import java.util.Iterator;
import java.util.Set;
 
import org.tela_botanica.client.i18n.I18n;
import org.tela_botanica.client.i18n.VocabulaireMetadonnees;
import org.tela_botanica.client.util.Util;
 
import com.google.gwt.dev.asm.commons.Method;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.xml.client.Document;
import com.google.gwt.xml.client.Node;
44,7 → 43,7
 
// si elle est associée à une valeur, on l'ajoute
String key = iterator.next();
if (image.get(key).isString() != null) {
if (Util.jsonNonNull(image, key)) {
String valeur = image.get(key).isString().stringValue();
this.put(key, valeur);
} else {