Oracle OLAP Java API Reference
10g Release 1 (10.1)

B10994-01

oracle.olapi.metadata.mdm
Class MdmPrimaryDimension

java.lang.Object
  |
  +--oracle.olapi.metadata.BaseMetadataObject
        |
        +--oracle.olapi.metadata.mdm.MdmObject
              |
              +--oracle.olapi.metadata.mdm.MdmSource
                    |
                    +--oracle.olapi.metadata.mdm.MdmDimension
                          |
                          +--oracle.olapi.metadata.mdm.MdmPrimaryDimension
Direct Known Subclasses:
MdmMeasureDimension, MdmStandardDimension, MdmTimeDimension

public abstract class MdmPrimaryDimension
extends MdmDimension

An MdmDimension that represents an Oracle OLAP dimension. An MdmPrimaryDimension has one or more MdmHierarchy components.

The concrete subclasses of the abstract MdmPrimaryDimension class represent different types of data. Most dimensions are MdmStandardDimension objects, which typically represent lists of products, customers, distribution channels, and so on. Another type of dimension is the MdmTimeDimension, which represents lists of time periods. A third type of dimension is the unique MdmMeasureDimension.

The MdmHierarchy components of an MdmPrimaryDimension represent organizations of the elements of the dimension. An Oracle OLAP dimension can be a simple, nonhierarchical list of elements, or it can be a organization of elements into one or more hierarchies. A hierarchy can have parent-child relationships organized by levels or by values. For example, a dimension of time periods might be organized into two hierarchies, one organized by calendar year time periods and the other organized by fiscal year time periods. Both hierarchies are organized by levels for year, quarter, month, and day time periods. Each of those hierarchies is represented by an MdmLevelHierarchy, which is a concrete subclass of the abstract MdmHierarchy class. Those MdmLevelHierarchy objects are the components of an MdmTimeDimension.

Some the methods of an MdmPrimaryDimension return MdmAttribute objects that have elements that are related to elements of the components of the dimension. For example, the getLocalValueAttribute method returns an MdmAttribute that relates the unique value of an element of a component of the MdmPrimaryDimension to its corresponding local value. A unique value specifies a hierarchy, a level of the hierarchy, and a value in that level, as in the following example from an MdmLevelHierarchy that represents products organized into levels by the type of product.

 PRODUCT_ROLLUP::FAMILY::8

The parts of the unique value are separated by a value separation string. The value separation string in the preceding example is ::, the double colons. The local value of that unique value is 8.

You initially get MdmPrimaryDimension objects from an instance of an MdmSchema or an MdmMeasure. The getDimensions methods of those objects return lists of MdmPrimaryDimension objects that are MdmStandardDimension or MdmTimeDimension objects. You get the MdmMeasureDimension by calling the getMeasureDimension method on the MdmSchema returned by the getRootSchema method of the MdmMetadataProvider that you are using.


Method Summary
 MdmAttribute createBooleanAttribute(java.lang.String name, MtmValueExpression expression)
          Creates a custom MdmAttribute that has a data type of Boolean, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
 MdmAttribute createBooleanAttribute(java.lang.String name, java.lang.String expression)
          Creates a custom MdmAttribute that has a data type of Boolean, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
 MdmAttribute createDateAttribute(java.lang.String name, MtmValueExpression expression)
          Creates a custom MdmAttribute that has a data type of Date, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
 MdmAttribute createDateAttribute(java.lang.String name, java.lang.String expression)
          Creates a custom MdmAttribute that has a data type of Date, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
 MdmLevelHierarchy createLevelHierarchy(java.lang.String name, MdmLevelHierarchy prototype)
          Creates a custom MdmLevelHierarchy that is initially identical to the one specified by prototype and adds it to this MdmPrimaryDimension.
 MdmAttribute createNumericAttribute(java.lang.String name, MtmValueExpression expression)
          Creates a custom MdmAttribute that has a data type of Number, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
 MdmAttribute createNumericAttribute(java.lang.String name, java.lang.String expression)
          Creates a custom MdmAttribute that has a data type of Number, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
 MdmLevelHierarchy createSolvedLevelHierarchy(java.lang.String name, MtmTabularSource table, MtmValueExpression gidExpression, MtmValueExpression etExpression, MtmValueExpression parentGIDExpression, MtmValueExpression parentETExpression)
          Creates a custom MdmLevelHierarchy that has an MtmSolvedLevelHierarchyMap that has the specified MtmTabularSource and expressions, and adds it to this MdmPrimaryDimension.
 MdmAttribute createStringAttribute(java.lang.String name, MtmValueExpression expression)
          Creates a custom MdmAttribute that has a data type of String, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
 MdmAttribute createStringAttribute(java.lang.String name, java.lang.String expression)
          Creates a custom MdmAttribute that has a data type of String, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
 MdmLevelHierarchy createUnsolvedLevelHierarchy(java.lang.String name, MtmTabularSource table)
          Creates a custom MdmLevelHierarchy that has an MtmUnsolvedLevelHierarchyMap that has the specified and MtmTabularSource adds it to this MdmPrimaryDimension.
 MdmValueHierarchy createValueHierarchy(java.lang.String name, MdmLevelHierarchy levelHierarchy)
          Creates a custom MdmValueHierarchy that is initially identical to the one specified by levelHierarchy and adds it to this MdmPrimaryDimension.
 MdmAttribute getAncestorsAttribute()
          Gets the ancestors attribute for this MdmPrimaryDimension.
 MdmHierarchy getDefaultHierarchy()
          Gets the default component of this MdmPrimaryDimension.
 java.util.List getHierarchies()
          Gets a List that contains the components of this MdmPrimaryDimension, which are MdmHierarchy objects.
 MdmAttribute getLevelAttribute()
          Gets the MdmAttribute that relates the level of the hierarchy that an element of the hierarchy is in to each element of the components of this MdmPrimaryDimension.
 MdmAttribute getLevelDepthAttribute()
          Gets the MdmAttribute that relates the depth of the level of the hierarchy that an element of the hierarchy is in to each element of the components of this MdmPrimaryDimension.
 MdmAttribute getLocalValueAttribute()
          Gets the MdmAttribute that relates a local value to each element of the components of this MdmPrimaryDimension.
 MdmAttribute getParentAttribute()
          Gets the parent attribute for this MdmPrimaryDimension.
 MdmPrimaryDimension getPrimaryDimension()
          Gets this MdmPrimaryDimension.
 MdmAttribute getShortValueDescriptionAttribute()
          Gets the MdmAttribute that relates a short description to each element of the components of this MdmPrimaryDimension.
 MdmAttribute getValueDescriptionAttribute()
          Gets the MdmAttribute that relates a long description to each element of the components of this MdmPrimaryDimension.
 java.lang.String getValueSeparationString()
          Returns the String that separates the hierarchy, level, and local value parts of the unique value of an element of a component of this MdmPrimaryDimension.
 void removeHierarchy(MdmHierarchy hierarchy)
          Removes hierarchy from the components of this MdmPrimaryDimension.
 void setDefaultHierarchy(MdmHierarchy hierarchy)
          Specifies hierarchy as the default hierarchy for this MdmPrimaryDimension.
 void setShortValueDescriptionAttribute(MdmAttribute attr)
          Specifes a short description value for elements of the components of this MdmPrimaryDimension.
 void setValueDescriptionAttribute(MdmAttribute attr)
          Specifes a long description value for elements of the components of this MdmPrimaryDimension.
 void setValueSeparationString(java.lang.String sep)
          Specifies a String that separates the hierarchy, level, and local value parts of the unique value of an element of a component of this MdmPrimaryDimension.

 

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

 

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

 

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

 

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

 

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

 

Method Detail

getAncestorsAttribute

public MdmAttribute getAncestorsAttribute()
                                   throws MetadataNotFoundException
Gets the ancestors attribute for this MdmPrimaryDimension. The ancestors attribute maps each element of the MdmHierarchy components of this MdmPrimaryDimension to its group of ancestors in the hierarchy. For example, the ancestors for a month in a time hierarchy might be quarter and year.
Returns:
The MdmAttribute that is the ancestors attribute of this MdmPrimaryDimension.

getHierarchies

public final java.util.List getHierarchies()
Gets a List that contains the components of this MdmPrimaryDimension, which are MdmHierarchy objects.
Returns:
A List that contains the components of this MdmPrimaryDimension.

getDefaultHierarchy

public MdmHierarchy getDefaultHierarchy()
Gets the default component of this MdmPrimaryDimension.
Returns:
The MdmHierarchy that is the default component of this MdmPrimaryDimension.

getPrimaryDimension

public final MdmPrimaryDimension getPrimaryDimension()
Gets this MdmPrimaryDimension.
Returns:
This MdmPrimaryDimension.
Overrides:
getPrimaryDimension in class MdmDimension

getParentAttribute

public MdmAttribute getParentAttribute()
                                throws MetadataNotFoundException
Gets the parent attribute for this MdmPrimaryDimension. The parent attribute maps each element of the MdmHierarchy components of this MdmPrimaryDimension to its parent.
Returns:
The MdmAttribute that is the parent attribute of this MdmPrimaryDimension.

getShortValueDescriptionAttribute

public final MdmAttribute getShortValueDescriptionAttribute()
                                                     throws MetadataNotFoundException
Gets the MdmAttribute that relates a short description to each element of the components of this MdmPrimaryDimension.
Returns:
The MdmAttribute that relates a short description to each element of the components of this MdmPrimaryDimension.

getValueDescriptionAttribute

public final MdmAttribute getValueDescriptionAttribute()
                                                throws MetadataNotFoundException
Gets the MdmAttribute that relates a long description to each element of the components of this MdmPrimaryDimension.
Returns:
The MdmAttribute that relates a long description to each element of the components of this MdmPrimaryDimension.

getLevelAttribute

public final MdmAttribute getLevelAttribute()
Gets the MdmAttribute that relates the level of the hierarchy that an element of the hierarchy is in to each element of the components of this MdmPrimaryDimension.
Returns:
The MdmAttribute that relates a level of a hierarchy to each element of the components of this MdmPrimaryDimension.

getLevelDepthAttribute

public final MdmAttribute getLevelDepthAttribute()
Gets the MdmAttribute that relates the depth of the level of the hierarchy that an element of the hierarchy is in to each element of the components of this MdmPrimaryDimension.
Returns:
The MdmAttribute that relates the depth of a level in a hierarchy to each element of the components of this MdmPrimaryDimension.

getLocalValueAttribute

public final MdmAttribute getLocalValueAttribute()
                                          throws MetadataNotFoundException
Gets the MdmAttribute that relates a local value to each element of the components of this MdmPrimaryDimension.
Returns:
The MdmAttribute that relates a local value to each element of the components of this MdmPrimaryDimension.

getValueSeparationString

public final java.lang.String getValueSeparationString()
                                                throws MetadataNotFoundException
Returns the String that separates the hierarchy, level, and local value parts of the unique value of an element of a component of this MdmPrimaryDimension.
Returns:
The value separation string for the parts of a unique value of an element of a component of this MdmPrimaryDimension.

createNumericAttribute

public MdmAttribute createNumericAttribute(java.lang.String name,
MtmValueExpression expression)
Creates a custom MdmAttribute that has a data type of Number, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
Parameters:
name - A String specifying the name of the custom MdmAttribute.
expression - An MtmValueExpression that provides the data for the custom MdmAttribute.
Returns:
A custom MdmAttribute with a data type of Number and the values specified by expression.

createNumericAttribute

public MdmAttribute createNumericAttribute(java.lang.String name,
                                           java.lang.String expression)
Creates a custom MdmAttribute that has a data type of Number, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
Parameters:
name - A String specifying the name of the custom MdmAttribute.
expression - A String that specifies the data for the custom MdmMeasure. Oracle OLAP uses the String to construct an MtmCustomExpression that has the default numeric data type.
Returns:
A custom MdmAttribute with a data type of Number and the values specified by expression.

createDateAttribute

public MdmAttribute createDateAttribute(java.lang.String name,
MtmValueExpression expression)
Creates a custom MdmAttribute that has a data type of Date, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
Parameters:
name - A String specifying the name of the custom MdmAttribute.
expression - An MtmValueExpression that provides the data for the custom MdmAttribute.
Returns:
A custom MdmAttribute with a data type of Date and the values specified by expression.

createDateAttribute

public MdmAttribute createDateAttribute(java.lang.String name,
                                        java.lang.String expression)
Creates a custom MdmAttribute that has a data type of Date, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
Parameters:
name - A String specifying the name of the custom MdmAttribute.
expression - A String that specifies the data for the custom MdmAttribute. Oracle OLAP uses the String to construct an MtmCustomExpression that has the String data type.
Returns:
A custom MdmAttribute with a data type of Date and the values specified by expression.

createStringAttribute

public MdmAttribute createStringAttribute(java.lang.String name,
MtmValueExpression expression)
Creates a custom MdmAttribute that has a data type of String, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
Parameters:
name - A String specifying the name of the custom MdmAttribute.
expression - An MtmValueExpression that provides the data for the custom MdmAttribute.
Returns:
A custom MdmAttribute with a data type of String and the values specified by expression.

createStringAttribute

public MdmAttribute createStringAttribute(java.lang.String name,
                                          java.lang.String expression)
Creates a custom MdmAttribute that has a data type of String, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
Parameters:
name - A String specifying the name of the custom MdmAttribute.
expression - A String that provides the data for the custom MdmAttribute. Oracle OLAP uses the String to construct an MtmCustomExpression that has the String data type.
Returns:
A custom MdmAttribute with a data type of String and the values specified by expression.

createBooleanAttribute

public MdmAttribute createBooleanAttribute(java.lang.String name,
MtmValueExpression expression)
Creates a custom MdmAttribute that has a data type of Boolean, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
Parameters:
name - A String specifying the name of the custom MdmAttribute.
expression - An MtmValueExpression that provides the data for the custom MdmAttribute.
Returns:
A custom MdmAttribute with a data type of Boolean and the values specified by expression.

createBooleanAttribute

public MdmAttribute createBooleanAttribute(java.lang.String name,
                                           java.lang.String expression)
Creates a custom MdmAttribute that has a data type of Boolean, that has the data specified by expression, and that is dimensioned by this MdmPrimaryDimension.
Parameters:
name - A String specifying the name of the custom MdmAttribute.
expression - A String that provides the data for the custom MdmAttribute. Oracle OLAP uses the String to construct an MtmCustomExpression that has the String data type.
Returns:
A custom MdmAttribute with a data type of Boolean and the values specified by expression.

setDefaultHierarchy

public void setDefaultHierarchy(MdmHierarchy hierarchy)
Specifies hierarchy as the default hierarchy for this MdmPrimaryDimension.
Parameters:
hierarchy - The MdmHierarchy to set as the default hierarchy for this MdmPrimaryDimension.

removeHierarchy

public void removeHierarchy(MdmHierarchy hierarchy)
Removes hierarchy from the components of this MdmPrimaryDimension.
Parameters:
hierarchy - The MdmHierarchy to remove from this MdmPrimaryDimension

createLevelHierarchy

public MdmLevelHierarchy createLevelHierarchy(java.lang.String name,
MdmLevelHierarchy prototype)
Creates a custom MdmLevelHierarchy that is initially identical to the one specified by prototype and adds it to this MdmPrimaryDimension. You can change your custom MdmLevelHierarchy by, for example, adding or removing levels or custom members or attributes or by revising the MtmDimensionOrderSpecification objects of its MtmUnsolvedLevelHierarchyMap.

The prototype hierarchy must be an unsolved level hierarchy, which is an MdmLevelHierarchy that has an MtmUnsolvedLevelHierarchyMap. The custom MdmLevelHierarchy returned by this method has MtmUnsolvedCube objects that are copies of the MtmUnsolvedCube objects that are dimensioned by the prototype hierarchy.

Parameters:
name - A String that specifies a name for the custom MdmLevelHierarchy.
prototype - An existing MdmLevelHierarchy that has an MtmUnsolvedLevelHierarchyMap.
Returns:
An MdmLevelHierarchy that is initially a copy of prototype.

createUnsolvedLevelHierarchy

public MdmLevelHierarchy createUnsolvedLevelHierarchy(java.lang.String name,
MtmTabularSource table)
Creates a custom MdmLevelHierarchy that has an MtmUnsolvedLevelHierarchyMap that has the specified and MtmTabularSource adds it to this MdmPrimaryDimension.
Parameters:
name - A String that specifies a name for the custom MdmLevelHierarchy.
table - The MtmTabularSource that represents the mapping of the relational database table to the dimensional hierarchy.
Returns:
An MdmLevelHierarchy that is mapped to the relational table specified by table.
See Also:
MtmUnsolvedLevelHierarchyMap

createSolvedLevelHierarchy

public MdmLevelHierarchy createSolvedLevelHierarchy(java.lang.String name,
MtmTabularSource table,
MtmValueExpression gidExpression,
MtmValueExpression etExpression,
MtmValueExpression parentGIDExpression,
MtmValueExpression parentETExpression)
Creates a custom MdmLevelHierarchy that has an MtmSolvedLevelHierarchyMap that has the specified MtmTabularSource and expressions, and adds it to this MdmPrimaryDimension.
Parameters:
name - A String that specifies a name for the custom MdmLevelHierarchy.
table - The MtmTabularSource that represents the mapping of the relational database table to the dimensional hierarchy.
gidExpression - An MtmValueExpression that specifies the GID column for the MtmSolvedLevelHierarchyMap of the custom MdmLevelHierarchy.
etExpression - An MtmValueExpression that specifies the ET column for the MtmSolvedLevelHierarchyMap.
parentGIDExpression - An MtmValueExpression that specifies the parent GID column for the MtmSolvedLevelHierarchyMap.
parentETExpression - An MtmValueExpression that specifies the parent ET column for the MtmSolvedLevelHierarchyMap.
Returns:
An MdmLevelHierarchy that is mapped to the relational table specified by table.
See Also:
MtmSolvedLevelHierarchyMap

createValueHierarchy

public MdmValueHierarchy createValueHierarchy(java.lang.String name,
MdmLevelHierarchy levelHierarchy)
Creates a custom MdmValueHierarchy that is initially identical to the one specified by levelHierarchy and adds it to this MdmPrimaryDimension. The levelHierarchy object must be a component of this MdmPrimaryDimension and it must be an unsolved level hierarchy, which is an MdmLevelHierarchy that has an MtmUnsolvedLevelHierarchyMap.

You can change your custom MdmValueHierarchy by, for example, adding or removing custom members or attributes or by revising the MtmDimensionOrderSpecification objects of its MtmUnsolvedLevelHierarchyMap.

Parameters:
name - A String that specifies a name for the custom MdmValueHierarchy.
levelHierarchy - An existing MdmLevelHierarchy that has an MtmUnsolvedLevelHierarchyMap and that is a component of this MdmPrimaryDimension.
Returns:
An MdmLevelHierarchy that is initially a copy of levelHierarchy.

setShortValueDescriptionAttribute

public final void setShortValueDescriptionAttribute(MdmAttribute attr)
Specifes a short description value for elements of the components of this MdmPrimaryDimension.
Parameters:
attr - An MdmAttribute that relates a short description to elements of the components of this MdmPrimaryDimension.

setValueDescriptionAttribute

public final void setValueDescriptionAttribute(MdmAttribute attr)
Specifes a long description value for elements of the components of this MdmPrimaryDimension.
Parameters:
attr - An MdmAttribute that relates a long description to elements of the components of this MdmPrimaryDimension.

setValueSeparationString

public final void setValueSeparationString(java.lang.String sep)
Specifies a String that separates the hierarchy, level, and local value parts of the unique value of an element of a component of this MdmPrimaryDimension.
Parameters:
sep - A String that you want to use as the value separation string for the parts of a unique value of an element of a component of this MdmPrimaryDimension.

Oracle OLAP Java API Reference
10g Release 1 (10.1)

B10994-01

Copyright © 2002, 2003, Oracle. All Rights Reserved.