Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 706 Rev 708
Line 1... Line 1...
1
package org.tela_botanica.client.modeles;
1
package org.tela_botanica.client.modeles;
Line 2... Line 2...
2
 
2
 
3
import java.util.Iterator;
-
 
4
 
3
import com.google.gwt.json.client.JSONArray;
Line 5... Line 4...
5
import com.google.gwt.json.client.JSONObject;
4
import com.google.gwt.json.client.JSONObject;
Line 6... Line 5...
6
 
5
 
Line 14... Line 13...
14
	
13
	
15
	public PublicationListe(int taille) {
14
	public PublicationListe(int taille) {
16
		super(taille);
15
		super(taille);
Line 17... Line -...
17
	}
-
 
18
	
-
 
19
	/**
-
 
20
	 * Constructeur pour une liste d'institutions
-
 
21
	 * @param dates
16
	}
22
	 */
17
	
Line 23... Line 18...
23
	public PublicationListe(JSONObject publications) {
18
	public PublicationListe(JSONArray publicationListe) {
24
		super(publications.size()) ;
19
		super(publicationListe.size());
25
		
20
		
Line 26... Line 21...
26
		Iterator<String> it = publications.keySet().iterator();
21
		final int taillemax = publicationListe.size();
27
		while (it.hasNext()) {
22
		for (int i = 0; i < taillemax; i++) {
28
			JSONObject publicationCourante = publications.get(it.next()).isObject() ;
23
			JSONObject publicationCourante = publicationListe.get(i).isObject() ;
29
			
24
			
30
			if (publicationCourante != null)	{
25
			if (publicationCourante != null)	{
31
				Publication publication = new Publication(publicationCourante);
26
				Publication publication = new Publication(publicationCourante);
32
				this.put(publication.getId(), publication);
-
 
33
			}
27
				this.put(publication.getId(), publication);