org.hackystat.telemetry.analyzer.language.parser
Class TelemetryLanguageParser

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.language.parser.TelemetryLanguageParser

public class TelemetryLanguageParser
extends java.lang.Object

Parser for telemetry language. All static methods in this class are thread-safe.

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

Method Summary
static java.util.List<TelemetryDefinition> parse(java.lang.String string)
          Parsing full telemetry streams and charts definitions.
static TelemetryChartDefinition parseChartDef(java.lang.String string)
          Parses telemetry "chart" object definition.
static TelemetryChartYAxisDefinition parseChartYAxisDef(java.lang.String string)
          Parses telemetry "chart y-axis" object definition.
static TelemetryReportDefinition parseReportDef(java.lang.String string)
          Parses telemetry "report" object definition.
static TelemetryStreamsDefinition parseStreamsDef(java.lang.String string)
          Parses telemetry "streams" object definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parse

public static java.util.List<TelemetryDefinition> parse(java.lang.String string)
                                                 throws ParsingException
Parsing full telemetry streams and charts definitions.

Parameters:
string - The definitions.
Returns:
A list containing TelemetryDefinition objects in the order appeared.
Throws:
ParsingException - If there is parsing error.

parseStreamsDef

public static TelemetryStreamsDefinition parseStreamsDef(java.lang.String string)
                                                  throws ParsingException
Parses telemetry "streams" object definition.

Parameters:
string - A telemetry query statement that defines a telemetry "streams" object. Note that you should not include the final semi-colon.
Returns:
Java object representation of the "streams" definition.
Throws:
ParsingException - If the input is not grammatically correct.

parseChartDef

public static TelemetryChartDefinition parseChartDef(java.lang.String string)
                                              throws ParsingException
Parses telemetry "chart" object definition.

Parameters:
string - A telemetry query statement that defines a telemetry "chart" object. Note that you should not include the final semi-colon.
Returns:
Java object representation of the "chart" definition.
Throws:
ParsingException - If the input is not gramatically correct.

parseChartYAxisDef

public static TelemetryChartYAxisDefinition parseChartYAxisDef(java.lang.String string)
                                                        throws ParsingException
Parses telemetry "chart y-axis" object definition.

Parameters:
string - A telemetry query statement that defines a telemetry "chart y-axis" object. Note that you should not include the final semi-colon.
Returns:
Java object representation of the "chart y-axis" definition.
Throws:
ParsingException - If the input is not gramatically correct.

parseReportDef

public static TelemetryReportDefinition parseReportDef(java.lang.String string)
                                                throws ParsingException
Parses telemetry "report" object definition.

Parameters:
string - A telemetry query statement that defines a telemetry "report" object. Note that you should not include the final semi-colon.
Returns:
Java object representation of the "report" definition.
Throws:
ParsingException - If the input is not gramatically correct.