mondrian.olap
Class HierarchyBase

java.lang.Object
  extended by mondrian.olap.OlapElementBase
      extended by mondrian.olap.HierarchyBase
All Implemented Interfaces:
Hierarchy, OlapElement
Direct Known Subclasses:
RolapHierarchy

public abstract class HierarchyBase
extends OlapElementBase
implements Hierarchy

Skeleton implementation for Hierarchy.

Since:
6 August, 2001
Author:
jhyde
 

Field Summary
protected  String allLevelName
           
protected  String allMemberName
           
protected  String description
           
protected  Dimension dimension
           
protected  boolean hasAll
           
protected  Level[] levels
           
protected  String name
           
protected  String subName
          name and subName are the name of the hierarchy, respectively containing and not containing dimension name.
protected  String uniqueName
           
 
Fields inherited from class mondrian.olap.OlapElementBase
caption
 
Constructor Summary
protected HierarchyBase(Dimension dimension, String subName, boolean hasAll)
           
 
Method Summary
 boolean equals(OlapElement mdxElement)
           
 String getAllLevelName()
          Returns the name of the 'all' level in this hierarchy.
 String getAllMemberName()
           
 String getDescription()
           
 Dimension getDimension()
          Returns the dimension this hierarchy belongs to.
 Hierarchy getHierarchy()
           
 Level[] getLevels()
          Returns the levels in this hierarchy.
 String getName()
           
 String getQualifiedName()
          Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".
 String getSubName()
          Returns the name of the hierarchy sans dimension name.
 String getUniqueName()
           
 boolean hasAll()
           
abstract  boolean isRagged()
           
 OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s)
          Looks up a child element, returning null if it does not exist.
 OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
           
 
Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, equals, getCaption, getLogger, hashCode, setCaption, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mondrian.olap.Hierarchy
createMember, getAllMember, getDefaultMember, getNullMember
 
Methods inherited from interface mondrian.olap.OlapElement
getCaption
 

Field Detail

dimension

protected final Dimension dimension

subName

protected final String subName
name and subName are the name of the hierarchy, respectively containing and not containing dimension name. For example:
uniqueName name subName
[Time.Weekly] Time.Weekly Weekly
[Customers] Customers null


name

protected final String name

uniqueName

protected final String uniqueName

description

protected String description

levels

protected Level[] levels

hasAll

protected final boolean hasAll

allMemberName

protected String allMemberName

allLevelName

protected String allLevelName
Constructor Detail

HierarchyBase

protected HierarchyBase(Dimension dimension,
                        String subName,
                        boolean hasAll)
Method Detail

getSubName

public String getSubName()
Returns the name of the hierarchy sans dimension name.

Returns:
name of hierarchy sans dimension name

getUniqueName

public String getUniqueName()
Specified by:
getUniqueName in interface OlapElement

getName

public String getName()
Specified by:
getName in interface OlapElement

getQualifiedName

public String getQualifiedName()
Description copied from interface: OlapElement
Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".

Specified by:
getQualifiedName in interface OlapElement

isRagged

public abstract boolean isRagged()

getDescription

public String getDescription()
Specified by:
getDescription in interface OlapElement

getDimension

public Dimension getDimension()
Description copied from interface: Hierarchy
Returns the dimension this hierarchy belongs to.

Specified by:
getDimension in interface Hierarchy
Specified by:
getDimension in interface OlapElement

getLevels

public Level[] getLevels()
Description copied from interface: Hierarchy
Returns the levels in this hierarchy.

If a hierarchy is subject to access-control, some of the levels may not be visible; use SchemaReader.getHierarchyLevels(mondrian.olap.Hierarchy) instead.

Specified by:
getLevels in interface Hierarchy

getHierarchy

public Hierarchy getHierarchy()
Specified by:
getHierarchy in interface OlapElement

hasAll

public boolean hasAll()
Specified by:
hasAll in interface Hierarchy

equals

public boolean equals(OlapElement mdxElement)
Overrides:
equals in class OlapElementBase

lookupChild

public OlapElement lookupChild(SchemaReader schemaReader,
                               Id.Segment s)
Description copied from interface: OlapElement
Looks up a child element, returning null if it does not exist.

Specified by:
lookupChild in interface OlapElement

lookupChild

public OlapElement lookupChild(SchemaReader schemaReader,
                               Id.Segment s,
                               MatchType matchType)
Specified by:
lookupChild in interface OlapElement

getAllMemberName

public String getAllMemberName()

getAllLevelName

public String getAllLevelName()
Returns the name of the 'all' level in this hierarchy.

Returns:
name of the 'all' level

SourceForge.net_Logo