New file |
0,0 → 1,48 |
package org.tela_botanica.client.modeles.collection; |
|
import org.tela_botanica.client.modeles.aDonneeListe; |
|
import com.google.gwt.json.client.JSONArray; |
import com.google.gwt.json.client.JSONObject; |
|
/** |
* Table de hachage composée d'informations sur les Structures, renvoyé par un objet de type DAO |
* La clé est le nom de l'entite + le nom de l'entite parente |
* |
* @author david delon |
* |
*/ |
public class CollectionListe extends aDonneeListe<Collection> { |
|
private static final long serialVersionUID = 8024454926649039456L; |
|
public CollectionListe() { |
super(); |
} |
|
public CollectionListe(int taille) { |
super(taille); |
} |
|
/** |
* Constructeur pour une liste d'institutions |
* @param dates |
*/ |
public CollectionListe(JSONArray structures) { |
super(structures.size()) ; |
final int taillemax = structures.size(); |
|
for (int i = 0; i < taillemax; i++) { |
JSONObject collectionCourante = structures.get(i).isObject() ; |
|
if (collectionCourante != null) { |
Collection collection = new Collection(collectionCourante); |
CollectionBotanique botanique = new CollectionBotanique(collectionCourante); |
collection.setBotanique(botanique); |
|
this.put(collection.getId(), collection); |
} |
} |
} |
|
} |