Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 453 Rev 524
Line 177... Line 177...
177
			if (valeur != null) {
177
			if (valeur != null) {
178
				ontologie.put(cle, valeur);
178
				ontologie.put(cle, valeur);
179
			}
179
			}
180
		}
180
		}
181
	}
181
	}
-
 
182
	
-
 
183
	protected String construireTxtListeOntologie(String chaineAAnalyser) {
-
 
184
		ArrayList<String> termes = new ArrayList<String>();
-
 
185
		ArrayList<String> autres = new ArrayList<String>();
-
 
186
		if ((chaineAAnalyser != null) && (!chaineAAnalyser.trim().equals("")))	{
-
 
187
			String[] valeurs = chaineAAnalyser.split(";;");
-
 
188
			int nbreValeurs = valeurs.length;
-
 
189
			if (nbreValeurs > 0)	{
-
 
190
				for (int i = 0; i < nbreValeurs; i++)	{
-
 
191
					String id = valeurs[i];
-
 
192
					if (id.contains("AUTRE##"))	{
-
 
193
						String txt = id.replaceFirst("^AUTRE##", "");
-
 
194
						if (!txt.equals("")) {
-
 
195
							autres.add(txt);
-
 
196
						}
-
 
197
					} else if (id.matches("^[0-9]+$"))	{
-
 
198
						if (ontologie != null) {
-
 
199
							Valeur valeur = ontologie.get(id);
-
 
200
							if (valeur != null) {
-
 
201
								String termeOntologie = valeur.getNom();
-
 
202
								termes.add(termeOntologie);
-
 
203
							}
-
 
204
						}
-
 
205
					}
-
 
206
				}
-
 
207
			}
-
 
208
		}
-
 
209
		
-
 
210
		String chaineTermes = formaterTableauDeTxt(termes);
-
 
211
		String chaineAutres = formaterTableauDeTxt(autres);
-
 
212
		String chaineARetourner = chaineTermes+formaterAutre(chaineAutres);
-
 
213
		
-
 
214
		return chaineARetourner;
-
 
215
	}
-
 
216
	
182
}
217
}
183
218