Subversion Repositories eFlore/Applications.coel

Rev

Rev 453 | Rev 1041 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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