|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.olap4j.mdx.IdentifierNode
public class IdentifierNode
Multi-part identifier.
An identifier is immutable.
![]() |
![]() |
| Nested Class Summary | |
|---|---|
static class |
IdentifierNode.Quoting
Enumeration of styles by which the component of an identifier can be quoted. |
static class |
IdentifierNode.Segment
Component in a compound identifier. |
| Constructor Summary | |
|---|---|
IdentifierNode(IdentifierNode.Segment... segments)
Creates an identifier containing one or more segments. |
|
IdentifierNode(List<IdentifierNode.Segment> segments)
Creates an identifier containing a list of segments. |
|
| Method Summary | ||
|---|---|---|
|
accept(ParseTreeVisitor<T> visitor)
Accepts a visitor to this MDX parse tree node. |
|
IdentifierNode |
append(IdentifierNode.Segment segment)
Returns a new Identifier consisting of this one with another segment appended. |
|
IdentifierNode |
deepCopy()
Creates a deep copy of this ParseTreeNode object. |
|
ParseRegion |
getRegion()
Returns the region of the source code which this node was created from, if it was created by parsing. |
|
List<IdentifierNode.Segment> |
getSegmentList()
Returns the list of segments which consistitute this identifier. |
|
Type |
getType()
Returns the type of this expression. |
|
static List<IdentifierNode.Segment> |
parseIdentifier(String identifier)
Parses an MDX identifier into a list of segments. |
|
String |
toString()
|
|
void |
unparse(ParseTreeWriter writer)
Converts this node into MDX text. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IdentifierNode(IdentifierNode.Segment... segments)
segments - Array of Segments, each consisting of a name and quoting
stylepublic IdentifierNode(List<IdentifierNode.Segment> segments)
segments - List of segments| Method Detail |
|---|
public Type getType()
ParseTreeNodeReturns null if this node is not an expression, for instance a
SELECT node.
getType in interface ParseTreeNodepublic List<IdentifierNode.Segment> getSegmentList()
public ParseRegion getRegion()
ParseTreeNodeA non-leaf node's region will encompass the regions of all of its
children. For example, a the region of a function call node
Crossjoin([Gender], {[Store].[USA]}) stretches from
the first character of the function name to the closing parenthesis.
Region may be null, if the node was created programmatically, not from a piece of source code.
getRegion in interface ParseTreeNodepublic IdentifierNode append(IdentifierNode.Segment segment)
segment - Name of segment
public <T> T accept(ParseTreeVisitor<T> visitor)
ParseTreeNodeThe implementation should generally dispatches to the
ParseTreeVisitor.visit(org.olap4j.mdx.SelectNode) method appropriate to the type of expression.
accept in interface ParseTreeNodevisitor - Visitor
public void unparse(ParseTreeWriter writer)
ParseTreeNode
unparse in interface ParseTreeNodewriter - Parse tree writerpublic String toString()
toString in class Objectpublic IdentifierNode deepCopy()
ParseTreeNodeNote: implementing classes can return the concrete type instead of ParseTreeNode (using Java 1.5 covariant return types)
deepCopy in interface ParseTreeNodepublic static List<IdentifierNode.Segment> parseIdentifier(String identifier)
Each segment is a name combined with a description of how the name
was quoted. For example,
parseIdentifier("[Customers].USA.[South Dakota].[Sioux Falls].&[1245]")
returns
{ Segment("Customers", QUOTED),
Segment("USA", UNQUOTED),
Segment("South Dakota", QUOTED),
Segment("Sioux Falls", QUOTED),
Segment("1245", KEY) }
IllegalArgumentException - if the format of the identifier is
invalididentifier - MDX identifier string
Cube.lookupMember(String[])
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||