public class ResultExport extends Object
Modifier and Type | Field and Description |
---|---|
static String |
R_LIBRARY
The name of the R library required for report generation.
|
static String |
TEMPLATE_DIRECTORY
The template directory.
|
Constructor and Description |
---|
ResultExport(ProjectionModel projectionModel,
File targetDirectory,
IResultFilter resultFilter)
Instantiates a new result export.
|
Modifier and Type | Method and Description |
---|---|
protected double[][] |
calcQuantiles(double[][] inputMatrix)
Calculates quantiles per column.
|
protected String |
createEquidistantDensityYearList(int jumpOffYear)
Creates the density year list.
|
void |
createResultReport(IProgressObserver progress)
Creates result report displaying aggregated results.
|
void |
exportAggregatedResults(IProgressObserver progress)
Exports aggregated data.
|
void |
exportAllResults()
Exports all results.
|
protected double[][] |
filter(double[][] original)
Filter out all unnecessary data.
|
IResultFilter |
getResultFilter()
Gets the result filter.
|
static StringBuilder |
toCSV(double[][] matrix,
char delim)
Export to CSV.
|
protected void |
writeResult(File destinationDir,
double[][] result,
String fileName)
Write result.
|
public static final String R_LIBRARY
public static final String TEMPLATE_DIRECTORY
public ResultExport(ProjectionModel projectionModel, File targetDirectory, IResultFilter resultFilter)
projectionModel
- the projection modeltargetDirectory
- the target directoryresultFilter
- the result filter to be usedpublic void exportAllResults() throws IOException
IOException
- if export failspublic void exportAggregatedResults(IProgressObserver progress) throws IOException
progress
- the progress observerIOException
- if data storage failedpublic void createResultReport(IProgressObserver progress) throws IOException, freemarker.template.TemplateException
progress
- the progress observation mechanismIOException
- if aggregation of data failsfreemarker.template.TemplateException
- if processing of report template failsprotected double[][] calcQuantiles(double[][] inputMatrix)
inputMatrix
- the input matrixprotected String createEquidistantDensityYearList(int jumpOffYear)
protected double[][] filter(double[][] original)
original
- the originalprotected void writeResult(File destinationDir, double[][] result, String fileName) throws IOException
destinationDir
- the destination dirresult
- the resultfileName
- the file nameIOException
- Signals that an I/O exception has occurred.public static StringBuilder toCSV(double[][] matrix, char delim)
matrix
- the matrixdelim
- the delimiterpublic IResultFilter getResultFilter()
Copyright © 2013. All Rights Reserved.