org.olap4j.mdx
Class IdentifierNode.Segment

java.lang.Object
  extended by org.olap4j.mdx.IdentifierNode.Segment
Enclosing class:
IdentifierNode

public static class IdentifierNode.Segment
extends Object

Component in a compound identifier. It is described by its name and how the name is quoted.

For example, the identifier [Store].USA.[New Mexico].&[45] has four segments:

To parse an identifier into a list of segments, use the method IdentifierNode.parseIdentifier(String).

 

Constructor Summary
IdentifierNode.Segment(ParseRegion region, String name, IdentifierNode.Quoting quoting)
          Creates a segment with the given quoting and region.
IdentifierNode.Segment(String name)
          Creates a quoted segment, "[name]".
 
Method Summary
 String getName()
          Returns the name of this Segment.
 IdentifierNode.Quoting getQuoting()
          Returns how this Segment is quoted.
 ParseRegion getRegion()
          Returns the region of the source code which this Segment was created from, if it was created by parsing.
 String toString()
          Returns a string representation of this Segment.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdentifierNode.Segment

public IdentifierNode.Segment(ParseRegion region,
                              String name,
                              IdentifierNode.Quoting quoting)
Creates a segment with the given quoting and region.

Parameters:
region - Region of source code
name - Name
quoting - Quoting style

IdentifierNode.Segment

public IdentifierNode.Segment(String name)
Creates a quoted segment, "[name]".

Parameters:
name - Name of segment
Method Detail

toString

public String toString()
Returns a string representation of this Segment.

For example, "[Foo]", "&[123]", "Abc".

Overrides:
toString in class Object
Returns:
String representation of this Segment

getRegion

public ParseRegion getRegion()
Returns the region of the source code which this Segment was created from, if it was created by parsing.

Returns:
region of source code

getName

public String getName()
Returns the name of this Segment.

Returns:
name of this Segment

getQuoting

public IdentifierNode.Quoting getQuoting()
Returns how this Segment is quoted.

Returns:
how this Segment is quoted

SourceForge.net_Logo