Package oracle.olapi.metadata.mdm

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension


    // Get the Source for the measure.
    Source units = mdmUnits.getSource();

    // Get the MdmPrimaryDimension objects for the dimensions of the measure.
    MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    MdmPrimaryDimension mdmChanDim = getMdmPrimaryDimension("CHANNEL_AW");
    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");

    // Get the default hierarchy of the Product dimension.
    MdmHierarchy mdmProdHier = mdmProdDim.getDefaultHierarchy();

    // Get the StringSource for the hierarchy.
View Full Code Here


    Source units = mdmUnits.getSource();
       
    // Get the dimensions of the measure and the default hierarchies of
    // the dimensions.
       
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
    MdmPrimaryDimension mdmChanDim = getMdmPrimaryDimension("CHANNEL_AW");
    MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
       
    MdmLevelHierarchy mdmProdDefLvlHier = (MdmLevelHierarchy)
                                           mdmProdDim.getDefaultHierarchy();
       
    MdmLevelHierarchy mdmTimeDefLvlHier = (MdmLevelHierarchy)
                                           mdmTimeDim.getDefaultHierarchy();
       
    MdmLevelHierarchy mdmChanDefLvlHier = (MdmLevelHierarchy)
                                            mdmChanDim.getDefaultHierarchy();
       
    MdmLevelHierarchy mdmCustDefLvlHier = (MdmLevelHierarchy)
                                           mdmCustDim.getDefaultHierarchy();
       
    // Get the Source objects for the hierarchies.
    StringSource prodHier = (StringSource) mdmProdDefLvlHier.getSource();
    StringSource timeHier = (StringSource) mdmTimeDefLvlHier.getSource();
    StringSource chanHier = (StringSource) mdmChanDefLvlHier.getSource();
    StringSource custHier = (StringSource) mdmCustDefLvlHier.getSource();
       
    // Get the DataProvider.
    ExpressDataProvider dp = getExpressDataProvider();
       
    // Get the short description attribute for the dimensions and the
    // Source objects for the attributes.
    MdmAttribute mdmProdShortDescr =
                              mdmProdDim.getShortValueDescriptionAttribute();
    Source prodShortDescr = mdmProdShortDescr.getSource();
    MdmAttribute mdmCustShortDescr =
                              mdmCustDim.getShortValueDescriptionAttribute();
    Source custShortDescr = mdmCustShortDescr.getSource();
    MdmAttribute mdmTimeShortDescr =
                              mdmTimeDim.getShortValueDescriptionAttribute();
    Source timeShortDescr = mdmTimeShortDescr.getSource();
   
View Full Code Here

   
  protected void run() throws Exception
  {
    println("Drilling in a Hierarchy");
       
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
       
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                     mdmProdDim.getDefaultHierarchy();
    StringSource prodHier =  (StringSource) mdmProdHier.getSource();
       
    // Get one of the levels of the hierachy.
    MdmLevel mdmLevel = getContext().getLevelByName(mdmProdHier, "FAMILY_AW");
       
    Source levelSrc = mdmLevel.getSource();
       
    int pos = 5;
    Source levelElement = levelSrc.at(pos);
       
    // Use levelElement as the comparison to select a level value.
    Source levelSel = prodHier.join(prodHier.value(), levelElement);
       
       
    // Get the Source for the short label attribute of the dimension.
    Source prodShortLabel = mdmProdDim.getShortValueDescriptionAttribute()
                                      .getSource();
       
    // Get the parent relation from the hierarchy.
    MdmAttribute mdmProdHierParentAttr = mdmProdHier.getParentAttribute();
    Source prodHierParentAttr = mdmProdHierParentAttr.getSource();
View Full Code Here

  protected void run() throws Exception
  {
    println("Sorting Products Hierarchically By Attribute");

    // Get the PRODUCT dimension.
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");

    // Get the default hierarchy of the dimension and the parent attribute
    // of the hierarchy.
    MdmHierarchy mdmProdHier = mdmProdDim.getDefaultHierarchy();
    MdmAttribute mdmProdParentAttr = mdmProdHier.getParentAttribute();
   
    // Get the package attribute and the Source for it.   
    MdmAttribute mdmPackageAttr = getContext().getAttributeByName(mdmProdDim,
                                                                  "PACKAGE_AW");
    Source prodPkgAttr = mdmPackageAttr.getSource();
   

    // Get the Source objects for the metadata objects.
    StringSource prodDim = (StringSource) mdmProdDim.getSource();
    StringSource prodHier = (StringSource) mdmProdHier.getSource();
    Source prodParent = mdmProdParentAttr.getSource();

    // Sort products hierarchically, parents first, in ascending order
    // without using the package attribute.
View Full Code Here

    try
    {
      MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
      Source unitPrice = mdmUnitPrice.getSource();

      MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
      MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
      MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                       mdmProdDim.getDefaultHierarchy();
      MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
                                       mdmTimeDim.getDefaultHierarchy();

      // Get the Source for the hierarchy.
      StringSource prodHier = (StringSource) mdmProdHier.getSource();
      StringSource timeHier = (StringSource) mdmTimeHier.getSource();
View Full Code Here

    MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");
    NumberSource units = (NumberSource) mdmUnits.getSource();
    Source unitsGT1 = units.gt(1);

    MdmPrimaryDimension mdmChanDim = getMdmPrimaryDimension("CHANNEL_AW");
    MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
    MdmLevelHierarchy mdmChanHier = (MdmLevelHierarchy)
                                     mdmChanDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmCustHier = (MdmLevelHierarchy)
                                     mdmCustDim.getDefaultHierarchy();

    StringSource chanHier = (StringSource) mdmChanHier.getSource();
    StringSource custHier = (StringSource) mdmCustHier.getSource();

    Source chanSel = chanHier.selectValue("CHANNEL_PRIMARY_AW::CHANNEL_AW::2");
View Full Code Here

  {
    println("Getting the Share of Units Sold");
       
    MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");
       
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    Source prodDim = mdmProdDim.getSource();
       
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                       mdmProdDim.getDefaultHierarchy();
   
    // Get the Source for the default product hierarchy.
    StringSource prodHier = (StringSource) mdmProdHier.getSource();
       
    // Get the Source objects for the measure and for the default hierarchies
    // of the other dimensions.
    NumberSource units = (NumberSource) mdmUnits.getSource();
    StringSource custHier = (StringSource)
        getMdmPrimaryDimension("CUSTOMER_AW").getDefaultHierarchy().getSource();
    StringSource chanHier = (StringSource)
        getMdmPrimaryDimension("CHANNEL_AW").getDefaultHierarchy().getSource();
    StringSource timeHier = (StringSource)
        getMdmPrimaryDimension("TIME_AW").getDefaultHierarchy().getSource();
       
    Source totalProds =
           prodHier.selectValue("PRODUCT_PRIMARY_AW::TOTAL_PRODUCT_AW::1");
       
    MdmLevel mdmProdFamilies = getContext().getLevelByName(mdmProdHier,
                                                           "FAMILY_AW");
    Source prodFamilies = mdmProdFamilies.getSource();
   
    // Get the Source for the short value description attribute of the dimension.
    Source prodShortLabel = mdmProdDim.getShortValueDescriptionAttribute()
                                      .getSource();
       
    Source prodFamiliesShortDesc = prodShortLabel.join(prodFamilies);
       
    NumberSource totalUnits = (NumberSource) units.joinHidden(totalProds);
View Full Code Here

    println("Using the Lag Method");

    MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
    NumberSource unitPrice = (NumberSource) mdmUnitPrice.getSource();

    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                     mdmProdDim.getDefaultHierarchy();
    StringSource prodHier = (StringSource) mdmProdHier.getSource();
    Source prodSel = prodHier.selectValue("PRODUCT_PRIMARY_AW::FAMILY_AW::5");

    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
    MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();
    StringSource timeHier = (StringSource) mdmTimeHier.getSource();

    MdmLevel mdmQuarterLevel = getContext().getLevelByName(mdmTimeHier,
                                                           "QUARTER_AW");
    Source quarterLevel = mdmQuarterLevel.getSource();
View Full Code Here

TOP

Related Classes of oracle.olapi.metadata.mdm.MdmPrimaryDimension

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.