1489 |
aurelien |
1 |
package org.tela_botanica.client.modeles.objets;
|
|
|
2 |
|
|
|
3 |
import java.util.HashMap;
|
|
|
4 |
|
|
|
5 |
import com.gwtext.client.data.SimpleStore;
|
|
|
6 |
import com.gwtext.client.data.Store;
|
|
|
7 |
|
|
|
8 |
public class Ontologies {
|
|
|
9 |
|
|
|
10 |
private static HashMap<String, String> valeursCertitude = null;
|
|
|
11 |
|
|
|
12 |
public static Store getValeursCertitude() {
|
|
|
13 |
Object[][] valeurs = {{"Certaine","certain"},
|
|
|
14 |
{"Douteuse","douteux"},
|
|
|
15 |
{"A déterminer","aDeterminer"}
|
|
|
16 |
};
|
|
|
17 |
SimpleStore storeCertitude = new SimpleStore(new String[] {"label","valeur"},valeurs);
|
|
|
18 |
storeCertitude.load();
|
|
|
19 |
return storeCertitude;
|
|
|
20 |
}
|
|
|
21 |
|
|
|
22 |
public static Store getValeursAbondance() {
|
|
|
23 |
Object[][] valeurs = {{"i : un seul individu","i"},
|
|
|
24 |
{"r : rare (quelques pieds)","r"},
|
|
|
25 |
{"+ : recouvrement R < 1%","+"},
|
|
|
26 |
{"1 : 1% < R < 5%","1"},
|
|
|
27 |
{"2 : 5% < R < 25%","2"},
|
|
|
28 |
{"3 : 25% < R < 50%","3"},
|
|
|
29 |
{"4 : 50% < R < 75%","4"},
|
|
|
30 |
{"5 : recouvrement R > 75%","5"}
|
|
|
31 |
};
|
|
|
32 |
SimpleStore storeAbondance = new SimpleStore(new String[] {"label","valeur"},valeurs);
|
|
|
33 |
storeAbondance.load();
|
|
|
34 |
return storeAbondance;
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
public static String getCorrespondanceCertitude(String cle) {
|
|
|
38 |
if(valeursCertitude == null) {
|
|
|
39 |
valeursCertitude = new HashMap<String, String>();
|
|
|
40 |
valeursCertitude.put("certain", "Certaine");
|
|
|
41 |
valeursCertitude.put("douteux", "Douteuse");
|
|
|
42 |
valeursCertitude.put("aDeterminer", "A déterminer");
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
String valeur = valeursCertitude.get(cle);
|
|
|
46 |
|
|
|
47 |
return valeur == null ? cle : valeur;
|
|
|
48 |
}
|
|
|
49 |
}
|