* @see net.xeoh.plugins.diagnosisreader.converters.Converter#convert(java.io.File)
*/
@Override
public void convert(File file) {
final CoreFile f = $(file.getAbsolutePath() + ".txt").file().delete();
this.diagnosis.replay(file.getAbsolutePath(), new DiagnosisMonitor<Serializable>() {
@Override
public void onStatusChange(DiagnosisStatus<Serializable> status) {
final StringBuilder sb = new StringBuilder();
sb.append(status.getDate());
sb.append(" ");
sb.append($(status.getChannelAsString()).split("\\.").get(-1));
sb.append(" ");
sb.append(status.getValue());
sb.append(" { ");
sb.append($(status.getInfos()).map(new F1<OptionInfo, String>() {
@Override
public String f(OptionInfo arg0) {
return arg0.getKey() + ":" + $(arg0.getValue()).get("null");
}
}).string().join(", "));
sb.append(" }\n");
// Write text to file
f.append(sb.toString());
}
});
}