Class GeneralReport

java.lang.Object
ca.spatial.reportwriter.Report
ca.spatial.reportwriter.GeneralReport
All Implemented Interfaces:
Selectable<Report>, Comparable<Report>
Direct Known Subclasses:
CategoryCategoryReport, CategoryExpressionReport, PeriodCategoryReport, PeriodExpressionReport, StandardReport

public abstract class GeneralReport extends Report
This class provides support of common parameters for all general reports. The GeneralReport is a base class that is used by other classes, but it is not something that actually makes a report.
  • Field Details

    • TYPES

      public static final String[] TYPES
  • Constructor Details

    • GeneralReport

      public GeneralReport(String filename, String title, String units, AttributeStore sourceDataTable, String reselectExpression, int[] periods, boolean annualize, String htmlText, boolean percent)
      Set the common parameters in a GeneralReport.
      Parameters:
      filename - The name that the report will be saved to.
      title - The title of the report.
      units - The unit of measure of the values in the report.
      sourceDataTable - The source data table.
      periods - An array of periods of interest for this report.
      annualize - A flag to indicate if the values should be annualized. If true then values from period 0 (prior to the start of the simulation) are not shown. All other values are divided by the width of the period.
      htmlText - Additional text that can be used to document the report.
      percent - A boolean used to indicate if the values should be shown in percentage format.
  • Method Details

    • getUnits

      public String getUnits()
      Get the String that describes the unit values.
    • setUnits

      public void setUnits(String units)
      Set the String that describes the unit values.
    • getStore

      public AttributeStore getStore()
      Get the table of data that is used in this report.
    • setStore

      public void setStore(AttributeStore as)
      Set the table of data that is used in this report.
    • getHTMLText

      public String getHTMLText()
      Get the HTML text data that is used in this report.
    • setHTMLText

      public GeneralReport setHTMLText(String text)
      Set the HTML text data that is used in this report.
    • getPercent

      public boolean getPercent()
      Return true if the data is to be summarized as row percents.
    • setPercent

      public GeneralReport setPercent(boolean percent)
      Set a flag to indicate if the data is to be summarized as row percents.
    • getAnnualize

      public boolean getAnnualize()
      Get the value of the annualize flag, which determines if the reports should display annualized values (true) or periodic values (false).
    • setAnnualize

      public GeneralReport setAnnualize(boolean annualize)
      Set the value of the annualize flag, which determines if the reports should display annualized values (true) or periodic values (false).
    • getPeriods

      public int[] getPeriods()
      Get the list of periods that will be summarized in this report.
    • setPeriods

      public GeneralReport setPeriods(int[] periods)
      Set the list of periods that will be summarized in this report.
    • getReselectExpression

      public String getReselectExpression()
      Get the reselect expression that is used to filter records from the data table.
    • setReselectExpression

      public GeneralReport setReselectExpression(String reselectExpression)
      Set the reselect expression that is used to filter records from the data table.
    • setDoColumnTotals

      public GeneralReport setDoColumnTotals(boolean mode)
      Specify that the report table should show column totals.
    • getDoColumnTotals

      public boolean getDoColumnTotals()
      Returns true if column totals are to be displayed
    • setDoSubTotals

      public GeneralReport setDoSubTotals(boolean mode)
      Specify that the report table should show sub-totals between categories.
    • getDoSubTotals

      public boolean getDoSubTotals()
      Returns true if sub-totals are to be displayed between categories
    • setDoRowTotals

      public GeneralReport setDoRowTotals(boolean mode)
      Specify that the report table should show row totals.
    • getDoRowTotals

      public boolean getDoRowTotals()
      Returns true if row totals are to be displayed
    • setNoChart

      public GeneralReport setNoChart(boolean mode)
      Specify that the report table should not show a chart.
    • getNoChart

      public boolean getNoChart()
      Returns true if the chart should not be displayed
    • setNoTable

      public GeneralReport setNoTable(boolean mode)
      Specify that the report table should not show a table.
    • getNoTable

      public boolean getNoTable()
      Returns true if the table should not be displayed
    • setMaxFractionDigits

      public GeneralReport setMaxFractionDigits(Integer dec)
    • getMaxFractionDigits

      public Integer getMaxFractionDigits()
    • getTypes

      public String[] getTypes()
      Description copied from class: Report
      An accessor function to retrieve the list of report types supported by this report. See the documentation for the TYPES variable for the list of sub-types.
      Specified by:
      getTypes in class Report