Skip Headers

Oracle9i OLAP Developer's Guide to the OLAP API
Release 2 (9.2)

Part Number A95297-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Discovering the Available Metadata, 5 of 8


Getting the Contents of the Root MdmSchema

The root MdmSchema contains MdmDimension objects, MdmSchema objects, and possibly MdmMeasure objects. In addition, the root MdmSchema has a measure MdmDimension that lists all the MdmMeasure objects.

Getting the MdmDimension Objects in an MdmSchema

The following code gets a List of MdmDimension objects that are in the MdmSchema called schema.

Example 4-3 Getting MdmDimension Objects

List dims = schema.getDimensions();

Getting the Subschemas in an MdmSchema

The following code gets a List of MdmSchema objects that are in the MdmSchema called schema.

Example 4-4 Getting Subschemas

List subSchemas = schema.getSubSchemas();

Getting the Contents of Subschemas

For each MdmSchema that is under the root MdmSchema, you can call the getMeasures, getDimensions, and getSubSchemas methods. The procedures are the same as those for getting the contents of the root MdmSchema.

Getting the Measure MdmDimension and Its Contents

The following code gets the measure MdmDimension that is in the root MdmSchema. Use this method only on the root MdmSchema. It makes no sense to use it on subschemas, because only the root MdmSchema has a measure MdmDimension.

Example 4-5 Getting the MdmMeasureDimension and Its Contents

MdmMeasureDimension mdmMeasureDim = root.getMeasureDimension();

The following code prints the names of the MdmMeasure objects that are elements of the measure MdmDimension.

MdmMeasureMemberType mdMemberType =
   (MdmMeasureMemberType) mdmMeasureDim.getMemberType();
List mdList = mdMemberType.getMeasures();
Iterator mdIter = mdList.iterator();
   while (mdIter.hasNext())
      System.out.println("************Contains Measure: " +
         ((MdmMeasure) mdIter.next()).getName());


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback