Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 708 Rev 712
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;
4
import com.google.gwt.json.client.JSONObject;
5
import com.google.gwt.json.client.JSONObject;
-
 
6
import com.google.gwt.user.client.Window;
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
	}
-
 
19
	
-
 
20
	/**
-
 
21
	 * Constructeur pour une liste d'institutions
-
 
22
	 * @param dates
17
	
23
	 */
-
 
24
	public PublicationListe(JSONArray publications) {
18
	public PublicationListe(JSONArray publicationListe) {
25
 
19
		super(publicationListe.size());
26
		super(publications.size());
20
		
27
		
21
		final int taillemax = publicationListe.size();
28
		int taille = publications.size();
22
		for (int i = 0; i < taillemax; i++) {
29
		for (int i = 0; i < taille; i++) {
23
			JSONObject publicationCourante = publicationListe.get(i).isObject() ;
30
			JSONObject publicationCourante = publications.get(i).isObject() ;
24
			
31
			
25
			if (publicationCourante != null)	{
32
			if (publicationCourante != null)	{
26
				Publication publication = new Publication(publicationCourante);
33
				Publication publication = new Publication(publicationCourante);
27
				this.put(publication.getId(), publication);				
34
				this.put(publication.getId(), publication);				
28
			}
35
			}
29
		}
36
		}
30
	}
37
	}
31
}
38
}