Subversion Repositories eFlore/Applications.cel

Rev

Rev 728 | 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;
728 aurelien 2
 
3
import java.util.HashMap;
4
 
5
public class ListeReferentielPerso extends HashMap<String, String> {
6
 
7
	public static enum TypesReferentiels {
8
		REFERENTIEL_LIEU_DIT {
9
			public String toString() {
10
		        return "lieudit";
11
		    }
12
		},
13
		REFERENTIEL_STATION {
14
			public String toString() {
15
		        return "station";
16
		    }
17
		},
18
		REFERENTIEL_MILIEU {
19
			public String toString() {
20
		        return "milieu";
21
		    }
22
		}
23
	}
24
 
25
	/**
26
	 *
27
	 */
28
	private static final long serialVersionUID = 2159394354752556196L;
29
 
30
	private TypesReferentiels typeReferentiel = null;
31
 
32
	/**
33
	 * Constructeur sans paramètres
34
	 */
35
	public ListeReferentielPerso(TypesReferentiels typeReferentiel)
36
	{
37
		super();
38
		this.typeReferentiel = typeReferentiel;
39
	}
40
 
41
	/**
42
	 * Constructeur avec paramètre
43
	 * @param taille la taille de la table de hachage
44
	 */
45
	public ListeReferentielPerso(int taille,TypesReferentiels typeReferentiel)
46
	{
47
		super();
48
		this.typeReferentiel = typeReferentiel;
49
	}
50
 
51
	/**
52
	 * Constructeur avec paramètre
53
	 * @param ic un tableau de strings
54
	 */
55
	public ListeReferentielPerso(TypesReferentiels typeReferentiel, String[] nom)
56
	{
57
		super() ;
58
		this.typeReferentiel = typeReferentiel;
59
		for (int i = 0; i < nom.length; i++)
60
		{
61
			if(nom[i] != null && nom[i].equals("00null"))
62
			{
63
 
64
				this.put(i+"",nom[i]);
65
			}
66
		}
67
	}
68
 
69
	public TypesReferentiels getTypeReferentiel() {
70
		return typeReferentiel;
71
	}
72
 
73
}