BIMetadata
is a sample application that demonstrates how a BI
Beans application can retrieve metadata from a MetadataManager that is connected
to the Oracle OLAP (the source of the business data for the application) and
to the BI Beans Catalog (where object definitions, like crosstabs and graphs,
are saved).
BIMetadata
extends BIFrame
and provides a menu with
access to a simple connection dialog, which prompts a user for security credentials.
It then makes the two connections described above. After the connection is established,
the Metadata Browser menu option can be selected
to view metadata.
There are a few areas of interest in the code which may be particularly useful
for developers. The code below is taken from the getChildren
method and demonstrates how to retrieve subfolders, measures and dimensions
from an MDFolder
:
MDObject[] children = folder.getFolders();
for(int
i = 0; children != null && i < children.length; i++) childrenVec.addElement(children[i]);
children = folder.getMeasures(); for(int i = 0; children != null && i < children.length;
i++) childrenVec.addElement(children[i]); children = folder.getDimensions();
for(int i = 0; children != null && i < children.length; i++) childrenVec.addElement(children[i]);
The code below is taken from the showProperties
method and demonstrates
how to retrieve general properties from an MDObject
:
text.append("Name = " + mdObject.getName() + newLine);
text.append("UniqueID
= " + mdObject.getUniqueID() + newLine);
text.append("ObjectType = " + mdObject.getObjectType()
+ newLine);
text.append("DriverType = " + mdObject.getDriverTypes().toString()
+ newLine);
text.append("Path = " + mdObject.getPath() + newLine);
text.append("ShortLabel
= " + mdObject.getShortLabel() + newLine);
text.append("LongLabel = " + mdObject.getLongLabel()
+ newLine);
text.append("Description = " + mdObject.getDescription() + newLine);
Copyright © 2004 Oracle Corporation. All Rights Reserved. |