org.olap4j.mdx
public interface IdentifierSegment
For example, the identifier
[Store].USA.[New Mexico].&[45]
has four segments:
Quoting.QUOTED
Quoting.UNQUOTED
Quoting.QUOTED
Quoting.KEY
QUOTED and UNQUOTED segments are represented using a
NameSegment
;
KEY segments are represented using a
KeySegment
.
To parse an identifier into a list of segments, use the method
IdentifierNode.parseIdentifier(String)
and then call
IdentifierNode.getSegmentList()
on the resulting
node.
Modifier and Type | Method and Description |
---|---|
List<NameSegment> |
getKeyParts()
Returns the key components, if this IdentifierSegment is a key.
|
String |
getName()
Returns the name of this IdentifierSegment.
|
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.
|
void |
toString(StringBuilder buf)
Appends a string representation of this Segment to a StringBuffer.
|
String toString()
For example, "[Foo]", "&[123]", "Abc".
void toString(StringBuilder buf)
buf
- StringBufferParseRegion getRegion()
Quoting getQuoting()
String getName()
null
if this IdentifierSegment represents a key.List<NameSegment> getKeyParts()
getQuoting()
returns
Quoting.KEY
.)
Returns null otherwise.