9 |
benjamin |
1 |
package org.tela_botanica.del.client.utils;
|
|
|
2 |
|
|
|
3 |
import java.util.ArrayList;
|
|
|
4 |
import java.util.Date;
|
55 |
gduche |
5 |
import java.util.HashMap;
|
|
|
6 |
import java.util.Iterator;
|
270 |
gduche |
7 |
import java.util.LinkedHashMap;
|
9 |
benjamin |
8 |
import java.util.List;
|
|
|
9 |
|
14 |
benjamin |
10 |
import org.tela_botanica.del.client.exceptions.ExceptionClient;
|
141 |
aurelien |
11 |
import org.tela_botanica.del.client.modeles.Commentaire;
|
690 |
gduche |
12 |
import org.tela_botanica.del.client.modeles.Contributeur;
|
154 |
benjamin |
13 |
import org.tela_botanica.del.client.modeles.Image;
|
335 |
benjamin |
14 |
import org.tela_botanica.del.client.modeles.InformationsRecherche;
|
658 |
benjamin |
15 |
import org.tela_botanica.del.client.modeles.InterventionForum;
|
9 |
benjamin |
16 |
import org.tela_botanica.del.client.modeles.Observation;
|
141 |
aurelien |
17 |
import org.tela_botanica.del.client.modeles.PropositionDetermination;
|
103 |
benjamin |
18 |
import org.tela_botanica.del.client.modeles.Protocole;
|
154 |
benjamin |
19 |
import org.tela_botanica.del.client.modeles.VoteDetermination;
|
115 |
benjamin |
20 |
import org.tela_botanica.del.client.modeles.VoteProtocole;
|
282 |
benjamin |
21 |
import org.tela_botanica.del.client.services.rest.ImageService;
|
|
|
22 |
import org.tela_botanica.del.client.services.rest.ObservationService;
|
|
|
23 |
import org.tela_botanica.del.client.services.rest.PropositionDeterminationService;
|
|
|
24 |
import org.tela_botanica.del.client.services.rest.ProtocoleService;
|
|
|
25 |
import org.tela_botanica.del.client.services.rest.VoteProtocoleService;
|
351 |
aurelien |
26 |
import org.tela_botanica.del.client.services.rest.async.ImagesParTaxonCallback;
|
392 |
aurelien |
27 |
import org.tela_botanica.del.client.services.rest.async.ObservationsCallback;
|
814 |
aurelien |
28 |
import org.tela_botanica.del.client.services.rest.async.ProtocolesCallback;
|
823 |
aurelien |
29 |
import org.tela_botanica.del.client.services.rest.async.VoteProtocoleCallback;
|
9 |
benjamin |
30 |
|
282 |
benjamin |
31 |
public class MockDatasource implements ObservationService, ImageService, ProtocoleService, VoteProtocoleService, PropositionDeterminationService {
|
56 |
benjamin |
32 |
|
9 |
benjamin |
33 |
static MockDatasource instance;
|
|
|
34 |
|
|
|
35 |
List<Observation> observations = new ArrayList<Observation>();
|
|
|
36 |
|
658 |
benjamin |
37 |
List<InterventionForum> observationValidationDatas = new ArrayList<InterventionForum>();
|
48 |
benjamin |
38 |
|
282 |
benjamin |
39 |
List<String> propositionsTaxonDatas = new ArrayList<String>();
|
115 |
benjamin |
40 |
|
107 |
benjamin |
41 |
List<Protocole> protocoles = new ArrayList<Protocole>();
|
159 |
benjamin |
42 |
|
154 |
benjamin |
43 |
List<Image> images = new ArrayList<Image>();
|
135 |
gduche |
44 |
|
9 |
benjamin |
45 |
private MockDatasource() {
|
|
|
46 |
|
270 |
gduche |
47 |
HashMap<String, String> auteurObs = new LinkedHashMap<String, String>();
|
|
|
48 |
auteurObs.put("01Juliette 1MOUREAU", "Tragopogon porrifolius subsp. australis (Jord.) Nyman");
|
|
|
49 |
auteurObs.put("02Robert 2LERAS", "Iris lutescens subsp. lutescens");
|
|
|
50 |
auteurObs.put("03Geneviève 3BOTTI", "Euphorbia dendroides L.");
|
|
|
51 |
auteurObs.put("04Robert 4LERAS", "Lonicera japonica Thunb. ex Murray");
|
|
|
52 |
auteurObs.put("05Juliette 5MOUREAU", "Lavatera arborea L.");
|
|
|
53 |
auteurObs.put("06Robert 6LERAS", "Lavatera arborea L.");
|
|
|
54 |
auteurObs.put("07Juliette 7MOUREAU", "Serapias vomeracea (Burm.f.) Briq. ");
|
|
|
55 |
auteurObs.put("08Benjamin 8LIENS", "Lonicera etrusca Santi");
|
|
|
56 |
auteurObs.put("09Aurélient 9PERONNET", "Ophrys scolopax Cav. ");
|
|
|
57 |
auteurObs.put("10Grégoire 10DUCHÉ", "Staehelina dubia L. ");
|
|
|
58 |
auteurObs.put("11Juliette 11MOUREAU", "Tragopogon porrifolius subsp. australis (Jord.) Nyman");
|
|
|
59 |
auteurObs.put("12Robert 12LERAS", "Iris lutescens subsp. lutescens");
|
|
|
60 |
auteurObs.put("13Geneviève 13BOTTI", "Euphorbia dendroides L.");
|
|
|
61 |
auteurObs.put("14Robert 14LERAS", "Lonicera japonica Thunb. ex Murray");
|
|
|
62 |
auteurObs.put("15Juliette 15MOUREAU", "Lavatera arborea L.");
|
|
|
63 |
auteurObs.put("16Robert 16LERAS", "Lavatera arborea L.");
|
|
|
64 |
auteurObs.put("17Juliette 17MOUREAU", "Serapias vomeracea (Burm.f.) Briq. ");
|
|
|
65 |
auteurObs.put("18Benjamin 18LIENS", "Lonicera etrusca Santi");
|
|
|
66 |
auteurObs.put("19Aurélient 19PERONNET", "Ophrys scolopax Cav. ");
|
|
|
67 |
auteurObs.put("20Grégoire 20DUCHÉ", "Staehelina dubia L. ");
|
55 |
gduche |
68 |
|
270 |
gduche |
69 |
auteurObs.put("21Juliette 1MOUREAU", "Tragopogon porrifolius subsp. australis (Jord.) Nyman");
|
|
|
70 |
auteurObs.put("22R2obert 2LERAS", "Iris lutescens subsp. lutescens");
|
|
|
71 |
auteurObs.put("23Ge3neviève 3BOTTI", "Euphorbia dendroides L.");
|
|
|
72 |
auteurObs.put("24Rob4ert 4LERAS", "Lonicera japonica Thunb. ex Murray");
|
|
|
73 |
auteurObs.put("25Jul5iette 5MOUREAU", "Lavatera arborea L.");
|
|
|
74 |
auteurObs.put("26Rob6ert 6LERAS", "Lavatera arborea L.");
|
|
|
75 |
auteurObs.put("27J6ul7iette 7MOUREAU", "Serapias vomeracea (Burm.f.) Briq. ");
|
|
|
76 |
auteurObs.put("28Ben8jamin 8LIENS", "Lonicera etrusca Santi");
|
|
|
77 |
auteurObs.put("29Auré9lient 9PERONNET", "Ophrys scolopax Cav. ");
|
|
|
78 |
auteurObs.put("30Gég10oire 10DUCHÉ", "Staehelina dubia L. ");
|
|
|
79 |
auteurObs.put("31Julie11tte 11MOUREAU", "Tragopogon porrifolius subsp. australis (Jord.) Nyman");
|
|
|
80 |
auteurObs.put("32Rober12t 12LERAS", "Iris lutescens subsp. lutescens");
|
|
|
81 |
auteurObs.put("33Genev13iève 13BOTTI", "Euphorbia dendroides L.");
|
|
|
82 |
auteurObs.put("34Robe14rt 14LERAS", "Lonicera japonica Thunb. ex Murray");
|
|
|
83 |
auteurObs.put("35Julie15tte 15MOUREAU", "Lavatera arborea L.");
|
|
|
84 |
auteurObs.put("36Robe16rt 16LERAS", "Lavatera arborea L.");
|
|
|
85 |
auteurObs.put("37Julie17tte 17MOUREAU", "Serapias vomeracea (Burm.f.) Briq. ");
|
|
|
86 |
auteurObs.put("38Benja1m11in 18LIENS", "Lonicera etrusca Santi");
|
|
|
87 |
auteurObs.put("39Auré1111lient 19PERONNET", "Ophrys scolopax Cav. ");
|
|
|
88 |
auteurObs.put("40Gr545égoire 20DUCHÉ", "Staehelina dubia L. ");
|
282 |
benjamin |
89 |
|
61 |
benjamin |
90 |
ArrayList<String> motsClefs = new ArrayList<String>();
|
|
|
91 |
motsClefs.add("plantnet");
|
|
|
92 |
motsClefs.add("fleur");
|
|
|
93 |
motsClefs.add("fruit");
|
|
|
94 |
|
55 |
gduche |
95 |
Iterator<String> auteurs = auteurObs.keySet().iterator();
|
|
|
96 |
|
103 |
benjamin |
97 |
Protocole protocol1 = new Protocole();
|
814 |
aurelien |
98 |
protocol1.setNom("esthétique");
|
405 |
gduche |
99 |
protocol1.setId(0);
|
100 |
benjamin |
100 |
|
103 |
benjamin |
101 |
Protocole protocol2 = new Protocole();
|
814 |
aurelien |
102 |
protocol2.setNom("capitalisation de scan de feuilles");
|
405 |
gduche |
103 |
protocol2.setId(1);
|
115 |
benjamin |
104 |
|
107 |
benjamin |
105 |
protocoles.add(protocol1);
|
|
|
106 |
protocoles.add(protocol2);
|
100 |
benjamin |
107 |
|
154 |
benjamin |
108 |
VoteDetermination voteDetermination = new VoteDetermination();
|
167 |
aurelien |
109 |
voteDetermination.setVote(1);
|
154 |
benjamin |
110 |
voteDetermination.setDate(new Date());
|
|
|
111 |
voteDetermination.setContributeur("benjamin");
|
9 |
benjamin |
112 |
|
154 |
benjamin |
113 |
PropositionDetermination observationValidationData = new PropositionDetermination();
|
|
|
114 |
observationValidationData.setEspece("Iris lutescens subsp. lutescens");
|
690 |
gduche |
115 |
Contributeur contributeur = new Contributeur("contributeur", "test", "contrib@test.com");
|
|
|
116 |
observationValidationData.setContributeur(contributeur);
|
154 |
benjamin |
117 |
observationValidationData.setId("1");
|
48 |
benjamin |
118 |
|
227 |
aurelien |
119 |
observationValidationData.ajouterVoteDetermination(voteDetermination);
|
154 |
benjamin |
120 |
observationValidationData.setDate(new Date());
|
|
|
121 |
observationValidationDatas.add(observationValidationData);
|
48 |
benjamin |
122 |
|
154 |
benjamin |
123 |
PropositionDetermination observationValidationData2 = new PropositionDetermination();
|
690 |
gduche |
124 |
Contributeur contributeur2 = new Contributeur("contributeur2", "test2", "contrib2@test.com");
|
|
|
125 |
observationValidationData2.setContributeur(contributeur2);
|
154 |
benjamin |
126 |
observationValidationData2.setEspece("Lavatera arborea L.");
|
|
|
127 |
observationValidationData2.setId("2");
|
227 |
aurelien |
128 |
observationValidationData2.ajouterVoteDetermination(voteDetermination);
|
154 |
benjamin |
129 |
observationValidationData2.setDate(new Date());
|
|
|
130 |
observationValidationDatas.add(observationValidationData2);
|
48 |
benjamin |
131 |
|
154 |
benjamin |
132 |
PropositionDetermination observationValidationData3 = new PropositionDetermination();
|
|
|
133 |
observationValidationData3.setEspece("Acer monsp. L.");
|
690 |
gduche |
134 |
Contributeur contributeur3 = new Contributeur("contributeur3", "test3", "contrib3test.com");
|
|
|
135 |
observationValidationData3.setContributeur(contributeur3);
|
|
|
136 |
Commentaire commentaire = new Commentaire(new Contributeur("Benjamin", "Liens", "benjamin@liens.com"), new Date(), "Avec le temps...");
|
|
|
137 |
Commentaire commentaireBis = new Commentaire(new Contributeur("Greg", "Duche", "greg@duche.com"), new Date(), "Pas d'accord avec Greg!");
|
159 |
benjamin |
138 |
commentaire.getListeCommentaires().add(commentaireBis);
|
306 |
aurelien |
139 |
observationValidationData3.ajouterCommentaire(commentaire);
|
247 |
aurelien |
140 |
observationValidationData3.setId("3");
|
227 |
aurelien |
141 |
observationValidationData2.ajouterVoteDetermination(voteDetermination);
|
154 |
benjamin |
142 |
observationValidationData3.setDate(new Date());
|
|
|
143 |
observationValidationDatas.add(observationValidationData3);
|
115 |
benjamin |
144 |
|
154 |
benjamin |
145 |
PropositionDetermination observationValidationData4 = new PropositionDetermination();
|
|
|
146 |
observationValidationData4.setEspece("Acer aceras aus.");
|
690 |
gduche |
147 |
Contributeur contributeur4 = new Contributeur("Pierre", "Desproges", "contrib4test.com");
|
|
|
148 |
observationValidationData4.setContributeur(contributeur4);
|
|
|
149 |
Commentaire commentaire2 = new Commentaire(new Contributeur("Greg","Duche", "gregoire@tela-botanica.org"), new Date(), "Public chéri mon amour...");
|
306 |
aurelien |
150 |
observationValidationData4.ajouterCommentaire(commentaire2);
|
247 |
aurelien |
151 |
observationValidationData4.setId("4");
|
227 |
aurelien |
152 |
observationValidationData4.ajouterVoteDetermination(voteDetermination);
|
154 |
benjamin |
153 |
observationValidationData4.setDate(new Date());
|
|
|
154 |
observationValidationDatas.add(observationValidationData4);
|
|
|
155 |
|
|
|
156 |
PropositionDetermination observationValidationData5 = new PropositionDetermination();
|
|
|
157 |
observationValidationData5.setEspece("Acer monsp subsp. monsp.");
|
690 |
gduche |
158 |
Contributeur contributeur5 = new Contributeur("contributeur5", "nom", "contrib@nom.com");
|
|
|
159 |
observationValidationData5.setContributeur(contributeur5);
|
|
|
160 |
Commentaire commentaire3 = new Commentaire(new Contributeur("tsdt", "emkj", "lkjlkje@teas"), new Date(), "Tout est affaire de décor...");
|
306 |
aurelien |
161 |
observationValidationData5.ajouterCommentaire(commentaire3);
|
247 |
aurelien |
162 |
observationValidationData5.setId("5");
|
227 |
aurelien |
163 |
observationValidationData5.ajouterVoteDetermination(voteDetermination);
|
154 |
benjamin |
164 |
observationValidationData5.setDate(new Date());
|
|
|
165 |
observationValidationDatas.add(observationValidationData5);
|
|
|
166 |
|
199 |
gduche |
167 |
int numobs = 44120;
|
224 |
aurelien |
168 |
for (int i = 0; i < 40; i++) {
|
48 |
benjamin |
169 |
|
103 |
benjamin |
170 |
Observation observation = new Observation();
|
|
|
171 |
String auteur = auteurs.next();
|
|
|
172 |
observation.setAuteur(auteur);
|
351 |
aurelien |
173 |
observation.setNomRetenu(auteurObs.get(auteur));
|
103 |
benjamin |
174 |
|
199 |
gduche |
175 |
numobs += i;
|
103 |
benjamin |
176 |
observation.setNumNomenclatural("num nomenclatural " + i);
|
449 |
gduche |
177 |
observation.setDateReleve("28/09/2011");
|
103 |
benjamin |
178 |
observation.setFamille("famille " + i);
|
|
|
179 |
observation.setLocalite("localite " + i);
|
135 |
gduche |
180 |
observation.setNomRetenu(auteurObs.get(auteur));
|
103 |
benjamin |
181 |
observation.setMotsClefs(motsClefs);
|
658 |
benjamin |
182 |
observation.setInterventionsForum(observationValidationDatas);
|
103 |
benjamin |
183 |
|
154 |
benjamin |
184 |
Image image = new Image();
|
|
|
185 |
image.setIdImage("id image " + i);
|
199 |
gduche |
186 |
image.setUrlFormat("http://www.tela-botanica.org/appli:cel-img:0000" + String.valueOf(numobs) + "%s%.jpg");
|
154 |
benjamin |
187 |
image.setUrl("http://www.tela-botanica.org/appli:cel-img:0000" + String.valueOf(numobs) + "CRS.jpg");
|
199 |
gduche |
188 |
image.setMiniature("http://www.tela-botanica.org/appli:cel-img:0000" + String.valueOf(numobs) + "XS.jpg");
|
154 |
benjamin |
189 |
observation.getImages().add(image);
|
|
|
190 |
image.setObservation(observation);
|
|
|
191 |
images.add(image);
|
|
|
192 |
|
199 |
gduche |
193 |
// nombre d'images aléatoires
|
|
|
194 |
int nbImagesAssociees = (int) Math.round(Math.random() * 10);
|
|
|
195 |
for (int j = 0; j < nbImagesAssociees; j++) {
|
|
|
196 |
numobs++;
|
|
|
197 |
image = new Image();
|
359 |
benjamin |
198 |
image.setIdImage("id image " + i + j);
|
199 |
gduche |
199 |
image.setUrlFormat("http://www.tela-botanica.org/appli:cel-img:0000" + String.valueOf(numobs) + "%s%.jpg");
|
|
|
200 |
image.setUrl("http://www.tela-botanica.org/appli:cel-img:0000" + String.valueOf(numobs) + "CRS.jpg");
|
|
|
201 |
image.setMiniature("http://www.tela-botanica.org/appli:cel-img:0000" + String.valueOf(numobs) + "XS.jpg");
|
|
|
202 |
observation.getImages().add(image);
|
|
|
203 |
image.setObservation(observation);
|
|
|
204 |
images.add(image);
|
|
|
205 |
}
|
|
|
206 |
|
154 |
benjamin |
207 |
VoteProtocole voteProtocole = new VoteProtocole();
|
234 |
gduche |
208 |
voteProtocole.setProtocole(protocol1);
|
159 |
benjamin |
209 |
voteProtocole.setVote(3);
|
154 |
benjamin |
210 |
voteProtocole.setContributeur("aurelien");
|
|
|
211 |
voteProtocole.setDate(new Date());
|
|
|
212 |
|
658 |
benjamin |
213 |
// image.getVoteProtocoles().add(voteProtocole);
|
154 |
benjamin |
214 |
|
159 |
benjamin |
215 |
VoteProtocole voteProtocole2 = new VoteProtocole();
|
234 |
gduche |
216 |
voteProtocole2.setProtocole(protocol2);
|
159 |
benjamin |
217 |
voteProtocole2.setVote(2);
|
|
|
218 |
voteProtocole2.setContributeur("jpm");
|
|
|
219 |
voteProtocole2.setDate(new Date());
|
|
|
220 |
|
658 |
benjamin |
221 |
// image.getVoteProtocoles().add(voteProtocole2);
|
159 |
benjamin |
222 |
|
103 |
benjamin |
223 |
observations.add(observation);
|
|
|
224 |
}
|
199 |
gduche |
225 |
|
180 |
benjamin |
226 |
ajouterVotesAleatoires();
|
177 |
benjamin |
227 |
|
9 |
benjamin |
228 |
}
|
199 |
gduche |
229 |
|
282 |
benjamin |
230 |
private void ajouterVotesAleatoires() {
|
658 |
benjamin |
231 |
for (InterventionForum validation : observationValidationDatas) {
|
199 |
gduche |
232 |
|
658 |
benjamin |
233 |
if (validation instanceof PropositionDetermination) {
|
|
|
234 |
int nbVotesAjoutes = (int) Math.round(Math.random() * 20);
|
199 |
gduche |
235 |
|
658 |
benjamin |
236 |
for (int i = 0; i < nbVotesAjoutes; i++) {
|
|
|
237 |
VoteDetermination vd = new VoteDetermination();
|
|
|
238 |
vd.setVote((int) Math.round(Math.random()));
|
|
|
239 |
vd.setDate(new Date());
|
|
|
240 |
vd.setContributeur("test");
|
|
|
241 |
|
|
|
242 |
((PropositionDetermination) validation).ajouterVoteDetermination(vd);
|
|
|
243 |
}
|
167 |
aurelien |
244 |
}
|
|
|
245 |
}
|
|
|
246 |
}
|
199 |
gduche |
247 |
|
282 |
benjamin |
248 |
/*
|
|
|
249 |
* (non-Javadoc)
|
|
|
250 |
*
|
|
|
251 |
* @see org.tela_botanica.del.client.utils.ObservationService#getImages()
|
|
|
252 |
*/
|
290 |
benjamin |
253 |
public List<Image> getImages(int debut, int fin) {
|
|
|
254 |
List<Image> sousListe = new ArrayList<Image>();
|
|
|
255 |
for (int i = debut; i < fin; i++) {
|
359 |
benjamin |
256 |
if (images.get(i) != null) {
|
290 |
benjamin |
257 |
sousListe.add(images.get(i));
|
|
|
258 |
} else {
|
|
|
259 |
break;
|
|
|
260 |
}
|
|
|
261 |
}
|
359 |
benjamin |
262 |
return sousListe;
|
154 |
benjamin |
263 |
}
|
9 |
benjamin |
264 |
|
359 |
benjamin |
265 |
public List<Observation> getObservations(int debut, int fin) {
|
|
|
266 |
List<Observation> sousListe = new ArrayList<Observation>();
|
|
|
267 |
for (int i = debut; i < fin; i++) {
|
|
|
268 |
if (observations.get(i) != null) {
|
|
|
269 |
sousListe.add(observations.get(i));
|
|
|
270 |
} else {
|
|
|
271 |
break;
|
|
|
272 |
}
|
|
|
273 |
}
|
|
|
274 |
return sousListe;
|
|
|
275 |
}
|
|
|
276 |
|
282 |
benjamin |
277 |
/*
|
|
|
278 |
* (non-Javadoc)
|
|
|
279 |
*
|
|
|
280 |
* @see
|
|
|
281 |
* org.tela_botanica.del.client.utils.ObservationService#getVote(java.lang
|
|
|
282 |
* .String)
|
|
|
283 |
*/
|
|
|
284 |
@Override
|
177 |
benjamin |
285 |
public List<VoteProtocole> getVote(String idImage) {
|
|
|
286 |
for (Image image : images) {
|
|
|
287 |
if (image.getIdImage().equals(idImage)) {
|
500 |
aurelien |
288 |
return null;
|
658 |
benjamin |
289 |
// return image.getVoteProtocoles();
|
154 |
benjamin |
290 |
}
|
177 |
benjamin |
291 |
|
154 |
benjamin |
292 |
}
|
374 |
aurelien |
293 |
return new ArrayList<VoteProtocole>(0);
|
9 |
benjamin |
294 |
}
|
48 |
benjamin |
295 |
|
282 |
benjamin |
296 |
/*
|
|
|
297 |
* (non-Javadoc)
|
|
|
298 |
*
|
|
|
299 |
* @see org.tela_botanica.del.client.utils.ObservationService#
|
|
|
300 |
* getVoteByImageAndProtocol(java.lang.String, java.lang.String)
|
|
|
301 |
*/
|
|
|
302 |
@Override
|
500 |
aurelien |
303 |
public List<VoteProtocole> getVotePourImageEtProtocole(String idImage, String protocolName) {
|
154 |
benjamin |
304 |
|
177 |
benjamin |
305 |
List<VoteProtocole> voteProtocolesLocal = new ArrayList<VoteProtocole>();
|
|
|
306 |
|
445 |
benjamin |
307 |
int rand = (int) (Math.random() * 5);
|
|
|
308 |
for (int i = 0; i < rand; i++) {
|
|
|
309 |
VoteProtocole voteProtocole = new VoteProtocole();
|
|
|
310 |
voteProtocole.setProtocole(protocoles.get(0));
|
|
|
311 |
voteProtocole.setVote((int) (Math.random() * 5));
|
|
|
312 |
voteProtocole.setContributeur("aurelien");
|
|
|
313 |
voteProtocole.setDate(new Date());
|
|
|
314 |
|
|
|
315 |
VoteProtocole voteProtocole2 = new VoteProtocole();
|
|
|
316 |
voteProtocole2.setProtocole(protocoles.get(0));
|
|
|
317 |
voteProtocole2.setVote((int) (Math.random() * 5));
|
|
|
318 |
voteProtocole2.setContributeur("jpm");
|
|
|
319 |
voteProtocole2.setDate(new Date());
|
|
|
320 |
|
|
|
321 |
voteProtocolesLocal.add(voteProtocole);
|
|
|
322 |
voteProtocolesLocal.add(voteProtocole2);
|
|
|
323 |
}
|
658 |
benjamin |
324 |
return voteProtocolesLocal;
|
103 |
benjamin |
325 |
}
|
|
|
326 |
|
135 |
gduche |
327 |
|
823 |
aurelien |
328 |
|
282 |
benjamin |
329 |
/*
|
|
|
330 |
* (non-Javadoc)
|
|
|
331 |
*
|
|
|
332 |
* @see
|
|
|
333 |
* org.tela_botanica.del.client.utils.ObservationService#saveValidationData
|
|
|
334 |
* (org.tela_botanica.del.client.modeles.PropositionDetermination)
|
|
|
335 |
*/
|
|
|
336 |
@Override
|
294 |
benjamin |
337 |
public void saveValidationData(String idObservation, PropositionDetermination validationData) throws ExceptionClient {
|
154 |
benjamin |
338 |
observationValidationDatas.add(validationData);
|
48 |
benjamin |
339 |
}
|
|
|
340 |
|
9 |
benjamin |
341 |
public static MockDatasource getInstance() {
|
|
|
342 |
if (instance == null) {
|
|
|
343 |
instance = new MockDatasource();
|
|
|
344 |
}
|
|
|
345 |
return instance;
|
|
|
346 |
}
|
154 |
benjamin |
347 |
|
312 |
gduche |
348 |
@Override
|
359 |
benjamin |
349 |
public void getImagesEfloreParTaxon(String nomTaxon, ImagesParTaxonCallback callback) {
|
351 |
aurelien |
350 |
// TODO Auto-generated method stub
|
360 |
benjamin |
351 |
|
312 |
gduche |
352 |
}
|
|
|
353 |
|
351 |
aurelien |
354 |
@Override
|
359 |
benjamin |
355 |
public void getImagesParTaxon(InformationsRecherche informationsRecherche, int debut, int fin, ImagesParTaxonCallback callback) {
|
351 |
aurelien |
356 |
// TODO Auto-generated method stub
|
360 |
benjamin |
357 |
|
351 |
aurelien |
358 |
}
|
359 |
benjamin |
359 |
|
392 |
aurelien |
360 |
@Override
|
516 |
aurelien |
361 |
public void getObservations(InformationsRecherche informationsRecherche, int debut, int fin, ObservationsCallback callback) {
|
392 |
aurelien |
362 |
// TODO Auto-generated method stub
|
|
|
363 |
}
|
|
|
364 |
|
445 |
benjamin |
365 |
@Override
|
|
|
366 |
public void getImagesParObservation(String observationId, ImagesParTaxonCallback callback) {
|
|
|
367 |
// TODO Auto-generated method stub
|
658 |
benjamin |
368 |
|
445 |
benjamin |
369 |
}
|
|
|
370 |
|
814 |
aurelien |
371 |
@Override
|
|
|
372 |
public void getProtocoles(ProtocolesCallback pc) {
|
|
|
373 |
// TODO Auto-generated method stub
|
|
|
374 |
|
|
|
375 |
}
|
|
|
376 |
|
|
|
377 |
@Override
|
|
|
378 |
public void getProtocole(String nomProtocole) {
|
|
|
379 |
// TODO Auto-generated method stub
|
|
|
380 |
|
|
|
381 |
}
|
|
|
382 |
|
823 |
aurelien |
383 |
@Override
|
|
|
384 |
public void ajouterVote(String idImage, VoteProtocole voteProtocole,
|
|
|
385 |
VoteProtocoleCallback callback) {
|
|
|
386 |
// TODO Auto-generated method stub
|
|
|
387 |
|
|
|
388 |
}
|
|
|
389 |
|
|
|
390 |
@Override
|
|
|
391 |
public void modifierVote(String idImage, VoteProtocole voteProtocole,
|
|
|
392 |
VoteProtocoleCallback vpc) {
|
|
|
393 |
// TODO Auto-generated method stub
|
|
|
394 |
|
|
|
395 |
}
|
|
|
396 |
|
9 |
benjamin |
397 |
}
|