Package mondrian.olap
Class HierarchyBase
- java.lang.Object
-
- mondrian.olap.OlapElementBase
-
- mondrian.olap.HierarchyBase
-
- All Implemented Interfaces:
Annotated,Hierarchy,OlapElement
- Direct Known Subclasses:
RolapHierarchy
public abstract class HierarchyBase extends OlapElementBase implements Hierarchy
Skeleton implementation forHierarchy.- Since:
- 6 August, 2001
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.olap.OlapElement
OlapElement.LocalizedProperty
-
-
Field Summary
Fields Modifier and Type Field Description protected StringallLevelNameprotected StringallMemberNameprotected Stringdescriptionprotected Dimensiondimensionprotected booleanhasAllprotected Level[]levelsprotected Stringnameprotected StringsubNamenameandsubNameare the name of the hierarchy, respectively containing and not containing dimension name.protected StringuniqueName-
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHierarchyBase(Dimension dimension, String subName, String caption, boolean visible, String description, boolean hasAll)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(OlapElement mdxElement)StringgetAllLevelName()Returns the name of the 'all' level in this hierarchy.StringgetAllMemberName()StringgetDescription()DimensiongetDimension()Returns the dimension this hierarchy belongs to.HierarchygetHierarchy()Level[]getLevels()Returns the levels in this hierarchy.StringgetName()StringgetQualifiedName()Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".StringgetSubName()Returns the name of the hierarchy sans dimension name.StringgetUniqueName()StringgetUniqueNameSsas()Returns the unique name of this hierarchy, always including the dimension name, e.g.booleanhasAll()abstract booleanisRagged()OlapElementlookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)Looks up a child element, returning null if it does not exist.-
Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, equals, getCaption, getLocalized, getLogger, hashCode, isVisible, setCaption, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface mondrian.olap.Annotated
getAnnotationMap
-
Methods inherited from interface mondrian.olap.Hierarchy
createMember, getAllMember, getDefaultMember, getNullMember
-
Methods inherited from interface mondrian.olap.OlapElement
getCaption, getLocalized, isVisible
-
-
-
-
Field Detail
-
dimension
protected final Dimension dimension
-
subName
protected final String subName
nameandsubNameare 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 If
MondrianProperties.SsasCompatibleNamingis true, name and subName have the same value.
-
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
-
-
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:
getUniqueNamein interfaceOlapElement
-
getUniqueNameSsas
public String getUniqueNameSsas()
Description copied from interface:HierarchyReturns the unique name of this hierarchy, always including the dimension name, e.g. "[Time].[Time]", regardless of whetherMondrianProperties.SsasCompatibleNamingis enabled.- Specified by:
getUniqueNameSsasin interfaceHierarchy- Returns:
- Unique name of hierarchy.
-
getName
public String getName()
- Specified by:
getNamein interfaceOlapElement
-
getQualifiedName
public String getQualifiedName()
Description copied from interface:OlapElementReturns the name of this element qualified by its class, for example "hierarchy 'Customers'".- Specified by:
getQualifiedNamein interfaceOlapElement
-
isRagged
public abstract boolean isRagged()
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceOlapElement
-
getDimension
public Dimension getDimension()
Description copied from interface:HierarchyReturns the dimension this hierarchy belongs to.- Specified by:
getDimensionin interfaceHierarchy- Specified by:
getDimensionin interfaceOlapElement
-
getLevels
public Level[] getLevels()
Description copied from interface:HierarchyReturns 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.
-
getHierarchy
public Hierarchy getHierarchy()
- Specified by:
getHierarchyin interfaceOlapElement
-
equals
public boolean equals(OlapElement mdxElement)
- Overrides:
equalsin classOlapElementBase
-
lookupChild
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
Description copied from interface:OlapElementLooks up a child element, returning null if it does not exist.- Specified by:
lookupChildin interfaceOlapElement
-
getAllMemberName
public String getAllMemberName()
-
getAllLevelName
public String getAllLevelName()
Returns the name of the 'all' level in this hierarchy.- Returns:
- name of the 'all' level
-
-