Class DashboardBuilder
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.Evaluator
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.visualization.dashboard.DashboardBuilder
Generates a dashboard with dc.js components based on the generated csv file.
Example on how to use:
ExecutionResultSet s = Executor.loadFromAnatomyResultsFolder("...");
s.addAll(Executor.loadFromConferenceResultsFolder("..."));
PageBuilder pb = new PageBuilder(s);
pb.addDefaultDashboard();
pb.writeToFile(new File("dashboard.html"));
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected List<DcjsElement>
protected boolean
private static final org.slf4j.Logger
protected List<List<DcjsElement>>
protected org.apache.velocity.Template
protected String
-
Constructor Summary
ConstructorDescriptionDashboardBuilder
(EvaluatorCSV evaluatorCSV) ConstructorDashboardBuilder
(EvaluatorCSV evaluatorCSV, String titleOfPage, String additionalText) ConstructorDashboardBuilder
(ExecutionResultSet executionResultSet) ConstructorDashboardBuilder
(ExecutionResultSet executionResultSet, String titleOfPage, String additionalText) ConstructorDashboardBuilder
(File csvFile, String titleOfPage, String additionalText) Constructor which just uses an csv file and not the whole EvaluatorCSV.DashboardBuilder
(Supplier<String> csvSupplier, ExecutionResultSet executionResultSet, String titleOfPage, String additionalText) -
Method Summary
Modifier and TypeMethodDescriptionaddElement
(DcjsElement element) addPieChart
(String name, String csvField) addPieChartMultiValue
(String name, String csvField) addSelectMenu
(String name, String csvField, String style) private byte[]
getGzippedByteArray
(String text) newRow()
private org.apache.velocity.VelocityContext
setAdditionalText
(String newAdditionalText) setDataLoadingIndicator
(boolean newState) void
writeResultsToDirectory
(File baseDirectory) void
writeToCompressedFile
(File htmlFile, File csvFile) Writes the HTML content to htmlFile and the data (csv) to another file.void
writeToFile
(File htmlFile) Writes the HTML content to one file.void
writeToFile
(File htmlFile, File csvFile) Writes the HTML content to htmlFile and the data (csv) to another file.void
writeToFile
(String htmlFilePath) Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.Evaluator
checkAndCreateDirectory, getDefaultResultsDirectory, getDirectoryWithCurrentTime, getResults, getResultsDirectoryTrack, getResultsDirectoryTrackMatcher, getResultsDirectoryTrackTestcaseMatcher, setDefaultResultsDirectory, writeToDirectory, writeToDirectory, writeToDirectory
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
csvSupplier
-
template
protected org.apache.velocity.Template template -
currentRow
-
rows
-
dimensionDefinitions
-
groupDefinitions
-
title
-
additionalText
-
dataLoadingIndicator
protected boolean dataLoadingIndicator
-
-
Constructor Details
-
DashboardBuilder
public DashboardBuilder(Supplier<String> csvSupplier, ExecutionResultSet executionResultSet, String titleOfPage, String additionalText) -
DashboardBuilder
Constructor- Parameters:
evaluatorCSV
- The CSV evaluator to be used. The evaluator can be configured, e.g. in terms of the columns that should be printed.titleOfPage
- The title of the generated HTML page.additionalText
- additionalText
-
DashboardBuilder
public DashboardBuilder(ExecutionResultSet executionResultSet, String titleOfPage, String additionalText) Constructor- Parameters:
executionResultSet
- The execution result set to be evaluated and printed.titleOfPage
- The title of the generated HTML page.additionalText
- additionalText
-
DashboardBuilder
Constructor- Parameters:
executionResultSet
- The execution result set to be evaluated and printed.
-
DashboardBuilder
Constructor- Parameters:
evaluatorCSV
- The CSV evaluator object to be used.
-
DashboardBuilder
Constructor which just uses an csv file and not the whole EvaluatorCSV.- Parameters:
csvFile
- the csv filetitleOfPage
- title of the pageadditionalText
- additional text for the page
-
-
Method Details
-
addDefaultDashboard
-
addBoxPlotMatcherConfidence
-
addMetricTableSelectedAndMatcher
-
addPrecisionRecallScatterPlot
-
addMetricTableOnlySelected
-
addMatcherMetricTableOnlyMatcher
-
addDataCount
-
addConfusionHeatMap
-
addResultPerMatcher
-
addResultPerTestCase
-
addSelectMenu
-
addPieChartEvaluation
-
addPieChart
-
addPieChartMultiValue
-
addTrackTestcaseSunburst
-
addConfidenceBar
-
addTextFilter
-
addDataChart
-
addElement
-
clearElements
-
newRow
-
setTitle
-
setAdditionalText
-
setDataLoadingIndicator
-
writeResultsToDirectory
- Specified by:
writeResultsToDirectory
in classEvaluator
-
writeToFile
-
writeToFile
Writes the HTML content to one file. This includes also the data (csv) which is included in the HTML file. This HTML file can be opened directly by a browser.- Parameters:
htmlFile
- the file where all html data should be written to
-
writeToFile
Writes the HTML content to htmlFile and the data (csv) to another file. This is for publishing the dashboard to a server.- Parameters:
htmlFile
- the file where all html code should be written tocsvFile
- the file where all data should be written to
-
writeToCompressedFile
Writes the HTML content to htmlFile and the data (csv) to another file. The data file is compressed by gzip and base64 encoded. This is for publishing the dashboard to a server.- Parameters:
htmlFile
- the file where all html code should be written tocsvFile
- the file where all data should be written to (compressed by gzip and base64 encoded)
-
getGzippedByteArray
-
prepareVelocityContext
private org.apache.velocity.VelocityContext prepareVelocityContext() -
getAllDimensionDefinitions
-
getAllGroupDefinitions
-
getAllJsHelperFileNames
-