Subversion Repositories eFlore/Applications.cel

Rev

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