Subversion Repositories eFlore/Applications.coel

Rev

Rev 935 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
453 jp_milcent 1
package org.tela_botanica.client.modeles;
2
 
3
import com.google.gwt.json.client.JSONArray;
4
import com.google.gwt.json.client.JSONObject;
5
 
6
/**
7
 * Table de hachage composée d'informations sur les Structures, renvoyé par un objet de type DAO
8
 * La clé est le nom de l'entite + le nom de l'entite parente
9
 *
10
 * @author david delon
11
 *
12
 */
13
public class CollectionListe extends aDonneeListe<Collection> {
14
 
15
	private static final long serialVersionUID = 8024454926649039456L;
16
 
17
	public CollectionListe() {
18
		super();
19
	}
20
 
21
	public CollectionListe(int taille) {
22
		super(taille);
23
	}
24
 
25
	/**
26
	 * Constructeur pour une liste d'institutions
27
	 * @param dates
28
	 */
29
	public CollectionListe(JSONArray structures) {
30
		super(structures.size()) ;
31
		final int taillemax = structures.size();
32
 
33
		for (int i = 0; i < taillemax; i++) {
34
			JSONObject collectionCourante = structures.get(i).isObject() ;
35
 
36
			if (collectionCourante != null)	{
37
				Collection collection = new Collection(collectionCourante);
38
				CollectionBotanique botanique = new CollectionBotanique(collectionCourante);
39
				collection.setBotanique(botanique);
40
 
41
				this.put(collection.getId(), collection);
42
			}
43
		}
44
	}
45
 
46
}