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

public class DashboardBuilder extends Evaluator
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 Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • csvSupplier

      protected Supplier<String> csvSupplier
    • template

      protected org.apache.velocity.Template template
    • currentRow

      protected List<DcjsElement> currentRow
    • rows

      protected List<List<DcjsElement>> rows
    • dimensionDefinitions

      protected Set<String> dimensionDefinitions
    • groupDefinitions

      protected Set<String> groupDefinitions
    • title

      protected String title
    • additionalText

      protected String additionalText
    • dataLoadingIndicator

      protected boolean dataLoadingIndicator
  • Constructor Details

    • DashboardBuilder

      public DashboardBuilder(Supplier<String> csvSupplier, ExecutionResultSet executionResultSet, String titleOfPage, String additionalText)
    • DashboardBuilder

      public DashboardBuilder(EvaluatorCSV evaluatorCSV, String titleOfPage, String additionalText)
      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

      public DashboardBuilder(ExecutionResultSet executionResultSet)
      Constructor
      Parameters:
      executionResultSet - The execution result set to be evaluated and printed.
    • DashboardBuilder

      public DashboardBuilder(EvaluatorCSV evaluatorCSV)
      Constructor
      Parameters:
      evaluatorCSV - The CSV evaluator object to be used.
    • DashboardBuilder

      public DashboardBuilder(File csvFile, String titleOfPage, String additionalText)
      Constructor which just uses an csv file and not the whole EvaluatorCSV.
      Parameters:
      csvFile - the csv file
      titleOfPage - title of the page
      additionalText - additional text for the page
  • Method Details

    • addDefaultDashboard

      public DashboardBuilder addDefaultDashboard()
    • addBoxPlotMatcherConfidence

      public DashboardBuilder addBoxPlotMatcherConfidence()
    • addMetricTableSelectedAndMatcher

      public DashboardBuilder addMetricTableSelectedAndMatcher()
    • addPrecisionRecallScatterPlot

      public DashboardBuilder addPrecisionRecallScatterPlot()
    • addMetricTableOnlySelected

      public DashboardBuilder addMetricTableOnlySelected()
    • addMatcherMetricTableOnlyMatcher

      public DashboardBuilder addMatcherMetricTableOnlyMatcher()
    • addDataCount

      public DashboardBuilder addDataCount()
    • addConfusionHeatMap

      public DashboardBuilder addConfusionHeatMap()
    • addResultPerMatcher

      public DashboardBuilder addResultPerMatcher()
    • addResultPerTestCase

      public DashboardBuilder addResultPerTestCase()
    • addSelectMenu

      public DashboardBuilder addSelectMenu(String name, String csvField, String style)
    • addPieChartEvaluation

      public DashboardBuilder addPieChartEvaluation()
    • addPieChart

      public DashboardBuilder addPieChart(String name, String csvField)
    • addPieChartMultiValue

      public DashboardBuilder addPieChartMultiValue(String name, String csvField)
    • addTrackTestcaseSunburst

      public DashboardBuilder addTrackTestcaseSunburst()
    • addConfidenceBar

      public DashboardBuilder addConfidenceBar()
    • addTextFilter

      public DashboardBuilder addTextFilter()
    • addDataChart

      public DashboardBuilder addDataChart()
    • addElement

      public DashboardBuilder addElement(DcjsElement element)
    • clearElements

      public DashboardBuilder clearElements()
    • newRow

      public DashboardBuilder newRow()
    • setTitle

      public DashboardBuilder setTitle(String newTitle)
    • setAdditionalText

      public DashboardBuilder setAdditionalText(String newAdditionalText)
    • setDataLoadingIndicator

      public DashboardBuilder setDataLoadingIndicator(boolean newState)
    • writeResultsToDirectory

      public void writeResultsToDirectory(File baseDirectory)
      Specified by:
      writeResultsToDirectory in class Evaluator
    • writeToFile

      public void writeToFile(String htmlFilePath)
    • writeToFile

      public void writeToFile(File htmlFile)
      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

      public void writeToFile(File htmlFile, File csvFile)
      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 to
      csvFile - the file where all data should be written to
    • writeToCompressedFile

      public void writeToCompressedFile(File htmlFile, File csvFile)
      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 to
      csvFile - the file where all data should be written to (compressed by gzip and base64 encoded)
    • getGzippedByteArray

      private byte[] getGzippedByteArray(String text)
    • prepareVelocityContext

      private org.apache.velocity.VelocityContext prepareVelocityContext()
    • getAllDimensionDefinitions

      private List<String> getAllDimensionDefinitions()
    • getAllGroupDefinitions

      private List<String> getAllGroupDefinitions()
    • getAllJsHelperFileNames

      private List<String> getAllJsHelperFileNames()