Package mondrian.olap

Enum Class Syntax

java.lang.Object
java.lang.Enum<Syntax>
mondrian.olap.Syntax
All Implemented Interfaces:
Serializable, Comparable<Syntax>, Constable

public enum Syntax extends Enum<Syntax>
Enumerated values describing the syntax of an expression.
Since:
21 July, 2003
Author:
jhyde
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Defines syntax for expression invoked object.[&PROPERTY] (a variant of Property).
    Defines syntax for expression invoked as {ARG, ...}; that is, the set construction operator.
    Defines syntax for expression invoked as CASE ...
    Defines syntax for a CAST expression CAST(expression AS type).
    Defines the syntax for an empty expression.
    Defines syntax for expression invoked FUNCTION() or FUNCTION(args).
    Defines syntax for expression invoked as arg OPERATOR arg (like '+' or 'AND').
    Defines syntax for expression generated by the Mondrian system which cannot be specified syntactically.
    Defines syntax for expression invoked invoked as object.METHOD() or object.METHOD(args).
    Defines syntax for expression invoked as (ARG) or (ARG, ...); that is, parentheses for grouping expressions, and the tuple construction operator.
    Defines syntax for expression invoked as arg OPERATOR (like IS EMPTY).
    Defines syntax for expression invoked as OPERATOR arg (like unary '-').
    Defines syntax for expression invoked as object.PROPERTY.
    Defines syntax for expression invoked object.&PROPERTY (a variant of Property).
  • Method Summary

    Modifier and Type
    Method
    Description
    getSignature(String name, int returnType, int[] argTypes)
    Returns a description of the signature of a function call, for example, "CoalesceEmpty(, )".
    void
    unparse(String fun, Exp[] args, PrintWriter pw)
    Converts a call to a function of this syntax into source code.
    static Syntax
    Returns the enum constant of this class with the specified name.
    static Syntax[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • Function

      public static final Syntax Function
      Defines syntax for expression invoked FUNCTION() or FUNCTION(args).
    • Property

      public static final Syntax Property
      Defines syntax for expression invoked as object.PROPERTY.
    • Method

      public static final Syntax Method
      Defines syntax for expression invoked invoked as object.METHOD() or object.METHOD(args).
    • Infix

      public static final Syntax Infix
      Defines syntax for expression invoked as arg OPERATOR arg (like '+' or 'AND').
    • Prefix

      public static final Syntax Prefix
      Defines syntax for expression invoked as OPERATOR arg (like unary '-').
    • Postfix

      public static final Syntax Postfix
      Defines syntax for expression invoked as arg OPERATOR (like IS EMPTY).
    • Braces

      public static final Syntax Braces
      Defines syntax for expression invoked as {ARG, ...}; that is, the set construction operator.
    • Parentheses

      public static final Syntax Parentheses
      Defines syntax for expression invoked as (ARG) or (ARG, ...); that is, parentheses for grouping expressions, and the tuple construction operator.
    • Case

      public static final Syntax Case
      Defines syntax for expression invoked as CASE ... END.
    • Internal

      public static final Syntax Internal
      Defines syntax for expression generated by the Mondrian system which cannot be specified syntactically.
    • Cast

      public static final Syntax Cast
      Defines syntax for a CAST expression CAST(expression AS type).
    • QuotedProperty

      public static final Syntax QuotedProperty
      Defines syntax for expression invoked object.&PROPERTY (a variant of Property).
    • AmpersandQuotedProperty

      public static final Syntax AmpersandQuotedProperty
      Defines syntax for expression invoked object.[&PROPERTY] (a variant of Property).
    • Empty

      public static final Syntax Empty
      Defines the syntax for an empty expression. Empty expressions can occur within function calls, and are denoted by a pair of commas with only whitespace between them, for example
      DrillDownLevelTop({[Product].[All Products]}, 3, , [Measures].[Unit Sales])
  • Method Details

    • values

      public static Syntax[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Syntax valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • unparse

      public void unparse(String fun, Exp[] args, PrintWriter pw)
      Converts a call to a function of this syntax into source code.
      Parameters:
      fun - Function name
      args - Arguments to the function
      pw - Writer
    • getSignature

      public String getSignature(String name, int returnType, int[] argTypes)
      Returns a description of the signature of a function call, for example, "CoalesceEmpty(, )".
      Parameters:
      name - Function name
      returnType - Function's return category
      argTypes - Categories of the function's arguments
      Returns:
      Function signature