org.olap4j.mdx
Enum Syntax

java.lang.Object
  extended by java.lang.Enum<Syntax>
      extended by org.olap4j.mdx.Syntax
All Implemented Interfaces:
Serializable, Comparable<Syntax>

public enum Syntax
extends Enum<Syntax>

Enumerated values describing the syntax of an expression.

Since:
21 July, 2003
Version:
$Id: Syntax.java 482 2012-01-05 23:27:27Z jhyde $
Author:
jhyde

Enum Constant Summary
AmpersandQuotedProperty
          Defines syntax for expression invoked object.[&PROPERTY] (a variant of Property).
Braces
          Defines syntax for expression invoked as {ARG, ...}; that is, the set construction operator.
Case
          Defines syntax for expression invoked as CASE ...
Cast
          Defines syntax for a CAST expression CAST(expression AS type).
Empty
          Defines the syntax for an empty expression.
Function
          Defines syntax for expression invoked FUNCTION() or FUNCTION(args).
Infix
          Defines syntax for expression invoked as arg OPERATOR arg (like '+' or 'AND').
Internal
          Defines syntax for expression generated by the system which cannot be specified syntactically.
Method
          Defines syntax for expression invoked invoked as object.METHOD() or object.METHOD(args).
Parentheses
          Defines syntax for expression invoked as (ARG) or (ARG, ...); that is, parentheses for grouping expressions, and the tuple construction operator.
Postfix
          Defines syntax for expression invoked as arg OPERATOR (like IS EMPTY).
Prefix
          Defines syntax for expression invoked as OPERATOR arg (like unary '-').
Property
          Defines syntax for expression invoked as object.PROPERTY.
QuotedProperty
          Defines syntax for expression invoked object.&PROPERTY (a variant of Property).
 
Method Summary
 void unparse(String operatorName, List<ParseTreeNode> argList, ParseTreeWriter writer)
          Converts a call to a function of this syntax into source code.
static Syntax valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Syntax[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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 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 Detail

values

public static Syntax[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Syntax c : Syntax.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Syntax valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

unparse

public void unparse(String operatorName,
                    List<ParseTreeNode> argList,
                    ParseTreeWriter writer)
Converts a call to a function of this syntax into source code.

Parameters:
operatorName - Operator name
argList - List of arguments
writer - Writer

SourceForge.net_Logo