Subversion Repositories eFlore/Applications.cel

Rev

Rev 2653 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2653 Rev 2657
Line 15... Line 15...
15
import org.tela_botanica.client.modeles.objets.ChampEtendu;
15
import org.tela_botanica.client.modeles.objets.ChampEtendu;
16
import org.tela_botanica.client.modeles.objets.Observation;
16
import org.tela_botanica.client.modeles.objets.Observation;
17
import org.tela_botanica.client.modeles.objets.ReferentielLocalite;
17
import org.tela_botanica.client.modeles.objets.ReferentielLocalite;
18
import org.tela_botanica.client.modeles.objets.ReferentielNom;
18
import org.tela_botanica.client.modeles.objets.ReferentielNom;
Line 19... Line -...
19
 
-
 
20
import com.google.gwt.dom.client.Element;
19
 
21
import com.google.gwt.http.client.Response;
20
import com.google.gwt.http.client.Response;
22
import com.google.gwt.json.client.JSONArray;
21
import com.google.gwt.json.client.JSONArray;
23
import com.google.gwt.json.client.JSONObject;
22
import com.google.gwt.json.client.JSONObject;
24
import com.google.gwt.json.client.JSONParser;
23
import com.google.gwt.json.client.JSONParser;
25
import com.google.gwt.json.client.JSONString;
24
import com.google.gwt.json.client.JSONString;
26
import com.google.gwt.json.client.JSONValue;
-
 
27
import com.google.gwt.user.client.DOM;
25
import com.google.gwt.json.client.JSONValue;
Line 28... Line 26...
28
import com.google.gwt.user.client.ui.RootPanel;
26
import com.google.gwt.user.client.ui.RootPanel;
Line 29... Line 27...
29
 
27
 
Line 519... Line 517...
519
			String cle = it.next();
517
			String cle = it.next();
520
			locMap.put(cle, referentielLocalite.get(cle).getLocalite());
518
			locMap.put(cle, referentielLocalite.get(cle).getLocalite());
521
		}
519
		}
522
		return locMap;
520
		return locMap;
523
	}
521
	}
-
 
522
	
-
 
523
	public static Map<String, String> parserRetourImportObs(String json) {
-
 
524
		final JSONValue responseValue = JSONParser.parse(json);
-
 
525
		JSONObject reponse = null;
-
 
526
		
-
 
527
		Map<String, String> retourImport = new HashMap<String,String>();
-
 
528
		// si c'est un objet
-
 
529
		if ((reponse = responseValue.isObject()) != null) {
-
 
530
			Iterator<String> it = reponse.keySet().iterator();
-
 
531
			
-
 
532
			while(it.hasNext()) {
-
 
533
				String cle = it.next();								
-
 
534
				String valeur = reponse.get(cle).isString().stringValue();
-
 
535
				retourImport.put(cle, valeur);
-
 
536
			}
-
 
537
		}
-
 
538
		
-
 
539
		return retourImport;
-
 
540
	}
Line 524... Line 541...
524
 
541
 
525
	public static native void  LogVersFirebug(Object o) /*-{
542
	public static native void  LogVersFirebug(Object o) /*-{
526
		if (!!($wnd.console && $wnd.console.log)) {
543
		if (!!($wnd.console && $wnd.console.log)) {
527
			console.log(o);
544
			console.log(o);