Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 90 → Rev 91

/trunk/src/org/tela_botanica/client/modeles/ListeDateObservation.java
New file
0,0 → 1,60
package org.tela_botanica.client.modeles;
 
 
import java.util.LinkedHashMap;
 
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONString;
import com.google.gwt.user.client.Window;
 
/**
* table de hachage composée d'entite geographique, renvoyé par les objets de type DAO
* La clé est le nom de l'entite + le nom de l'entite parente
*
* @author david delon
*
*/
public class ListeDateObservation extends LinkedHashMap<String, DateObservation> {
/**
*
*/
private static final long serialVersionUID = 6057292016502553510L;
 
/**
* Constructeur sans paramètres
*/
public ListeDateObservation()
{
super();
}
/**
* Constructeur avec paramètre
* @param taille la taille de la table de hachage
*/
public ListeDateObservation(int taille)
{
super(taille);
}
public ListeDateObservation(JSONArray dates)
{
super(dates.size()) ;
final int taillemax = dates.size();
for (int i = 0; i < taillemax; i++) {
JSONArray dateEncours = dates.get(i).isArray() ;
if(dateEncours != null)
{
String dateString = ((JSONString)dateEncours.get(0)).stringValue() ;
DateObservation dat = new DateObservation(dateString);
 
this.put(dateString,dat);
}
}
}
}