use of eu.esdihumboldt.hale.common.core.report.writer.ReportReader in project hale by halestudio.
the class ReportServiceImpl method loadReport.
/**
* @see eu.esdihumboldt.hale.ui.service.report.ReportService#loadReport(java.io.File)
*/
@Override
public void loadReport(File file) throws org.eclipse.jface.bindings.keys.ParseException {
// create a ReportReader
ReportReader rr = new ReportReader();
// read all sessions from log folder
ReportSession s = rr.readFile(file);
if (s == null) {
throw new org.eclipse.jface.bindings.keys.ParseException("Log could not be read.");
}
// add them to internal storage
this.reps.put(s.getId(), s);
}
use of eu.esdihumboldt.hale.common.core.report.writer.ReportReader in project hale by halestudio.
the class ReportServiceImpl method loadReportsOnStartup.
/**
* @see eu.esdihumboldt.hale.ui.service.report.ReportService#loadReportsOnStartup()
*/
@Override
public void loadReportsOnStartup() {
// folder where the reports shall be stored
File folder = new File(Platform.getLocation().toString() + "/reports/");
// create a ReportReader
ReportReader rr = new ReportReader();
// read all sessions from log folder
List<ReportSession> list = rr.readDirectory(folder);
// add them to internal storage
for (ReportSession s : list) {
this.reps.put(s.getId(), s);
}
}
Aggregations