Package ca.spatial.reportwriter
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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class ca.spatial.reportwriter.Report
Report.GetNodesAt
-
Field Summary
FieldsFields inherited from class ca.spatial.reportwriter.Report
AREA, LINE, PIE, SIDE_BY_SIDE_BARS, STACKED_BARS
-
Constructor Summary
ConstructorsConstructorDescriptionGeneralReport(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. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the value of the annualize flag, which determines if the reports should display annualized values (true) or periodic values (false).boolean
Returns true if column totals are to be displayedboolean
Returns true if row totals are to be displayedboolean
Returns true if sub-totals are to be displayed between categoriesGet the HTML text data that is used in this report.boolean
Returns true if the chart should not be displayedboolean
Returns true if the table should not be displayedboolean
Return true if the data is to be summarized as row percents.int[]
Get the list of periods that will be summarized in this report.Get the reselect expression that is used to filter records from the data table.getStore()
Get the table of data that is used in this report.String[]
getTypes()
An accessor function to retrieve the list of report types supported by this report.getUnits()
Get the String that describes the unit values.setAnnualize(boolean annualize)
Set the value of the annualize flag, which determines if the reports should display annualized values (true) or periodic values (false).setDoColumnTotals(boolean mode)
Specify that the report table should show column totals.setDoRowTotals(boolean mode)
Specify that the report table should show row totals.setDoSubTotals(boolean mode)
Specify that the report table should show sub-totals between categories.setHTMLText(String text)
Set the HTML text data that is used in this report.setMaxFractionDigits(Integer dec)
setNoChart(boolean mode)
Specify that the report table should not show a chart.setNoTable(boolean mode)
Specify that the report table should not show a table.setPercent(boolean percent)
Set a flag to indicate if the data is to be summarized as row percents.setPeriods(int[] periods)
Set the list of periods that will be summarized in this report.setReselectExpression(String reselectExpression)
Set the reselect expression that is used to filter records from the data table.void
setStore(AttributeStore as)
Set the table of data that is used in this report.void
Set the String that describes the unit values.Methods inherited from class ca.spatial.reportwriter.Report
addDefaultParam, chartImg, compareTo, csvLink, doesAnyTypes, doesCSV, doesGIF, doesHTML, doesPNG, doesType, doReport, encodeFileURL, encodeURL, endMainContent, escapeRegexChars, footer, formatColumnHeadings, formatColumnHeadings, getAdditionalFiles, getAttributeStore, getBasepart, getBasepart, getDefaultFilename, getDisplayFormat, getExtension, getExtension, getFilename, getFolderpart, getFolderpart, getLength, getNamepart, getNamepart, getPathToRoot, getReportFor, getTitle, header, htmlText, indexLink, interpolateParams, isDhandler, isIndexed, isSelected, parentIndex, patternToRegex, setAttributeStore, setDefaultParams, setDisplayFormat, setIndexed, setSelected, setTitle, toString, uniqueLabels
-
Field Details
-
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
Get the String that describes the unit values. -
setUnits
Set the String that describes the unit values. -
getStore
Get the table of data that is used in this report. -
setStore
Set the table of data that is used in this report. -
getHTMLText
Get the HTML text data that is used in this report. -
setHTMLText
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
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
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
Set the list of periods that will be summarized in this report. -
getReselectExpression
Get the reselect expression that is used to filter records from the data table. -
setReselectExpression
Set the reselect expression that is used to filter records from the data table. -
setDoColumnTotals
Specify that the report table should show column totals. -
getDoColumnTotals
public boolean getDoColumnTotals()Returns true if column totals are to be displayed -
setDoSubTotals
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
Specify that the report table should show row totals. -
getDoRowTotals
public boolean getDoRowTotals()Returns true if row totals are to be displayed -
setNoChart
Specify that the report table should not show a chart. -
getNoChart
public boolean getNoChart()Returns true if the chart should not be displayed -
setNoTable
Specify that the report table should not show a table. -
getNoTable
public boolean getNoTable()Returns true if the table should not be displayed -
setMaxFractionDigits
-
getMaxFractionDigits
-
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.
-