use of mom.trd.opentheso.core.exports.helper.ExportThesaurus in project opentheso by miledrousset.
the class DownloadBean method getAllAltLabels.
public StreamedContent getAllAltLabels(String idTheso, String codeLang) {
progress_per_100 = 0;
progress_abs = 0;
ExportThesaurus exportThesaurus = new ExportThesaurus();
StringBuilder stringBuilder = exportThesaurus.exportAltLabel(connect.getPoolConnexion(), idTheso, codeLang);
if (stringBuilder == null)
return null;
InputStream stream;
try {
stream = new ByteArrayInputStream(stringBuilder.toString().getBytes("UTF-8"));
file = new DefaultStreamedContent(stream, "text/csv", "AltLabels_" + idTheso + ".csv");
} catch (UnsupportedEncodingException ex) {
Logger.getLogger(DownloadBean.class.getName()).log(Level.SEVERE, null, ex);
}
return file;
}
Aggregations