Subversion Repositories eFlore/Applications.coel

Rev

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

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