| Oracle9i OLAP Developer's Guide to the OLAP API Release 2 (9.2) Part Number A95297-01 |
|
Discovering the Available Metadata, 5 of 8
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.
The following code gets a List of MdmDimension objects that are in the MdmSchema called schema.
List dims = schema.getDimensions();
The following code gets a List of MdmSchema objects that are in the MdmSchema called schema.
List subSchemas = schema.getSubSchemas();
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.
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.
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());
|
![]() Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|