{
// Get the MdmPrimaryDimension for the CUSTOMER_AW dimension,
// the MdmLevelHierarchy for the SHIPMENTS hierarchy of that
// dimension, and the Source objects for them.
MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
MdmLevelHierarchy mdmShipmentsHIer = (MdmLevelHierarchy)
getContext().getHierarchyByName(mdmCustDim, "SHIPMENTS_AW");
Source custDim = mdmCustDim.getSource();
StringSource shipments = (StringSource) mdmShipmentsHIer.getSource();
// Get the parent attribute for the hierarchy and the value description
// attribute for the dimension, and the Source objects for them.
MdmAttribute mdmParentAttr = mdmShipmentsHIer.getParentAttribute();
MdmAttribute mdmCustValDescAttr = mdmCustDim.getValueDescriptionAttribute();
Source shipmentsParentAttr = mdmParentAttr.getSource();
Source custValDescAttr = mdmCustValDescAttr.getSource();
// Specify a parent value from the hierarchy.