Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3666 → Rev 3667

/branches/v3.00-serfouette/src/org/tela_botanica/client/modeles/objets/ListeChampsEtendus.java
New file
0,0 → 1,30
package org.tela_botanica.client.modeles.objets;
 
import java.util.HashMap;
import java.util.Iterator;
 
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONValue;
import com.google.gwt.user.client.Window;
 
public class ListeChampsEtendus extends HashMap<String, String> {
public ListeChampsEtendus(String listeChampsEtendusJson) {
super();
final JSONValue responseValue = JSONParser.parse(listeChampsEtendusJson);
JSONObject reponse = null;
// si c'est un objet
if ((reponse = responseValue.isObject()) != null) {
Iterator<String> it = reponse.keySet().iterator();
while(it.hasNext()) {
String cle = it.next();
String valeur = reponse.get(cle).isString().stringValue();
this.put(cle, valeur);
}
}
}
}