Subversion Repositories eFlore/Applications.del

Rev

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

Rev 104 Rev 107
Line 4... Line 4...
4
import java.util.Date;
4
import java.util.Date;
5
import java.util.HashMap;
5
import java.util.HashMap;
6
import java.util.Iterator;
6
import java.util.Iterator;
7
import java.util.List;
7
import java.util.List;
Line -... Line 8...
-
 
8
 
8
 
9
import org.tela_botanica.del.client.cache.CacheClient;
9
import org.tela_botanica.del.client.exceptions.ExceptionClient;
10
import org.tela_botanica.del.client.exceptions.ExceptionClient;
10
import org.tela_botanica.del.client.modeles.Observation;
11
import org.tela_botanica.del.client.modeles.Observation;
11
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;
Line 12... Line 14...
12
import org.tela_botanica.del.client.modeles.Protocole;
14
import org.tela_botanica.del.client.modeles.VoteProtocole;
13
 
15
 
Line 14... Line 16...
14
import com.google.gwt.i18n.client.DateTimeFormat;
16
import com.google.gwt.i18n.client.DateTimeFormat;
Line 21... Line 23...
21
	List<Observation> observations = new ArrayList<Observation>();
23
	List<Observation> observations = new ArrayList<Observation>();
Line 22... Line 24...
22
 
24
 
Line 23... Line 25...
23
	List<ObservationValidation> observationValidationDatas = new ArrayList<ObservationValidation>();
25
	List<ObservationValidation> observationValidationDatas = new ArrayList<ObservationValidation>();
-
 
26
 
-
 
27
	ArrayList<String> propositionsTaxonDatas = new ArrayList<String>();
Line 24... Line 28...
24
 
28
	
Line 25... Line 29...
25
	ArrayList<String> propositionsTaxonDatas = new ArrayList<String>();
29
	List<Protocole> protocoles = new ArrayList<Protocole>();
26
 
30
 
Line 62... Line 66...
62
		protocol1.setId(1);
66
		protocol1.setId(1);
Line 63... Line 67...
63
 
67
 
64
		Protocole protocol2 = new Protocole();
68
		Protocole protocol2 = new Protocole();
65
		protocol2.setNom(Protocole.IDENTIFICATION_AUTOMATIQUE);
69
		protocol2.setNom(Protocole.IDENTIFICATION_AUTOMATIQUE);
-
 
70
		protocol2.setId(2);
-
 
71
		
-
 
72
		protocoles.add(protocol1);
Line 66... Line 73...
66
		protocol2.setId(2);
73
		protocoles.add(protocol2);
67
 
74
 
68
		ObservationValidation observationValidationData = new ObservationValidation();
75
		ObservationValidation observationValidationData = new ObservationValidation();
69
		observationValidationData.setEspece("Iris lutescens subsp. lutescens");
76
		observationValidationData.setEspece("Iris lutescens subsp. lutescens");
Line 181... Line 188...
181
	}
188
	}
Line 182... Line 189...
182
 
189
 
183
	public List<Observation> getObservationsEfloreParTaxon(String nomTaxon) {
190
	public List<Observation> getObservationsEfloreParTaxon(String nomTaxon) {
184
		return observations;
191
		return observations;
-
 
192
	}
-
 
193
	
-
 
194
	
-
 
195
	
-
 
196
	
-
 
197
	
-
 
198
	public Protocole getProtocole(String nomProtocole) {
-
 
199
		for (Protocole protocole : protocoles) {
-
 
200
			if (protocole.getNom().equals(nomProtocole)) {
-
 
201
				return protocole;
-
 
202
			}
-
 
203
		}
-
 
204
		return null;
-
 
205
	}
-
 
206
 
-
 
207
	public void saveVote(VoteProtocole voteProtocole) {
-
 
208
		CacheClient.getInstance().getCurrentObservation().getVoteProtocoles().add(voteProtocole);
Line 185... Line 209...
185
	}
209
	}
186
 
210
 
Line 187... Line 211...
187
	public void saveValidationData(ObservationValidation validationData) throws ExceptionClient {
211
	public void saveValidationData(ObservationValidation validationData) throws ExceptionClient {