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

B10994-01

oracle.olapi.metadata.mdm
Class MdmAttribute

java.lang.Object
  |
  +--oracle.olapi.metadata.BaseMetadataObject
        |
        +--oracle.olapi.metadata.mdm.MdmObject
              |
              +--oracle.olapi.metadata.mdm.MdmSource
                    |
                    +--oracle.olapi.metadata.mdm.MdmDimensionedObject
                          |
                          +--oracle.olapi.metadata.mdm.MdmAttribute

public class MdmAttribute
extends MdmDimensionedObject

An MdmDimensionedObject that represents a particular characteristic of the elements of an MdmDimension. An MdmAttribute relates one element of the MdmDimension to a particular value. For example, the end date MdmAttribute of an MdmTimeDimension relates an end date to each element of an MdmTimeDimension. The data type of an MdmAttribute can be any of the OLAP API data types. A value of MdmAttribute can be a boolean, a Date, a number, a String, an MdmSource, or other kinds of objects.

Like an MdmMeasure, an MdmAttribute has elements that are organized by its MdmDimension. For example, the end date MdmAttribute has one element (with a value that specifies a date) for each element of its MdmTimeDimension.

Some attributes relate to all of the elements of a dimension. You get such an attribute by calling the getAttributes method of the MdmDimension concrete subclass. Other attributes apply only to specific subclasses, such as the level attribute of an MdmLevelHierarchy, which you get with its getLevelAttribute method.

Sometimes, not all of the elements of an MdmDimension relate to the values of an MdmAttribute. For example, an MdmLevelHierarchy that represents a dimension of product items at the lowest level might have an attribute that relates a color to the items. The color attribute does not apply to elements at higher levels of the hierarchy. If an MdmAttribute does not apply to an element of an MdmDimension, then the attribute value for that element is null.

Some MdmAttribute objects provide a relation that is one-to-many, rather than one-to-one. Therefore, an element in an MdmDimension might map to a whole set of MdmAttribute elements. For example, the MdmAttribute that is the ancestors attribute of an MdmHierarchy relates each element of the MdmHierarchy to the set of the MdmHierarchy elements that are its ancestors.

Attributes are specified in the OLAP Catalog by a database administrator. You can also create custom attributes and add them to an MdmPrimaryDimension with methods of the MdmPrimaryDimension or an MdmCustomObjectFactory.


Method Summary
 java.lang.Object acceptVisitor(MdmObjectVisitor visitor, java.lang.Object context)
          Calls the visitMdmAttribute method of the specified MdmObjectVisitor and passes that method this MdmAttribute and the specified context object.
 MtmAttributeMap getAttributeMap()
          Gets the MtmAttributeMap for this MdmAttribute.

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmDimensionedObject
getDimensions

 

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

 

Methods inherited from class oracle.olapi.metadata.mdm.MdmObject
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

getAttributeMap

public MtmAttributeMap getAttributeMap()
                                throws MetadataNotFoundException
Gets the MtmAttributeMap for this MdmAttribute. The MtmAttributeMap maps the elements of this MdmAttribute to data in the relational database.
Returns:
The MtmAttributeMap for this MdmAttribute.
See Also:
MtmAttributeMap

acceptVisitor

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

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

B10994-01

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