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

B10994-01

oracle.olapi.metadata.mdm
Class MdmSchema

java.lang.Object
  |
  +--oracle.olapi.metadata.BaseMetadataObject
        |
        +--oracle.olapi.metadata.mdm.MdmObject
              |
              +--oracle.olapi.metadata.mdm.MdmSchema

public class MdmSchema
extends MdmObject

A container for MdmMeasure, MdmDimension, and other MdmSchema objects that are related by informational content. An MdmSchema is equivalent to a folder or directory that contains associated items. Because MdmSchema objects can contain other MdmSchema objects, they can be arranged in a nested structure.

All the data that is accessible through an MdmMetadataProvider is arranged under the root MdmSchema, which is the top-level MdmSchema. Typically, one or more subschema MdmSchema objects are under the root. To begin navigating the metadata that is accessible through an MdmMetadataProvider, call the getRootSchema method of the MdmMetadataProvider.

The purpose of an MdmSchema is to facilitate navigation through the metadata in a data store. An MdmMetadataProvider produces MdmSchema objects that correspond to the measure folders that a database administrator creates in the OLAP Catalog. You can create a custom MdmSchema with the createSchema( method of an MdmCustomObjectFactory.

See Also:
MdmMetadataProvider

Method Summary
 java.lang.Object acceptVisitor(MdmObjectVisitor visitor, java.lang.Object context)
          Calls the visitMdmSchema method of the specified MdmObjectVisitor and passes that method this MdmObject and the specified context object.
 void addDimension(MdmPrimaryDimension dimension)
          Adds the specified MdmPrimaryDimension to this MdmSchema.
 void addMeasure(MdmMeasure measure)
          Adds the specified MdmMeasure to this MdmSchema.
 void addSubSchema(MdmSchema subschema)
          Adds the specified MdmSchema to this MdmSchema.
 java.util.List getDimensions()
          Gets the MdmPrimaryDimension objects that this MdmSchema contains.
 MdmMeasureDimension getMeasureDimension()
          Gets the MdmMeasureDimension for the MdmMetadataProvider for which this MdmSchema is the top-level, or root, schema.
 java.util.List getMeasures()
          Gets the MdmMeasure objects that are contained in this MdmSchema.
 java.util.List getSubSchemas()
          Gets the MdmSchema objects that this MdmSchema contains.
 void removeDimension(MdmPrimaryDimension dimension)
          Removes the specified MdmPrimaryDimension from this MdmSchema.
 void removeMeasure(MdmMeasure measure)
          Removes the specified MdmMeasure from this MdmSchema.
 void removeSubSchema(MdmSchema subschema)
          Removes the specified MdmSchema from this MdmSchema.

 

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

acceptVisitor

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

getDimensions

public java.util.List getDimensions()
Gets the MdmPrimaryDimension objects that this MdmSchema contains. The root MdmSchema contains all of the MdmPrimaryDimension objects available through an MdmMetadataProvider, except for the MdmMeasureDimension. To get the MdmMeasureDimension, call the getMeasureDimension method. MdmSchema objects under the root schema contain only the dimensions in the subschema and any subschemas that they contain.
Returns:
A List of the MdmPrimaryDimension objects in this MdmSchema and its subschemas.

getMeasureDimension

public MdmMeasureDimension getMeasureDimension()
                                        throws MetadataNotFoundException
Gets the MdmMeasureDimension for the MdmMetadataProvider for which this MdmSchema is the top-level, or root, schema. From the MdmMeasureDimension, you can get all of the MdmMeasure objects that are accessible through the MdmMetadataProvider.

Call this method only on the root MdmSchema. Because there is only one measure MdmMeasureDimension for an MdmMetadataProvider and because it provides all of the MdmMeasure objects that are accessible from the root MdmSchema and from all of its subschemas, you should call this method only from the root MdmSchema. If you call this method from a subschema, the method returns null.

The getMeasures method of an MdmSchema returns a List of the measures in the MdmSchema. The List contains only those measures that the database administrator has not assigned in the OLAP Catalog to a subschema under the MdmSchema, or that you have not added to a subschema with its addMeasure method.

Returns:
The MdmMeasureDimension for the MdmMetadataProvider for which this is the root MdmSchema or null if this is not the root.

getMeasures

public java.util.List getMeasures()
Gets the MdmMeasure objects that are contained in this MdmSchema. For the root MdmSchema, the List that this method returns contains any MdmMeasure objects that you, through the addMeasure method, or a database administrator, in the OLAP Catalog, have not assigned to a subschema MdmSchema.
Returns:
A List of MdmMeasure objects that this MdmSchema contains.

getSubSchemas

public java.util.List getSubSchemas()
Gets the MdmSchema objects that this MdmSchema contains.
Returns:
A List of MdmSchema objects that this MdmSchema contains.

addMeasure

public final void addMeasure(MdmMeasure measure)
Adds the specified MdmMeasure to this MdmSchema.
Parameters:
measure - The MdmMeasure to add to this MdmSchema.

removeMeasure

public final void removeMeasure(MdmMeasure measure)
Removes the specified MdmMeasure from this MdmSchema.
Parameters:
measure - The MdmMeasure to remove from this MdmSchema.

addDimension

public final void addDimension(MdmPrimaryDimension dimension)
Adds the specified MdmPrimaryDimension to this MdmSchema.
Parameters:
measure - The MdmPrimaryDimension to add to this MdmSchema.

removeDimension

public final void removeDimension(MdmPrimaryDimension dimension)
Removes the specified MdmPrimaryDimension from this MdmSchema.
Parameters:
dimension - The MdmPrimaryDimension to remove from this MdmSchema.

addSubSchema

public final void addSubSchema(MdmSchema subschema)
Adds the specified MdmSchema to this MdmSchema.
Parameters:
measure - The MdmSchema to add to this MdmSchema.

removeSubSchema

public final void removeSubSchema(MdmSchema subschema)
Removes the specified MdmSchema from this MdmSchema.
Parameters:
dimension - The MdmSchema to remove from this MdmSchema.

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

B10994-01

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