Skip navigation links

Oracle® OLAP Java API Reference
11g Release 1 (11.1)

B28128-01


oracle.olapi.metadata.mdm
Class MdmLevelHierarchy

java.lang.Object
  extended by oracle.olapi.metadata.BaseMetadataObject
      extended by oracle.olapi.metadata.mdm.MdmObject
          extended by oracle.olapi.metadata.mdm.MdmSource
              extended by oracle.olapi.metadata.mdm.MdmDimension
                  extended by oracle.olapi.metadata.mdm.MdmSubDimension
                      extended by oracle.olapi.metadata.mdm.MdmHierarchy
                          extended by oracle.olapi.metadata.mdm.MdmLevelHierarchy

All Implemented Interfaces:
MdmQuery, MdmViewColumnOwner, MetadataObject

public final class MdmLevelHierarchy
extends MdmHierarchy

An MdmHierarchy that represents members of an Oracle OLAP dimension that are organized either nonhierarchically or hierarchically by levels. An application creates an MdmLevelHierarchy with the findOrCreateLevelHierarchy method of an MdmPrimaryDimension.

An MdmLevelHierarchy has component MdmHierarchyLevel objects. A nonhierarchical MdmLevelHierarchy has only one MdmHierarchyLevel component, and a hierarchical MdmLevelHierarchy has more than one MdmHierarchyLevel components. An MdmLevelHierarchy can have up to 31 component MdmHierarchyLevel objects.

The hierarchical organization is defined by parent-child relationships between the members of the MdmHierarchyLevel components. MdmAttribute objects record the parent-child relationships among the members of an MdmLevelHierarchy You use the getParentAttribute and getAncestorsAttribute methods to get the MdmAttribute objects that relate parents to children and ancestors to descendents, respectively.

The MdmLevelHierarchy has all of the members of its MdmHierarchyLevel components. Each of its component MdmHierarchyLevel objects has the members of the hierarchy for that level. For example, an MdmLevelHierarchy for a calendar year time hierarchy might have parent-child relationships organized at year, quarter, month, and day levels. The MdmLevelHierarchy would have the members at every level. It would also have four component MdmHierarchyLevel objects, one for each level.

All of the classes in the oracle.olapi.metadata.mtm package are deprecated as of Oracle 11g, Release 1. The methods of this class that use classes in the mtm package are deprecated, also. The deprecated methods of this class that created MdmLevel objects are replaced by the findOrCreateHierarchyLevel method.


Method Summary
 java.lang.Object acceptVisitor(MdmObjectVisitor visitor, java.lang.Object context)
          Calls the visitMdmLevelHierarchy method of the specified MdmObjectVisitor and passes that method the MdmLevelHierarchy and the specified context object.
 void addHierarchyLevel(MdmHierarchyLevel level)
          Appends an MdmHierarchyLevel to the ordered list of hierarchy levels that are associated with this MdmLevelHierarchy .
 void addHierarchyLevel(MdmHierarchyLevel level, int levelNumber)
          Adds an MdmHierarchyLevel at the specified position in the ordered list of hierarchy levels that are associated with this MdmLevelHierarchy .
 MdmLevel createBooleanLevel(java.lang.String name, MtmValueExpression expression, int levelNumber)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createBooleanLevel(java.lang.String name, MtmValueExpression expression, MdmLevel parentLevel)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createBooleanLevel(java.lang.String name, java.lang.String expression, int levelNumber)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createBooleanLevel(java.lang.String name, java.lang.String expression, MdmLevel parentLevel)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createDateLevel(java.lang.String name, MtmValueExpression expression, int levelNumber)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createDateLevel(java.lang.String name, MtmValueExpression expression, MdmLevel parentLevel)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createDateLevel(java.lang.String name, java.lang.String expression, int levelNumber)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createDateLevel(java.lang.String name, java.lang.String expression, MdmLevel parentLevel)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createNumericLevel(java.lang.String name, MtmValueExpression expression, int levelNumber)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createNumericLevel(java.lang.String name, MtmValueExpression expression, MdmLevel parentLevel)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createNumericLevel(java.lang.String name, java.lang.String expression, int levelNumber)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createNumericLevel(java.lang.String name, java.lang.String expression, MdmLevel parentLevel)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createStringLevel(java.lang.String name, MtmValueExpression expression, int levelNumber)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createStringLevel(java.lang.String name, MtmValueExpression expression, MdmLevel parentLevel)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createStringLevel(java.lang.String name, java.lang.String expression, int levelNumber)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmLevel createStringLevel(java.lang.String name, java.lang.String expression, MdmLevel parentLevel)
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.
 MdmHierarchyLevel findOrCreateHierarchyLevel(MdmDimensionLevel dimLevel)
          Gets the specified MdmHierarchyLevel or, if it does not already exist, creates a new one for this MdmLevelHierarchy.
 SolvedLevelHierarchyMap findOrCreateSolvedLevelHierarchyMap()
          Gets the SolvedLevelHierarchyMap that is associated with this MdmLevelHierarchy or creates a new SolvedLevelHierarchyMap if one does not already exist.
 MdmDimensionMemberInfo getDefaultMember()
          Gets the MdmDimensionMemberInfo that specifies the default member of the MdmLevelHierarchy.
 java.util.List<MdmHierarchyLevel> getHierarchyLevels()
          Gets the MdmHierarchyLevel components of the MdmLevelHierarchy.
 MdmAttribute getLevelAttribute()
          Gets the MdmAttribute that relates the members of a component MdmHierarchyLevel to a level in the hierarchy.
 MdmAttribute getLevelDepthAttribute()
          Gets the MdmAttribute that relates the members of a component MdmHierarchyLevel to the depth of a level in the hierarchy.
 MtmLevelHierarchyMap getLevelHierarchyMap()
          Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by the getSolvedHierarchyMap method of this class and the getHierarchyLevelMap methods of component MdmHierarchyLevel objects.
 java.util.List getLevels()
          Gets the MdmHierarchyLevel components of the MdmLevelHierarchy.
 MdmQueryColumn getQueryColumn(java.lang.String name)
          Gets the specified MdmQueryColumn.
 java.util.List<MdmQueryColumn> getQueryColumns()
          Gets the MdmQueryColumn objects that are associated with this MdmLevelHierarchy.
 SolvedLevelHierarchyMap getSolvedHierarchyMap()
          Gets the SolvedLevelHierarchyMap associated with this MdmLevelHierarchy.
 boolean isRagged()
          Indicates whether the hierarchy is ragged, which means that not all of the leaf members are at the same level.
 boolean isSkipLevel()
          Indicates whether this MdmLevelHierarchy is a skip-level hierarchy.
 void removeHierarchyLevel(MdmHierarchyLevel level)
          Removes the specified MdmHierarchyLevel from this MdmLevelHierarchy.
 void removeLevel(MdmLevel level)
          Removes the specified MdmLevel from this MdmLevelHierarchy.
 void setDefaultMember(MdmDimensionMemberInfo defaultMember)
          Specifies a default member for the MdmLevelHierarchy.
 void setIsRagged(boolean input)
          Specifies that the hierarchy is ragged or not ragged.
 void setIsSkipLevel(boolean input)
          Specifies whether this MdmLevelHierarchy is a skip-level hierarchy.
 void setSolvedHierarchyMap(SolvedLevelHierarchyMap map)
          Specifies a SolvedLevelHierarchyMap to associate with this MdmLevelHierarchy.

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmHierarchy
getAncestorsAttribute, getETDepthColumn, getETParentColumn, getETViewName, getParentAttribute, getPrimaryDimension, getQuery, getQueryName, isDefaultHierarchy, setETViewName

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmSubDimension
addAttribute, getAttributes, removeAttribute

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmDimension
getCardinality, getCustomOrder, getPluralDescription, getShortPluralDescription, setCardinality, setCustomOrder, setPluralDescription, setShortPluralDescription

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmSource
getDataType, getModel, getSource, getSourceMap, getType, setModel

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmObject
findOrCreateDescription, getDescription, getDescription, getDescription, getMetadataProvider, getName, getShortDescription, setDescription, setDescription, setDescription, setName, setShortDescription

 

Methods inherited from class oracle.olapi.metadata.BaseMetadataObject
getID, getOwner

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

acceptVisitor

public java.lang.Object acceptVisitor(MdmObjectVisitor visitor,
                                      java.lang.Object context)
Calls the visitMdmLevelHierarchy method of the specified MdmObjectVisitor and passes that method the MdmLevelHierarchy and the specified context object.
Specified by:
acceptVisitor in class MdmObject
Parameters:
visitor - An MdmObjectVisitor.
context - An Object.
Returns:
The Object returned by the visitMdmLevelHierarchy method.

getLevelAttribute

public final MdmAttribute getLevelAttribute()
Gets the MdmAttribute that relates the members of a component MdmHierarchyLevel to a level in the hierarchy.
Returns:
The MdmAttribute that relates the members of the MdmHierarchyLevel components of this MdmLevelHierarchy to a level in the hierarchy.

getLevelDepthAttribute

public final MdmAttribute getLevelDepthAttribute()
Gets the MdmAttribute that relates the members of a component MdmHierarchyLevel to the depth of a level in the hierarchy. For example, an MdmLevelHierarchy that represents a hierarchy that has four levels would have four component MdmHierarchyLevel objects. The members of the MdmHierarchyLevel for the top level of the hierarchy have a level depth of 1, the members of the MdmHierarchyLevel that are the children of the level 1 members have a level depth of 2, and so on.
Returns:
The MdmAttribute that relates the members of the MdmHierarchyLevel components of this MdmLevelHierarchy to the depth of their level in the hierarchy.

getLevelHierarchyMap

public MtmLevelHierarchyMap getLevelHierarchyMap()
                                          throws oracle.express.mdm.MetadataNotFoundException
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by the getSolvedHierarchyMap method of this class and the getHierarchyLevelMap methods of component MdmHierarchyLevel objects.
Throws:
oracle.express.mdm.MetadataNotFoundException

getLevels

public final java.util.List getLevels()
Gets the MdmHierarchyLevel components of the MdmLevelHierarchy. This method provides compatibility with earlier versions of the Oracle OLAP Java API. In those earlier versions, this method returned a List of MdmLevel objects. The MdmLevel class is now a subclass of MdmHierarchyLevel and is deprecated.
Returns:
A List that contains the MdmHierarchyLevel components of the MdmLevelHierarchy.

getHierarchyLevels

public final java.util.List<MdmHierarchyLevel> getHierarchyLevels()
Gets the MdmHierarchyLevel components of the MdmLevelHierarchy.
Returns:
A List that contains the MdmHierarchyLevel components of the MdmLevelHierarchy.

getDefaultMember

public MdmDimensionMemberInfo getDefaultMember()
                                        throws oracle.express.mdm.MetadataNotFoundException
Gets the MdmDimensionMemberInfo that specifies the default member of the MdmLevelHierarchy. From the MdmDimensionMemberInfo you can get the value of the default member by calling the getLocalValue or getUniqueValue method.
Specified by:
getDefaultMember in class MdmHierarchy
Returns:
An MdmDimensionMemberInfo that has the default member of the MdmLevelHierarchy.
Throws:
oracle.express.mdm.MetadataNotFoundException

setDefaultMember

public void setDefaultMember(MdmDimensionMemberInfo defaultMember)
                      throws oracle.express.mdm.MetadataNotFoundException,
                             MdmInvalidValueException
Specifies a default member for the MdmLevelHierarchy.
Specified by:
setDefaultMember in class MdmHierarchy
Parameters:
defaultMember - An MdmDimensionMemberInfo that has the value to specify as the default member of the MdmLevelHierarchy.
Throws:
oracle.express.mdm.MetadataNotFoundException
MdmInvalidValueException

addHierarchyLevel

public void addHierarchyLevel(MdmHierarchyLevel level,
                              int levelNumber)
Adds an MdmHierarchyLevel at the specified position in the ordered list of hierarchy levels that are associated with this MdmLevelHierarchy .
Parameters:
level - The MdmHierarchyLevel to add to the list.
levelNumber - The position in the hierarchy for the level.

addHierarchyLevel

public void addHierarchyLevel(MdmHierarchyLevel level)
Appends an MdmHierarchyLevel to the ordered list of hierarchy levels that are associated with this MdmLevelHierarchy .
Parameters:
level - The MdmHierarchyLevel to append to the list.

removeLevel

public void removeLevel(MdmLevel level)
Removes the specified MdmLevel from this MdmLevelHierarchy.
Parameters:
level - The MdmLevel to remove as a component of the hierarchy.

removeHierarchyLevel

public void removeHierarchyLevel(MdmHierarchyLevel level)
Removes the specified MdmHierarchyLevel from this MdmLevelHierarchy.
Parameters:
level - The MdmHierarchyLevel to remove as a component of the hierarchy.

createNumericLevel

public MdmLevel createNumericLevel(java.lang.String name,
                                   MtmValueExpression expression,
                                   int levelNumber)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createNumericLevel

public MdmLevel createNumericLevel(java.lang.String name,
                                   java.lang.String expression,
                                   int levelNumber)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createNumericLevel

public MdmLevel createNumericLevel(java.lang.String name,
                                   MtmValueExpression expression,
                                   MdmLevel parentLevel)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createNumericLevel

public MdmLevel createNumericLevel(java.lang.String name,
                                   java.lang.String expression,
                                   MdmLevel parentLevel)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createStringLevel

public MdmLevel createStringLevel(java.lang.String name,
                                  MtmValueExpression expression,
                                  int levelNumber)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createStringLevel

public MdmLevel createStringLevel(java.lang.String name,
                                  java.lang.String expression,
                                  int levelNumber)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createStringLevel

public MdmLevel createStringLevel(java.lang.String name,
                                  MtmValueExpression expression,
                                  MdmLevel parentLevel)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createStringLevel

public MdmLevel createStringLevel(java.lang.String name,
                                  java.lang.String expression,
                                  MdmLevel parentLevel)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createDateLevel

public MdmLevel createDateLevel(java.lang.String name,
                                MtmValueExpression expression,
                                int levelNumber)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createDateLevel

public MdmLevel createDateLevel(java.lang.String name,
                                java.lang.String expression,
                                int levelNumber)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createDateLevel

public MdmLevel createDateLevel(java.lang.String name,
                                MtmValueExpression expression,
                                MdmLevel parentLevel)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createDateLevel

public MdmLevel createDateLevel(java.lang.String name,
                                java.lang.String expression,
                                MdmLevel parentLevel)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createBooleanLevel

public MdmLevel createBooleanLevel(java.lang.String name,
                                   MtmValueExpression expression,
                                   int levelNumber)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createBooleanLevel

public MdmLevel createBooleanLevel(java.lang.String name,
                                   java.lang.String expression,
                                   int levelNumber)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createBooleanLevel

public MdmLevel createBooleanLevel(java.lang.String name,
                                   MtmValueExpression expression,
                                   MdmLevel parentLevel)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

createBooleanLevel

public MdmLevel createBooleanLevel(java.lang.String name,
                                   java.lang.String expression,
                                   MdmLevel parentLevel)
Deprecated. As of Oracle 11g, Release 1 (11.1); replaced by findOrCreateHierarchyLevel.

getSolvedHierarchyMap

public final SolvedLevelHierarchyMap getSolvedHierarchyMap()
Gets the SolvedLevelHierarchyMap associated with this MdmLevelHierarchy.
Returns:
The SolvedLevelHierarchyMap for this MdmLevelHierarchy.

setSolvedHierarchyMap

public final void setSolvedHierarchyMap(SolvedLevelHierarchyMap map)
Specifies a SolvedLevelHierarchyMap to associate with this MdmLevelHierarchy.
Parameters:
map - The SolvedLevelHierarchyMap to associate with this MdmLevelHierarchy.

isSkipLevel

public final boolean isSkipLevel()
Indicates whether this MdmLevelHierarchy is a skip-level hierarchy. A skip-level hierarchy contains at least one member whose parents are more than one level above it.
Returns:
A boolean that is true if the hierarchy is a skip-level hierarchy or false if it is not.

setIsSkipLevel

public final void setIsSkipLevel(boolean input)
Specifies whether this MdmLevelHierarchy is a skip-level hierarchy. A skip-level hierarchy contains at least one member whose parents are more than one level above it, creating a hole in the hierarchy. An example of a skip-level hierarchy is City-State-Country, where at least one city has a country as its parent (for example, Washington D.C. in the United States).
Parameters:
input - A boolean that is true if the hierarchy is a skip-level hierarchy or false if it is not.

isRagged

public final boolean isRagged()
Indicates whether the hierarchy is ragged, which means that not all of the leaf members are at the same level. Leaf members are those that have no children.
Returns:
A boolean that is true if the hierarchy is ragged or false if it is not.

setIsRagged

public final void setIsRagged(boolean input)
Specifies that the hierarchy is ragged or not ragged. A ragged hierachy is one in which not all of the leaf members are at the same level. Leaf members are those that have no children.
Parameters:
input - A boolean that is true if the hierarchy is ragged or false if it is not.

getQueryColumns

public final java.util.List<MdmQueryColumn> getQueryColumns()
Gets the MdmQueryColumn objects that are associated with this MdmLevelHierarchy.
Specified by:
getQueryColumns in interface MdmQuery
Overrides:
getQueryColumns in class MdmHierarchy
Returns:
A List of the MdmQueryColumn objects associated with this MdmLevelHierarchy.

getQueryColumn

public MdmQueryColumn getQueryColumn(java.lang.String name)
Gets the specified MdmQueryColumn.
Specified by:
getQueryColumn in interface MdmQuery
Overrides:
getQueryColumn in class MdmHierarchy
Parameters:
name - A String that contains the name of an MdmQueryColumn.
Returns:
The MdmQueryColumn that has the specified name.

findOrCreateHierarchyLevel

public MdmHierarchyLevel findOrCreateHierarchyLevel(MdmDimensionLevel dimLevel)
Gets the specified MdmHierarchyLevel or, if it does not already exist, creates a new one for this MdmLevelHierarchy.
Parameters:
dimLevel - An MdmDimensionLevel that forms the basis of the MdmHierarchyLevel to get or create.
Returns:
The specified MdmHierarchyLevel or a new one with the specified MdmDimensionLevel.

findOrCreateSolvedLevelHierarchyMap

public SolvedLevelHierarchyMap findOrCreateSolvedLevelHierarchyMap()
Gets the SolvedLevelHierarchyMap that is associated with this MdmLevelHierarchy or creates a new SolvedLevelHierarchyMap if one does not already exist. This method exists for backward compatibility only. An application that uses the 11g metadata model does not use this method.
Returns:
The SolvedLevelHierarchyMap associated with this MdmLevelHierarchy.

Skip navigation links

Copyright © 2002, 2007, Oracle. All rights reserved.