}
protected void run() throws Exception
{
System.out.println("Departments:");
MdmPrimaryDimension mdmDeptDim = getMdmPrimaryDimension("DEPARTMENT");
MdmValueHierarchy mdmDeptHier = (MdmValueHierarchy)
mdmDeptDim.getDefaultHierarchy();
StringSource valueSource = (StringSource)mdmDeptHier.getSource();
Source depShortLabel = mdmDeptDim.getShortValueDescriptionAttribute().getSource();
Source levelSrcWithShortDescr = depShortLabel.join(valueSource);
prepareAndCommit();
// Create Cursor objects and display their values.
getContext().displayResult(levelSrcWithShortDescr);
/**
* 选择某个部门,以及他的直接下属部门
*/
System.out.println("Media:");
MdmPrimaryDimension mdmMediaDim = getMdmPrimaryDimension("MEDIA");
MdmLevelHierarchy mdmMediaHier = (MdmLevelHierarchy)
mdmMediaDim.getDefaultHierarchy();
Source levelSource = mdmMediaHier.getSource();
depShortLabel = mdmMediaDim.getShortValueDescriptionAttribute().getSource();
Source mediaShortLabel = depShortLabel.join(levelSource);
prepareAndCommit();
// Create Cursor objects and display their values.
getContext().displayResult(mediaShortLabel);
System.out.println("Time:");
MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("MYTIME");
MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
mdmTimeDim.getDefaultHierarchy();
levelSource = mdmTimeHier.getSource();
// depShortLabel = mdmTimeDim.getShortValueDescriptionAttribute().getSource();
//