Subversion Repositories eFlore/Applications.del

Rev

Rev 602 | Rev 659 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 602 Rev 658
Line 2... Line 2...
2
 
2
 
3
import java.io.Serializable;
3
import java.io.Serializable;
4
import java.util.ArrayList;
4
import java.util.ArrayList;
Line -... Line 5...
-
 
5
import java.util.List;
-
 
6
 
5
import java.util.List;
7
import org.tela_botanica.del.client.cache.CacheClient;
Line 6... Line 8...
6
 
8
 
7
public class Observation implements Serializable {
9
public class Observation implements Serializable {
Line 8... Line 10...
8
 
10
 
-
 
11
	private static final long serialVersionUID = 840032625524143547L;
-
 
12
	private String id, auteur, nomRetenu, famille, localite, idLocalite, dateTransmission, numNomenclatural, nomCommun, lieuDit, milieu, commentaire, dateReleve;
-
 
13
 
9
	private static final long serialVersionUID = 840032625524143547L;
14
	private List<String> motsClefs = new ArrayList<String>();
10
	private String id, auteur, nomRetenu, famille, localite, idLocalite, dateTransmission, numNomenclatural, nomCommun, lieuDit, milieu, commentaire, dateReleve;
15
 
Line 11... Line 16...
11
 
16
	// les propositions sont une liste ordonnée qui contient soit des
12
	private List<String> motsClefs = new ArrayList<String>();
17
	// proposition de determinations, soit des commentaires
13
	private List<PropositionDetermination> propositionsDetermination = new ArrayList<PropositionDetermination>();
18
	private List<InterventionForum> propositions = new ArrayList<InterventionForum>();
Line 30... Line 35...
30
	}
35
	}
Line 31... Line 36...
31
 
36
 
32
	public String getNomCommun() {
37
	public String getNomCommun() {
33
		return nomCommun;
38
		return nomCommun;
34
	}
39
	}
35
	
40
 
36
	public void setNomCommun(String nomCommun) {
41
	public void setNomCommun(String nomCommun) {
37
		this.nomCommun = nomCommun;
42
		this.nomCommun = nomCommun;
38
	}
43
	}
39
	
44
 
40
	public String getLieuDit() {
45
	public String getLieuDit() {
41
		return this.lieuDit;
46
		return this.lieuDit;
42
	}
47
	}
43
	
48
 
44
	public void setLieuDit(String lieuDit) {
49
	public void setLieuDit(String lieuDit) {
45
		this.lieuDit = lieuDit;
50
		this.lieuDit = lieuDit;
46
	}
51
	}
47
	
52
 
48
	public String getMilieu() {
53
	public String getMilieu() {
49
		return milieu;
54
		return milieu;
50
	}
55
	}
51
	
56
 
52
	public void setMilieu(String milieu) {
57
	public void setMilieu(String milieu) {
53
		this.milieu = milieu;
58
		this.milieu = milieu;
54
	}
59
	}
55
	
60
 
56
	public String getCommentaire() {
61
	public String getCommentaire() {
57
		return commentaire;
62
		return commentaire;
58
	}
63
	}
59
	
64
 
60
	public void setCommentaire(String commentaire) {
65
	public void setCommentaire(String commentaire) {
61
		this.commentaire = commentaire;
66
		this.commentaire = commentaire;
62
	}
67
	}
63
	
68
 
64
	public String getFamille() {
69
	public String getFamille() {
65
		return famille;
70
		return famille;
Line 66... Line 71...
66
	}
71
	}
Line 74... Line 79...
74
	}
79
	}
Line 75... Line 80...
75
 
80
 
76
	public void setIdLocalite(String idlocalite) {
81
	public void setIdLocalite(String idlocalite) {
77
		this.idLocalite = idlocalite;
82
		this.idLocalite = idlocalite;
78
	}
83
	}
79
	
84
 
80
	public String getLocalite() {
85
	public String getLocalite() {
81
		return localite;
86
		return localite;
82
	}
87
	}
83
	
88
 
84
	public String getLocaliteAvecIdFormatee() {
89
	public String getLocaliteAvecIdFormatee() {
85
		String localiteFormatee = this.localite;
90
		String localiteFormatee = this.localite;
86
		if(idLocalite != null && idLocalite.length() >= 2) {
91
		if (idLocalite != null && idLocalite.length() >= 2) {
87
			localiteFormatee += " ("+idLocalite.substring(0, 2)+")";
92
			localiteFormatee += " (" + idLocalite.substring(0, 2) + ")";
88
		}
93
		}
89
		
94
 
90
		return localiteFormatee;
95
		return localiteFormatee;
Line 91... Line 96...
91
	}
96
	}
92
 
97
 
93
	public void setLocalite(String localite) {
98
	public void setLocalite(String localite) {
Line 94... Line 99...
94
		this.localite = localite;
99
		this.localite = localite;
95
	}
100
	}
96
 
101
 
97
	public String getDateTransmission() {
102
	public String getDateTransmission() {
98
		return dateTransmission;
103
		return dateTransmission;
99
	}
104
	}
100
	
105
 
Line 101... Line 106...
101
	public void setDateTransmission(String date) {
106
	public void setDateTransmission(String date) {
102
		this.dateTransmission = date;
107
		this.dateTransmission = date;
103
	}
108
	}
104
 
109
 
105
	public String getDateReleve() {
110
	public String getDateReleve() {
106
		return dateReleve;
111
		return dateReleve;
107
	}
112
	}
108
	
113
 
109
	public void setDateReleve(String dateReleve) {
114
	public void setDateReleve(String dateReleve) {
110
		this.dateReleve = dateReleve;
115
		this.dateReleve = dateReleve;
111
	}
116
	}
Line 112... Line 117...
112
	
117
 
113
	public String getNumNomenclatural() {
118
	public String getNumNomenclatural() {
114
		return numNomenclatural;
119
		return numNomenclatural;
Line 115... Line 120...
115
	}
120
	}
116
 
121
 
117
	public void setNumNomenclatural(String numNomenclatural) {
122
	public void setNumNomenclatural(String numNomenclatural) {
Line 118... Line 123...
118
		this.numNomenclatural = numNomenclatural;
123
		this.numNomenclatural = numNomenclatural;
119
	}
124
	}
120
 
125
 
Line 121... Line 126...
121
	public List<PropositionDetermination> getPropositionsDetermination() {
126
	public List<InterventionForum> getInterventionsForum() {
122
		return propositionsDetermination;
127
		return propositions;
123
	}
128
	}
Line 124... Line 129...
124
 
129
 
125
	public void setImageCelValidationDatas(List<PropositionDetermination> propositionsDetermination) {
130
	public void setInterventionsForum(List<InterventionForum> propositions) {
126
		this.propositionsDetermination = propositionsDetermination;
131
		this.propositions = propositions;
127
	}
132
	}
128
 
133
 
129
	public List<String> getMotsClefs() {
134
	public List<String> getMotsClefs() {
130
		return motsClefs;
135
		return motsClefs;
131
	}
136
	}
132
 
137
 
133
	public void setMotsClefs(List<String> motsClefs) {
138
	public void setMotsClefs(List<String> motsClefs) {
Line 134... Line 139...
134
		this.motsClefs = motsClefs;
139
		this.motsClefs = motsClefs;
135
	}
140
	}
136
	
141
 
Line 137... Line 142...
137
	public void ajouterMotsClef(String motsClefs) {
142
	public void ajouterMotsClef(String motsClefs) {
Line 138... Line 143...
138
		if (this.motsClefs == null) {
143
		if (this.motsClefs == null) {
-
 
144
			this.motsClefs = new ArrayList<String>();
139
			this.motsClefs = new ArrayList<String>();
145
		}
140
		}
146
		this.motsClefs.add(motsClefs);
141
		this.motsClefs.add(motsClefs);
147
	}
142
	}
148
 
-
 
149
	public void ajouterPropositionDetermination(PropositionDetermination observationValidation) {
143
 
150
		propositions.add(observationValidation);
144
	public void ajouterPropositionDetermination(PropositionDetermination observationValidation) {
151
	}
Line 145... Line 152...
145
		propositionsDetermination.add(observationValidation);
152
 
146
	}
153
	public ArrayList<String> getPropositionsTaxonsData() {
Line -... Line 154...
-
 
154
 
-
 
155
		ArrayList<String> propositionsTaxonDatas = new ArrayList<String>();
-
 
156
		for (InterventionForum proposition : propositions) {
-
 
157
			if (proposition instanceof PropositionDetermination) {
-
 
158
				String espece = ((PropositionDetermination) proposition).getEspece();
-
 
159
				if (espece != "" && !propositionsTaxonDatas.contains(espece)) {
-
 
160
					propositionsTaxonDatas.add(espece);
-
 
161
				}
-
 
162
			}
-
 
163
		}
147
 
164
 
148
	public ArrayList<String> getPropositionsTaxonsData() {
165
		return propositionsTaxonDatas;
149
 
166
	}
Line 150... Line 167...
150
		ArrayList<String> propositionsTaxonDatas = new ArrayList<String>();
167