Subversion Repositories eFlore/Applications.coel

Rev

Rev 1306 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1306 Rev 1344
Line 81... Line 81...
81
		
81
		
82
		return chaineARetourner;
82
		return chaineARetourner;
Line 83... Line 83...
83
	}
83
	}
-
 
84
		
-
 
85
	protected String construireTxtTruck(String chaineAAnalyser) {
-
 
86
		return construireTxtTruck(chaineAAnalyser, true);
-
 
87
	}
84
		
88
	
Line 85... Line 89...
85
	protected String construireTxtTruck(String chaineAAnalyser) {
89
	protected String construireTxtTruck(String chaineAAnalyser, boolean ucFirst) {
86
		ArrayList<String> termes = new ArrayList<String>();
90
		ArrayList<String> termes = new ArrayList<String>();
87
		
91
		
Line 95... Line 99...
95
					termes.add(valeurFormatee);
99
					termes.add(valeurFormatee);
96
				}
100
				}
97
			}
101
			}
98
		}
102
		}
Line 99... Line 103...
99
		
103
		
100
		String chaineARetourner = formaterTableauDeTxt(termes);
104
		String chaineARetourner = formaterTableauDeTxt(termes, ucFirst);
101
		return chaineARetourner;
105
		return chaineARetourner;
Line 102... Line 106...
102
	}
106
	}
103
	
107
	
Line 121... Line 125...
121
			chaineAAfficher = "("+chaineAAfficher+")";
125
			chaineAAfficher = "("+chaineAAfficher+")";
122
		}
126
		}
123
		return chaineAAfficher;
127
		return chaineAAfficher;
124
	}
128
	}
Line 125... Line 129...
125
	
129
	
126
	protected String formaterTableauDeTxt(ArrayList<String> tableauDeTxt) {
130
	protected String formaterTableauDeTxt(ArrayList<String> tableauDeTxt, boolean ucFirst) {
127
		String chaineAAfficher = "";
131
		String chaineAAfficher = "";
128
		int tailleDuTableau = tableauDeTxt.size();
132
		int tailleDuTableau = tableauDeTxt.size();
129
		if (tailleDuTableau > 0) {
133
		if (tailleDuTableau > 0) {
130
			int indexAvtDernier = tailleDuTableau - 1;
134
			int indexAvtDernier = tailleDuTableau - 1;
Line 135... Line 139...
135
				} else {
139
				} else {
136
					chaineAAfficher += nettoyerPointFinal(mot)+".";
140
					chaineAAfficher += nettoyerPointFinal(mot)+".";
137
				}
141
				}
138
			}
142
			}
139
		}
143
		}
140
		return UtilString.ucFirst(chaineAAfficher);
144
		if (ucFirst) return UtilString.ucFirst(chaineAAfficher);
-
 
145
		else return chaineAAfficher;
141
	}
146
	}
Line 142... Line 147...
142
	
147
	
143
	protected String nettoyerPointFinal(String mot) {
148
	protected String nettoyerPointFinal(String mot) {
144
		mot = mot.replaceAll("[.]$", "");
149
		mot = mot.replaceAll("[.]$", "");
Line 292... Line 297...
292
					}
297
					}
293
				}
298
				}
294
			}
299
			}
295
		}
300
		}
Line 296... Line 301...
296
		
301
		
297
		String chaineTermes = formaterTableauDeTxt(termes);
302
		String chaineTermes = formaterTableauDeTxt(termes, true);
298
		String chaineAutres = formaterTableauDeTxt(autres);
303
		String chaineAutres = formaterTableauDeTxt(autres, true);
Line 299... Line 304...
299
		String chaineARetourner = chaineTermes+formaterAutre(chaineAutres);
304
		String chaineARetourner = chaineTermes+formaterAutre(chaineAutres);
300
		
305
		
301
		return chaineARetourner;
306
		return chaineARetourner;
302
	}
307
	}