Subversion Repositories eFlore/Applications.cel

Rev

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

Rev Author Line No. Line
989 aurelien 1
package org.tela_botanica.client.modeles.objets;
91 jpm 2
 
3
 
4
import java.util.LinkedHashMap;
5
 
6
import com.google.gwt.json.client.JSONArray;
7
import com.google.gwt.json.client.JSONString;
8
import com.google.gwt.user.client.Window;
9
 
10
/**
11
 * table de hachage composée d'entite geographique, renvoyé par les objets de type DAO
12
 * La clé est le nom de l'entite + le nom de l'entite parente
13
 *
14
 * @author david delon
15
 *
16
 */
639 aurelien 17
public class ListeDate extends LinkedHashMap<String, DateObservation> {
91 jpm 18
 
19
	/**
20
	 *
21
	 */
22
	private static final long serialVersionUID = 6057292016502553510L;
23
 
24
	/**
25
	 * Constructeur sans paramètres
26
	 */
639 aurelien 27
	public ListeDate()
91 jpm 28
	{
29
		super();
30
	}
31
 
32
	/**
33
	 * Constructeur avec paramètre
34
	 * @param taille la taille de la table de hachage
35
	 */
639 aurelien 36
	public ListeDate(int taille)
91 jpm 37
	{
38
		super(taille);
39
	}
40
 
639 aurelien 41
	public ListeDate(JSONArray dates)
91 jpm 42
	{
43
		super(dates.size()) ;
44
		final int taillemax = dates.size();
45
 
46
		for (int i = 0; i < taillemax; i++) {
47
 
752 aurelien 48
			JSONString dateEncours = dates.get(i).isString() ;
91 jpm 49
 
50
			if(dateEncours != null)
51
			{
752 aurelien 52
				String dateString = ((JSONString)dateEncours).stringValue() ;
91 jpm 53
				DateObservation dat = new DateObservation(dateString);
54
 
55
				this.put(dateString,dat);
56
			}
57
		}
58
	}
59
 
60
}