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:

  • Field Details

  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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