Subversion Repositories eFlore/Applications.coel

Rev

Rev 712 | Rev 935 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 712 Rev 745
1
package org.tela_botanica.client.modeles;
1
package org.tela_botanica.client.modeles;
2
 
2
 
3
import com.google.gwt.json.client.JSONArray;
3
import com.google.gwt.json.client.JSONArray;
4
import com.google.gwt.json.client.JSONArray;
-
 
5
import com.google.gwt.json.client.JSONObject;
4
import com.google.gwt.json.client.JSONObject;
6
import com.google.gwt.user.client.Window;
-
 
7
 
5
 
8
public class PublicationListe extends aDonneeListe<Publication> {
6
public class PublicationListe extends aDonneeListe<Publication> {
9
 
7
 
10
	private static final long serialVersionUID = 2600314321196345072L;
8
	private static final long serialVersionUID = 2600314321196345072L;
11
 
9
 
12
	public PublicationListe() {
10
	public PublicationListe() {
13
		super();
11
		super();
14
	}
12
	}
15
	
13
	
16
	public PublicationListe(int taille) {
14
	public PublicationListe(int taille) {
17
		super(taille);
15
		super(taille);
18
	}
16
	}
19
	
17
	
20
	/**
18
	/**
21
	 * Constructeur pour une liste d'institutions
19
	 * Constructeur pour une liste d'institutions
22
	 * @param dates
20
	 * @param dates
23
	 */
21
	 */
24
	public PublicationListe(JSONArray publications) {
22
	public PublicationListe(JSONArray publications) {
25
 
23
 
26
		super(publications.size());
24
		super(publications.size());
27
		
25
		
28
		int taille = publications.size();
26
		int taille = publications.size();
29
		for (int i = 0; i < taille; i++) {
27
		for (int i = 0; i < taille; i++) {
30
			JSONObject publicationCourante = publications.get(i).isObject() ;
28
			JSONObject publicationCourante = publications.get(i).isObject() ;
31
			
29
			
32
			if (publicationCourante != null)	{
30
			if (publicationCourante != null)	{
33
				Publication publication = new Publication(publicationCourante);
31
				Publication publication = new Publication(publicationCourante);
34
				this.put(publication.getId(), publication);				
32
				this.put(publication.getId(), publication);				
35
			}
33
			}
36
		}
34
		}
37
	}
35
	}
38
}
36
}