org.hackystat.telemetry.analyzer.language.ast
Class TelemetryReportDefinition

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.language.ast.TelemetryDefinition
      extended by org.hackystat.telemetry.analyzer.language.ast.TelemetryReportDefinition

public class TelemetryReportDefinition
extends TelemetryDefinition

Telemetry report definition, which contains one or more telemetry charts.

Version:
$Id$
Author:
(Cedric) Qin ZHANG

Constructor Summary
TelemetryReportDefinition(java.lang.String name, java.lang.String docString, Variable[] variables, java.util.List<ChartReference> chartReferences, TextPosition textPosition)
          Constructs this instance.
 
Method Summary
 java.util.List<ChartReference> getChartReferences()
          Gets all telemetry charts references in this report.
 java.lang.String getDocString()
          Gets the doc string for the chart.
 java.lang.String getTitle()
          Gets the title of the chart.
 Variable[] getVariables()
          Gets an array of variables used in the definition.
 
Methods inherited from class org.hackystat.telemetry.analyzer.language.ast.TelemetryDefinition
getDefinitionString, getName, getTextPosition, setDefinitionString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelemetryReportDefinition

public TelemetryReportDefinition(java.lang.String name,
                                 java.lang.String docString,
                                 Variable[] variables,
                                 java.util.List<ChartReference> chartReferences,
                                 TextPosition textPosition)
                          throws TelemetryLanguageException
Constructs this instance.

Parameters:
name - The name of the chart.
docString - The doc string of the report. The report title is extracted fromthe doc string.
variables - The variables used in the expression. Variables are essentially holding places so that real value can be swapped in when the expression is evaluated. Null is valid if there is no variable used in this definition.
chartReferences - A list of ChartReference objects referring to the telemetry charts that should be contained in this report.
textPosition - The text position of the definition string in the input.
Throws:
TelemetryLanguageException - If the variable list contains duplicated variable declaration or does not declare all variables needed by the referred telemetry charts.
Method Detail

getTitle

public java.lang.String getTitle()
Gets the title of the chart.

Returns:
The chart title.

getDocString

public java.lang.String getDocString()
Gets the doc string for the chart.

Returns:
The doc string.

getVariables

public Variable[] getVariables()
Gets an array of variables used in the definition.

Returns:
An array of Variable objects. If there is no variable used, then an empty array is returned.

getChartReferences

public java.util.List<ChartReference> getChartReferences()
Gets all telemetry charts references in this report.

Returns:
A list of ChartReference objects.