Package org.olap4j.mdx.parser.impl
Class DefaultMdxParserImpl
java.lang.Object
org.olap4j.mdx.parser.impl.DefaultMdxParserImpl
- All Implemented Interfaces:
MdxParser
Default implementation of
MDX Parser.- Since:
- Aug 22, 2006
- Author:
- jhyde
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseExpression(String mdx) Parses an MDX expression and returns a parse tree.parseSelect(String mdx) Parses an MDX Select statement and returns theSelectNodeat the root of the parse tree.
-
Constructor Details
-
DefaultMdxParserImpl
public DefaultMdxParserImpl()Creates a DefaultMdxParserImpl.
-
-
Method Details
-
parseSelect
Description copied from interface:MdxParserParses an MDX Select statement and returns theSelectNodeat the root of the parse tree.In order to be parsed successfully, the expression must be syntactically correct but does not need to be valid. (Syntactic correctness and validity are described further in the description of
MdxParser.parseExpression(String).)- Specified by:
parseSelectin interfaceMdxParser- Parameters:
mdx- MDX query string- Returns:
- Parse tree
-
parseExpression
Description copied from interface:MdxParserParses an MDX expression and returns a parse tree.An expression is a combination of operators and operands, which can occur in many places inside an MDX query, such as the definition of a calculated member or an axis.
In order to be parsed successfully, the expression must be syntactically correct but does not need to be valid. For example,
is syntactically incorrect, because there are more open parentheses "(" than close parentheses ")", and the parser will give an error. Conversely,(1 + (2 + 3)
is syntactically correct, and the parser will successfully create a parse tree, even if(1 + [Measures].[Bad Measure])[Measures].[Bad Measure]does not exist.- Specified by:
parseExpressionin interfaceMdxParser- Parameters:
mdx- MDX expression- Returns:
- Parse tree
-