Package mondrian.olap
Class Id.Segment
- java.lang.Object
-
- mondrian.olap.Id.Segment
-
- Direct Known Subclasses:
Id.KeySegment,Id.NameSegment
- Enclosing class:
- Id
public abstract static class Id.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:- "Store",
Id.Quoting.QUOTED - "USA",
Id.Quoting.UNQUOTED - "New Mexico",
Id.Quoting.QUOTED - "45",
Id.Quoting.KEY
-
-
Field Summary
Fields Modifier and Type Field Description Id.Quotingquoting
-
Constructor Summary
Constructors Modifier Constructor Description protectedSegment(Id.Quoting quoting)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract List<Id.NameSegment>getKeyParts()Id.QuotinggetQuoting()abstract booleanmatches(String name)Returns whether this segment matches a given name according to the rules of case-sensitivity and quoting.static List<Id.Segment>toList(String... nameParts)Converts an array of names to a list of segments.StringtoString()abstract voidtoString(StringBuilder buf)Appends this segment to a StringBuilder.
-
-
-
Field Detail
-
quoting
public final Id.Quoting quoting
-
-
Constructor Detail
-
Segment
protected Segment(Id.Quoting quoting)
-
-
Method Detail
-
getQuoting
public Id.Quoting getQuoting()
-
getKeyParts
public abstract List<Id.NameSegment> getKeyParts()
-
toList
public static List<Id.Segment> toList(String... nameParts)
Converts an array of names to a list of segments.- Parameters:
nameParts- Array of names- Returns:
- List of segments
-
matches
public abstract boolean matches(String name)
Returns whether this segment matches a given name according to the rules of case-sensitivity and quoting.- Parameters:
name- Name to match- Returns:
- Whether matches
-
toString
public abstract void toString(StringBuilder buf)
Appends this segment to a StringBuilder.- Parameters:
buf- String builder to write to
-
-