Subversion Repositories eFlore/Applications.cel

Rev

Rev 2040 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2040 Rev 2643
Line 2... Line 2...
2
 
2
 
3
import java.util.HashMap;
3
import java.util.HashMap;
4
import java.util.Iterator;
4
import java.util.Iterator;
Line 5... Line 5...
5
import java.util.List;
5
import java.util.List;
6
 
-
 
-
 
6
 
7
import com.gwtext.client.data.FieldDef;
7
import org.tela_botanica.client.i18n.Msg;
8
import com.gwtext.client.data.IntegerFieldDef;
8
 
9
import com.gwtext.client.data.SimpleStore;
-
 
Line 10... Line 9...
10
import com.gwtext.client.data.Store;
9
import com.gwtext.client.data.SimpleStore;
Line 11... Line 10...
11
import com.gwtext.client.data.StringFieldDef;
10
import com.gwtext.client.data.Store;
12
 
11
 
13
public class Ontologies {
12
public class Ontologies {
14
	
13
	
Line 15... Line 14...
15
	//TODO: extraire toutes ces valeurs dans des fichiers de configuration
14
	//TODO: extraire toutes ces valeurs dans des fichiers de configuration
16
	// ou bien via l'appel d'un web service spécialisé.
15
	// ou bien via l'appel d'un web service spécialisé.
17
	private static HashMap<String, String> valeursCertitude = null;
16
	private static HashMap<String, String> valeursCertitude = null;
18
	private static List<InfosReferentielNom> listeReferentielsNoms = null;
17
	private static List<InfosReferentielNom> listeReferentielsNoms = null;
19
 
18
 
20
	public static Store getValeursCertitude() {
19
	public static Store getValeursCertitude() {
21
		Object[][] valeurs = {{"Certaine","certain"}, 
20
		Object[][] valeurs = {{Msg.get("certain"),"certain"}, 
22
				{"Douteuse","douteux"}, 
21
				{Msg.get("douteux"),"douteux"}, 
23
				{"A déterminer","aDeterminer"}
22
				{Msg.get("a-determiner"),"aDeterminer"}
Line 24... Line 23...
24
			};
23
			};
25
		SimpleStore storeCertitude = new SimpleStore(new String[] {"label","valeur"},valeurs);
24
		SimpleStore storeCertitude = new SimpleStore(new String[] {"label","valeur"},valeurs);
26
		storeCertitude.load();
25
		storeCertitude.load();
27
		return storeCertitude;
26
		return storeCertitude;
28
	}
27
	}
29
	
28
	
30
	public static Store getValeursAbondance() {		
29
	public static Store getValeursAbondance() {		
31
		Object[][] valeurs = {
30
		Object[][] valeurs = {
32
			{"5 : recouvrement R > 75%","5"}, 
31
			{Msg.get("abondance-5"),"5"}, 
33
			{"4 : 50% < R < 75%","4"}, 
32
			{Msg.get("abondance-4"),"4"}, 
34
			{"3 : 25% < R < 50%","3"}, 
33
			{Msg.get("abondance-3"),"3"}, 
35
			{"2 : 5% < R < 25%","2"}, 
34
			{Msg.get("abondance-2"),"2"}, 
36
			{"1 : 1% < R < 5%","1"}, 
35
			{Msg.get("abondance-1"),"1"}, 
37
			{"+ : recouvrement R < 1%","+"},
36
			{Msg.get("abondance-+"),"+"},
38
			{"r : rare (quelques pieds)","r"}, 
37
			{Msg.get("abondance-r"),"r"}, 
39
			{"i : un seul individu","i"},
38
			{Msg.get("abondance-i"),"i"},
40
			{"1-5 individus","1-5"},
39
			{Msg.get("abondance-1-5"),"1-5"},
41
			{"5-10 individus","5-10"},
40
			{Msg.get("abondance-5-10"),"5-10"},
42
			{"10-50 individus","10-50"},
41
			{Msg.get("abondance-10-50"),"10-50"},
43
			{"50-100 individus","50-100"},
42
			{Msg.get("abondance-50-100"),"50-100"},
44
			{"100-500 individus","100-500"},
43
			{Msg.get("abondance-100-500"),"100-500"},
45
			{">500 individus",">500"},
44
			{Msg.get("abondance->500"),">500"},
46
			{"E : exceptionnel","E"},
45
			{Msg.get("abondance-E"),"E"},
47
			{"RR : très rare","RR"},
46
			{Msg.get("abondance-RR"),"RR"},
48
			{"R : rare","R"},
47
			{Msg.get("abondance-R"),"R"},
49
			{"AR : assez rare","AR"},
48
			{Msg.get("abondance-AR"),"AR"},
50
			{"PC : peu commun","PC"},
49
			{Msg.get("abondance-PC"),"PC"},
51
			{"AC : assez commun","AC"},
50
			{Msg.get("abondance-AC"),"AC"},
52
			{"C : commun","C"},
51
			{Msg.get("abondance-C"),"C"},
Line 53... Line 52...
53
			{"CC : très commun","CC"}
52
			{Msg.get("abondance-CC"),"CC"}
54
		};
53
		};
55
		SimpleStore storeAbondance = new SimpleStore(new String[] {"label","valeur"},valeurs);
54
		SimpleStore storeAbondance = new SimpleStore(new String[] {"label","valeur"},valeurs);
56
		storeAbondance.load();
55
		storeAbondance.load();
57
		return storeAbondance;
56
		return storeAbondance;
58
	}
57
	}
59
	
58
	
Line 60... Line 59...
60
	public static String getCorrespondanceCertitude(String cle) {
59
	public static String getCorrespondanceCertitude(String cle) {
Line 61... Line 60...
61
		if(valeursCertitude == null) {
60
		if(valeursCertitude == null) {
Line 101... Line 100...
101
		
100
		
102
		return infos;
101
		return infos;
Line 103... Line 102...
103
	}
102
	}
-
 
103
	
104
	
104
	public static Store getValeursPhenologie() {
105
	public static Store getValeursPhenologie() {
105
		//TODO: attendre les retours de l'experte en phénologie
106
		Object[][] valeurs = {
106
		Object[][] valeurs = {
107
			{"00-09: germination, développement des bourgeons", "00-09"},
107
			{"00-09: germination, développement des bourgeons", "00-09"},
108
			{"10-19: développement des feuilles", "10-19"},
108
			{"10-19: développement des feuilles", "10-19"},