Subversion Repositories eFlore/Applications.del

Rev

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

Rev 112 Rev 115
Line 9... Line 9...
9
import org.tela_botanica.del.client.cache.CacheClient;
9
import org.tela_botanica.del.client.cache.CacheClient;
10
import org.tela_botanica.del.client.exceptions.ExceptionClient;
10
import org.tela_botanica.del.client.exceptions.ExceptionClient;
11
import org.tela_botanica.del.client.modeles.Observation;
11
import org.tela_botanica.del.client.modeles.Observation;
12
import org.tela_botanica.del.client.modeles.ObservationValidation;
12
import org.tela_botanica.del.client.modeles.ObservationValidation;
13
import org.tela_botanica.del.client.modeles.Protocole;
13
import org.tela_botanica.del.client.modeles.Protocole;
-
 
14
import org.tela_botanica.del.client.modeles.VoteProtocole;
Line 14... Line 15...
14
 
15
 
15
import com.google.gwt.i18n.client.DateTimeFormat;
16
import com.google.gwt.i18n.client.DateTimeFormat;
Line 16... Line 17...
16
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
17
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
Line 22... Line 23...
22
	List<Observation> observations = new ArrayList<Observation>();
23
	List<Observation> observations = new ArrayList<Observation>();
Line 23... Line 24...
23
 
24
 
Line 24... Line 25...
24
	List<ObservationValidation> observationValidationDatas = new ArrayList<ObservationValidation>();
25
	List<ObservationValidation> observationValidationDatas = new ArrayList<ObservationValidation>();
25
 
26
 
26
	ArrayList<String> propositionsTaxonDatas = new ArrayList<String>();
27
	ArrayList<String> propositionsTaxonDatas = new ArrayList<String>();
Line 27... Line 28...
27
	
28
 
Line 28... Line 29...
28
	List<Protocole> protocoles = new ArrayList<Protocole>();
29
	List<Protocole> protocoles = new ArrayList<Protocole>();
Line 56... Line 57...
56
		motsClefs.add("fleur");
57
		motsClefs.add("fleur");
57
		motsClefs.add("fruit");
58
		motsClefs.add("fruit");
Line 58... Line 59...
58
 
59
 
Line 59... Line -...
59
		Iterator<String> auteurs = auteurObs.keySet().iterator();
-
 
60
 
-
 
61
		
60
		Iterator<String> auteurs = auteurObs.keySet().iterator();
62
 
61
 
63
		Protocole protocol1 = new Protocole();
62
		Protocole protocol1 = new Protocole();
Line 64... Line 63...
64
		protocol1.setNom(Protocole.ESTHETISME);
63
		protocol1.setNom(Protocole.ESTHETISME);
65
		protocol1.setId(1);
64
		protocol1.setId(1);
66
 
65
 
67
		Protocole protocol2 = new Protocole();
66
		Protocole protocol2 = new Protocole();
68
		protocol2.setNom(Protocole.IDENTIFICATION_AUTOMATIQUE);
67
		protocol2.setNom(Protocole.IDENTIFICATION_AUTOMATIQUE);
69
		protocol2.setId(2);
68
		protocol2.setId(2);
Line 70... Line 69...
70
		
69
 
71
		protocoles.add(protocol1);
70
		protocoles.add(protocol1);
Line 126... Line 125...
126
		observationValidationData5.setVote(2);
125
		observationValidationData5.setVote(2);
127
		observationValidationData5.setPourcentageConfiance(50);
126
		observationValidationData5.setPourcentageConfiance(50);
128
		observationValidationData5.setDate(new Date());
127
		observationValidationData5.setDate(new Date());
129
		observationValidationData5.setProtocol(protocol2);
128
		observationValidationData5.setProtocol(protocol2);
130
		observationValidationDatas.add(observationValidationData5);
129
		observationValidationDatas.add(observationValidationData5);
131
		
130
 
132
		for (int i = 0; i < 20; i++) {
131
		for (int i = 0; i < 20; i++) {
Line 133... Line 132...
133
 
132
 
134
			Observation observation = new Observation();
133
			Observation observation = new Observation();
135
			String auteur = auteurs.next();
134
			String auteur = auteurs.next();
Line 175... Line 174...
175
	}
174
	}
Line 176... Line 175...
176
 
175
 
177
	public List<Observation> getObservationsEfloreParTaxon(String nomTaxon) {
176
	public List<Observation> getObservationsEfloreParTaxon(String nomTaxon) {
178
		return observations;
177
		return observations;
179
	}
-
 
180
	
178
	}
181
	
-
 
182
	
-
 
183
	
-
 
184
	
179
 
185
	public Protocole getProtocole(String nomProtocole) {
180
	public Protocole getProtocole(String nomProtocole) {
186
		for (Protocole protocole : protocoles) {
181
		for (Protocole protocole : protocoles) {
187
			if (protocole.getNom().equals(nomProtocole)) {
182
			if (protocole.getNom().equals(nomProtocole)) {
188
				return protocole;
183
				return protocole;
189
			}
184
			}
190
		}
185
		}
191
		return null;
186
		return null;
Line 192... Line 187...
192
	}
187
	}
193
 
188
 
194
	/*public void saveVote(VoteProtocole voteProtocole) {
189
	public void saveVote(VoteProtocole voteProtocole) {
Line 195... Line 190...
195
		CacheClient.getInstance().getCurrentObservation().getVoteProtocoles().add(voteProtocole);
190
		CacheClient.getInstance().getCurrentObservation().getVoteProtocoles().add(voteProtocole);
196
	}*/
191
	}
197
 
192