Subversion Repositories eFlore/Applications.del

Rev

Rev 232 | Rev 629 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
147 benjamin 1
package org.tela_botanica.del.client.modeles;
2
 
3
import java.util.ArrayList;
500 aurelien 4
import java.util.HashMap;
147 benjamin 5
import java.util.List;
500 aurelien 6
import java.util.Map;
147 benjamin 7
 
500 aurelien 8
import com.google.gwt.user.client.Window;
9
 
147 benjamin 10
public class Image {
11
 
12
	private String idImage;
13
	private Observation observation;
14
	private String url;
198 gduche 15
	private String urlFormat;
16
	private String miniature;
17
 
147 benjamin 18
	public String getUrl() {
19
		return url;
20
	}
21
 
198 gduche 22
	public String getMiniature() {
23
		return miniature;
24
	}
25
 
26
	public String getUrlFormat(String format) {
27
		return urlFormat.replaceAll("%s%", format);
28
	}
29
 
30
	public void setUrlFormat(String urlFormat) {
31
		this.urlFormat = urlFormat;
32
	}
33
 
147 benjamin 34
	public void setUrl(String url) {
35
		this.url = url;
36
	}
37
 
198 gduche 38
	public void setMiniature(String url) {
39
		miniature = url;
40
	}
41
 
147 benjamin 42
	public String getIdImage() {
43
		return idImage;
44
	}
45
 
46
	public void setIdImage(String idImage) {
47
		this.idImage = idImage;
48
	}
49
 
500 aurelien 50
	private Map<String, List<VoteProtocole>> voteProtocoles = new HashMap<String, List<VoteProtocole>>();
147 benjamin 51
 
500 aurelien 52
	public List<VoteProtocole> getVoteProtocoles(String id_protocole) {
53
		if(!voteProtocoles.containsKey(""+id_protocole) || voteProtocoles.get(""+id_protocole) == null) {
54
			voteProtocoles.put(""+id_protocole, new ArrayList<VoteProtocole>());
55
		}
56
		return voteProtocoles.get(id_protocole+"");
147 benjamin 57
	}
500 aurelien 58
 
59
	public List<VoteProtocole> getVotesProtocoles(int id_protocole) {
60
		return getVoteProtocoles(id_protocole+"");
61
	}
62
 
63
	public void setVoteProtocoles(Map<String, List<VoteProtocole>> voteProtocoles) {
147 benjamin 64
		this.voteProtocoles = voteProtocoles;
65
	}
66
 
500 aurelien 67
	public void setVoteProtocoles(String id_protocole, List<VoteProtocole> voteProtocoles) {
68
		this.voteProtocoles.put(id_protocole, voteProtocoles);
69
	}
70
 
147 benjamin 71
	public Observation getObservation() {
72
		return observation;
73
	}
74
 
75
	public void setObservation(Observation observation) {
76
		this.observation = observation;
77
	}
78
 
79
}