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 numNomenclatural;
26
 
60 benjamin 27
	private List<String> motsClefs = new ArrayList<String>();
28
 
147 benjamin 29
	private List<PropositionDetermination> imageCelValidationDatas = new ArrayList<PropositionDetermination>();
9 benjamin 30
 
147 benjamin 31
	private List<Image> images=new ArrayList<Image>();
116 benjamin 32
 
9 benjamin 33
	public String getAuteur() {
34
		return auteur;
35
	}
36
 
37
	public void setAuteur(String auteur) {
38
		this.auteur = auteur;
39
	}
40
 
41
	public String getSpecies() {
42
		return species;
43
	}
44
 
45
	public void setSpecies(String species) {
46
		this.species = species;
47
	}
48
 
34 gduche 49
	public String getNomRetenu() {
50
		return nomRetenu;
9 benjamin 51
	}
52
 
34 gduche 53
	public void setNomRetenu(String commonName) {
54
		this.nomRetenu = commonName;
9 benjamin 55
	}
56
 
57
	public String getFamille() {
58
		return famille;
59
	}
60
 
61
	public void setFamille(String famille) {
62
		this.famille = famille;
63
	}
64
 
65
	public String getLocalite() {
66
		return localite;
67
	}
68
 
69
	public void setLocalite(String localite) {
70
		this.localite = localite;
71
	}
72
 
73
	public String getDate() {
74
		return date;
75
	}
76
 
77
	public void setDate(String date) {
78
		this.date = date;
79
	}
80
 
81
	public String getNumNomenclatural() {
82
		return numNomenclatural;
83
	}
84
 
85
	public void setNumNomenclatural(String numNomenclatural) {
86
		this.numNomenclatural = numNomenclatural;
87
	}
88
 
141 aurelien 89
	public List<PropositionDetermination> getImageCelValidationDatas() {
9 benjamin 90
		return imageCelValidationDatas;
91
	}
92
 
141 aurelien 93
	public void setImageCelValidationDatas(List<PropositionDetermination> imageCelValidationDatas) {
9 benjamin 94
		this.imageCelValidationDatas = imageCelValidationDatas;
95
	}
96
 
60 benjamin 97
	public List<String> getMotsClefs() {
98
		return motsClefs;
99
	}
100
 
101
	public void setMotsClefs(List<String> motsClefs) {
102
		this.motsClefs = motsClefs;
103
	}
104
 
141 aurelien 105
	public void addImageCelValidationData(PropositionDetermination observationValidation) {
117 aurelien 106
		imageCelValidationDatas.add(observationValidation);
107
		setChanged();
108
		notifyObservers();
109
	}
135 gduche 110
 
117 aurelien 111
	public ArrayList<String> getPropositionsTaxonsData() {
135 gduche 112
 
117 aurelien 113
		ArrayList<String> propositionsTaxonDatas = new ArrayList<String>();
141 aurelien 114
		for (PropositionDetermination observationValidation : imageCelValidationDatas) {
117 aurelien 115
			String espece = observationValidation.getEspece();
116
			if (espece != "" && !propositionsTaxonDatas.contains(espece)) {
117
				propositionsTaxonDatas.add(observationValidation.getEspece());
118
			}
119
		}
135 gduche 120
 
117 aurelien 121
		return propositionsTaxonDatas;
122
	}
116 benjamin 123
 
147 benjamin 124
	public List<Image> getImages() {
125
		return images;
126
	}
127
 
128
	public void setImages(List<Image> images) {
129
		this.images = images;
130
	}
131
 
9 benjamin 132
}