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 String
allLevelName
protected String
allMemberName
protected String
description
protected Dimension
dimension
protected boolean
hasAll
protected Level[]
levels
protected String
name
protected String
subName
name
andsubName
are the name of the hierarchy, respectively containing and not containing dimension name.protected String
uniqueName
-
Fields inherited from class mondrian.olap.OlapElementBase
caption, visible
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HierarchyBase(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 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()
String
getUniqueNameSsas()
Returns the unique name of this hierarchy, always including the dimension name, e.g.boolean
hasAll()
abstract boolean
isRagged()
OlapElement
lookupChild(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
name
andsubName
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 If
MondrianProperties.SsasCompatibleNaming
is 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:
getUniqueName
in interfaceOlapElement
-
getUniqueNameSsas
public String getUniqueNameSsas()
Description copied from interface:Hierarchy
Returns the unique name of this hierarchy, always including the dimension name, e.g. "[Time].[Time]", regardless of whetherMondrianProperties.SsasCompatibleNaming
is enabled.- Specified by:
getUniqueNameSsas
in interfaceHierarchy
- Returns:
- Unique name of hierarchy.
-
getName
public String getName()
- Specified by:
getName
in interfaceOlapElement
-
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 interfaceOlapElement
-
isRagged
public abstract boolean isRagged()
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceOlapElement
-
getDimension
public Dimension getDimension()
Description copied from interface:Hierarchy
Returns the dimension this hierarchy belongs to.- Specified by:
getDimension
in interfaceHierarchy
- Specified by:
getDimension
in interfaceOlapElement
-
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.
-
getHierarchy
public Hierarchy getHierarchy()
- Specified by:
getHierarchy
in interfaceOlapElement
-
equals
public boolean equals(OlapElement mdxElement)
- Overrides:
equals
in classOlapElementBase
-
lookupChild
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
Description copied from interface:OlapElement
Looks up a child element, returning null if it does not exist.- Specified by:
lookupChild
in 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
-
-