Subversion Repositories eFlore/Applications.del

Rev

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

Rev 1151 Rev 1162
Line 10... Line 10...
10
import org.tela_botanica.del.client.modeles.Commentaire;
10
import org.tela_botanica.del.client.modeles.Commentaire;
11
import org.tela_botanica.del.client.modeles.Contributeur;
11
import org.tela_botanica.del.client.modeles.Contributeur;
12
import org.tela_botanica.del.client.modeles.Image;
12
import org.tela_botanica.del.client.modeles.Image;
13
import org.tela_botanica.del.client.modeles.ImageServiceResultat;
13
import org.tela_botanica.del.client.modeles.ImageServiceResultat;
14
import org.tela_botanica.del.client.modeles.InterventionForum;
14
import org.tela_botanica.del.client.modeles.InterventionForum;
-
 
15
import org.tela_botanica.del.client.modeles.MotCle;
15
import org.tela_botanica.del.client.modeles.Observation;
16
import org.tela_botanica.del.client.modeles.Observation;
16
import org.tela_botanica.del.client.modeles.ObservationServiceResultat;
17
import org.tela_botanica.del.client.modeles.ObservationServiceResultat;
17
import org.tela_botanica.del.client.modeles.PropositionDetermination;
18
import org.tela_botanica.del.client.modeles.PropositionDetermination;
18
import org.tela_botanica.del.client.modeles.Protocole;
19
import org.tela_botanica.del.client.modeles.Protocole;
19
import org.tela_botanica.del.client.modeles.ProtocoleServiceResultat;
20
import org.tela_botanica.del.client.modeles.ProtocoleServiceResultat;
Line 593... Line 594...
593
		observation.setImages(imagesPourObs);
594
		observation.setImages(imagesPourObs);
Line 594... Line 595...
594
 
595
 
595
		return observation;
596
		return observation;
Line 596... Line 597...
596
	}
597
	}
597
 
598
 
598
	public static List<String> parserRetourListeMotsClesImage(JSONObject retourJson) {
599
	public static List<MotCle> parserRetourListeMotsClesImage(JSONObject retourJson) {
599
		List<String> motsCles = new ArrayList<String>();
600
		List<MotCle> motsCles = new ArrayList<MotCle>();
600
		JSONObject tableauMc = retourJson;
601
		JSONObject tableauMc = retourJson;
601
		if (tableauMc != null) {
602
		if (tableauMc != null) {
602
			java.util.Iterator<String> it = tableauMc.keySet().iterator();
603
			java.util.Iterator<String> it = tableauMc.keySet().iterator();
-
 
604
			while (it.hasNext()) {
603
			while (it.hasNext()) {
605
				JSONObject mc = tableauMc.get(it.next()).isObject();
604
				JSONObject mc = tableauMc.get(it.next()).isObject();
606
				MotCle motCle = new MotCle(getValeurOuVide(mc, "id_mot_cle"), getValeurOuVide(mc, "image"), getValeurOuVide(mc, "mot_cle"));
605
				motsCles.add(getValeurOuVide(mc, "mot_cle"));
607
				motsCles.add(motCle);
606
			}
608
			}
607
		}
609
		}
608
		return motsCles;
610
		return motsCles;