Subversion Repositories eFlore/Applications.del

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
9 benjamin 1
package org.tela_botanica.del.client.modeles;
2
 
3
import java.io.Serializable;
60 benjamin 4
import java.util.ArrayList;
9 benjamin 5
import java.util.List;
6
 
113 aurelien 7
import org.tela_botanica.del.client.utils.GwtObservable;
9 benjamin 8
 
113 aurelien 9
public class Observation extends GwtObservable implements Serializable {
10
 
9 benjamin 11
	private static final long serialVersionUID = 840032625524143547L;
12
 
13
	private String auteur;
14
 
15
	private String species;
16
 
34 gduche 17
	private String nomRetenu;
9 benjamin 18
 
19
	private String famille;
20
 
21
	private String localite;
22
 
23
	private String date;
24
 
25
	private String url;
26
 
27
	private String idImage;
28
 
29
	private String numNomenclatural;
30
 
60 benjamin 31
	private List<String> motsClefs = new ArrayList<String>();
32
 
141 aurelien 33
	private List<PropositionDetermination> imageCelValidationDatas;
9 benjamin 34
 
116 benjamin 35
	private List<VoteProtocole> voteProtocoles;
36
 
9 benjamin 37
	public String getAuteur() {
38
		return auteur;
39
	}
40
 
41
	public void setAuteur(String auteur) {
42
		this.auteur = auteur;
43
	}
44
 
45
	public String getSpecies() {
46
		return species;
47
	}
48
 
49
	public void setSpecies(String species) {
50
		this.species = species;
51
	}
52
 
34 gduche 53
	public String getNomRetenu() {
54
		return nomRetenu;
9 benjamin 55
	}
56
 
34 gduche 57
	public void setNomRetenu(String commonName) {
58
		this.nomRetenu = commonName;
9 benjamin 59
	}
60
 
61
	public String getFamille() {
62
		return famille;
63
	}
64
 
65
	public void setFamille(String famille) {
66
		this.famille = famille;
67
	}
68
 
69
	public String getLocalite() {
70
		return localite;
71
	}
72
 
73
	public void setLocalite(String localite) {
74
		this.localite = localite;
75
	}
76
 
77
	public String getDate() {
78
		return date;
79
	}
80
 
81
	public void setDate(String date) {
82
		this.date = date;
83
	}
84
 
85
	public String getUrl() {
86
		return url;
87
	}
88
 
89
	public void setUrl(String url) {
90
		this.url = url;
91
	}
92
 
93
	public String getNumNomenclatural() {
94
		return numNomenclatural;
95
	}
96
 
97
	public void setNumNomenclatural(String numNomenclatural) {
98
		this.numNomenclatural = numNomenclatural;
99
	}
100
 
101
	public String getIdImage() {
102
		return idImage;
103
	}
104
 
105
	public void setIdImage(String idImage) {
106
		this.idImage = idImage;
107
	}
108
 
141 aurelien 109
	public List<PropositionDetermination> getImageCelValidationDatas() {
9 benjamin 110
		return imageCelValidationDatas;
111
	}
112
 
141 aurelien 113
	public void setImageCelValidationDatas(List<PropositionDetermination> imageCelValidationDatas) {
9 benjamin 114
		this.imageCelValidationDatas = imageCelValidationDatas;
115
	}
116
 
60 benjamin 117
	public List<String> getMotsClefs() {
118
		return motsClefs;
119
	}
120
 
121
	public void setMotsClefs(List<String> motsClefs) {
122
		this.motsClefs = motsClefs;
123
	}
124
 
116 benjamin 125
	public List<VoteProtocole> getVoteProtocoles() {
126
		return voteProtocoles;
127
	}
128
 
129
	public void setVoteProtocoles(List<VoteProtocole> voteProtocoles) {
130
		this.voteProtocoles = voteProtocoles;
131
	}
135 gduche 132
 
141 aurelien 133
	public void addImageCelValidationData(PropositionDetermination observationValidation) {
117 aurelien 134
		imageCelValidationDatas.add(observationValidation);
135
		setChanged();
136
		notifyObservers();
137
	}
135 gduche 138
 
117 aurelien 139
	public ArrayList<String> getPropositionsTaxonsData() {
135 gduche 140
 
117 aurelien 141
		ArrayList<String> propositionsTaxonDatas = new ArrayList<String>();
141 aurelien 142
		for (PropositionDetermination observationValidation : imageCelValidationDatas) {
117 aurelien 143
			String espece = observationValidation.getEspece();
144
			if (espece != "" && !propositionsTaxonDatas.contains(espece)) {
145
				propositionsTaxonDatas.add(observationValidation.getEspece());
146
			}
147
		}
135 gduche 148
 
117 aurelien 149
		return propositionsTaxonDatas;
150
	}
116 benjamin 151
 
9 benjamin 152
}