Examples of MdmPrimaryDimension


Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

  private void selectingFirstAndLastTimes()
    throws Exception
  {
    println("\nSelecting the First and Last Time Elements");

    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");

    // Get the level attribute of the dimension.
    MdmAttribute mdmTimeLevelAttr = mdmTimeDim.getLevelAttribute();

    // Get the default hierarchy of the dimension.
    MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();

    // Get the Source objects for the level attribute and the hierarchy.
      Source levelRel = mdmTimeLevelAttr.getSource();
      StringSource timeHier = (StringSource) mdmTimeHier.getSource();
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

    throws Exception
  {
    println("\nSelecting a Subset of the Elements of a Source");

    // Get the CUSTOMER_AW dimension.
    MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");

    // Get the default hierarchy of the dimension and the parent attribute
    // of the hierarchy.
    MdmHierarchy mdmShipments = mdmCustDim.getDefaultHierarchy();

    // Get the Source for the hierarchy.
    StringSource shipments = (StringSource) mdmShipments.getSource();

    // Select some elements of the hierarchy.
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

    // Get the primary dimensions and the measure.
    MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");

    // Get the MdmPrimaryDimension and the default MdmLevelHiearchy for the
    // PRODUCT dimension.
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    StringSource custHier = (StringSource)
      getMdmPrimaryDimension("CUSTOMER_AW").getDefaultHierarchy().getSource();
    StringSource chanHier = (StringSource)
      getMdmPrimaryDimension("CHANNEL_AW").getDefaultHierarchy().getSource();
    StringSource timeHier = (StringSource)
      getMdmPrimaryDimension("TIME_AW").getDefaultHierarchy().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();

    // Get the parent attribute of the PRODUCT dimension and the Source for it
    // to use in the recursiveJoin method.
    MdmAttribute mdmProdParentAttr = mdmProdHier.getParentAttribute();
    Source prodParent = mdmProdParentAttr.getSource();

    // Get the short value description attribute and its Source.
    MdmAttribute mdmProdShortDescrAttr =
                                mdmProdDim.getShortValueDescriptionAttribute();
    Source prodShortDescr = mdmProdShortDescrAttr.getSource();

    // Select the Direct Sales channel, the year 2001, and all customers.
    Source chanSel = chanHier.selectValue("CHANNEL_PRIMARY_AW::CHANNEL_AW::2");
    Source timeSel = timeHier.selectValue("CALENDAR_YEAR_AW::YEAR_AW::4");
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

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

    // Get the dimensions of the measure and the default hierarchies of
    // the dimensions.
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    MdmLevelHierarchy mdmProdDefLvlHier = (MdmLevelHierarchy)
                                           mdmProdDim.getDefaultHierarchy();

    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
    MdmLevelHierarchy mdmTimeDefLvlHier = (MdmLevelHierarchy)
                                           mdmTimeDim.getDefaultHierarchy();

    MdmPrimaryDimension mdmChanDim = getMdmPrimaryDimension("CHANNEL_AW");
    MdmLevelHierarchy mdmChanDefLvlHier = (MdmLevelHierarchy)
                                           mdmChanDim.getDefaultHierarchy();

    MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
    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();
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

    println("Using the movingTotal 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

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

*/
public class GettingTypeOfMdmSource extends ContextExample
  protected void run() throws Exception
  {
    MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
    MdmLevelHierarchy mdmShipmentsHier = (MdmLevelHierarchy)
    getContext().getHierarchyByName(mdmCustDim, "SHIPMENTS_AW");
    MdmLevel mdmWarehouse =
              getContext().getLevelByName(mdmShipmentsHier, "WAREHOUSE_AW");
       
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

  protected void run() throws Exception
  {
    // Get the Dimension objects.
    MdmStandardDimension mdmProdStdDim =
                (MdmStandardDimension) getMdmPrimaryDimension("PRODUCT_AW");
    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
       
    // Get the Source for the Product dimension.
    Source prodStdDim = mdmProdStdDim.getSource();
       
    // Get the default hierarchies of the dimensions and the Source objects for
    // them.
    MdmLevelHierarchy mdmCalendar = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmProdPrimary = (MdmLevelHierarchy)
                                     mdmProdStdDim.getDefaultHierarchy();
    StringSource calendar = (StringSource) mdmCalendar.getSource();
    StringSource prodHier = (StringSource) mdmProdPrimary.getSource();
       
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

public class ElementsOfMdmAttribute extends ContextExample
{
  protected void run() throws Exception
  {
    // Get the MdmPrimaryDimension for the dimension of product values.
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
   
    // Get the package attribute and the Source for it.   
    MdmAttribute mdmPackageAttr = getContext().getAttributeByName(mdmProdDim,
                                                                  "PACKAGE_AW");
    Source pkgAttr = mdmPackageAttr.getSource();
   
    // Get the default hierarchy for the dimension and the Source for it.
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                     mdmProdDim.getDefaultHierarchy();
    Source prodHier = mdmProdHier.getSource();
       
    // Get the short value description attribute and the Source for it.
    MdmAttribute mdmProdShortDescrAttr =
                              mdmProdDim.getShortValueDescriptionAttribute();
    Source prodShortDescrAttr = mdmProdShortDescrAttr.getSource();
       
    // Produce a Source that has a short description for each product.
    Source prodByShortDescr = prodShortDescrAttr.join(prodHier);
       
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

       
    MdmMeasure mdmUnitCost = getMdmMeasure("UNIT_COST_AW");
    NumberSource unitCost = (NumberSource) mdmUnitCost.getSource();
       
    // Get the primary dimensions for the measures.
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
       
    // Get the default level hierarchies of the dimensions.
    MdmLevelHierarchy mdmProdPrimary = (MdmLevelHierarchy)
    mdmProdDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmCalendarYear = (MdmLevelHierarchy)
    mdmTimeDim.getDefaultHierarchy();
       
    // Get the Source objects for the hierarchies.
    StringSource prodHier = (StringSource) mdmProdPrimary.getSource();
    StringSource calendarYear = (StringSource) mdmCalendarYear.getSource();
       
    // Get the root MdmSchema.
    MdmSchema rootSchema = getMdmMetadataProvider().getRootSchema();
       
    // Get the MdmMeasureDimension of the root MdmSchema, and the Source for it.
    MdmMeasureDimension mdmMeasDim = rootSchema.getMeasureDimension();
    StringSource measDim = (StringSource) mdmMeasDim.getSource();
       
    // Specify a calculation for the custom measure.
    Source calculation = unitPrice.minus(unitCost);
       
    // Create custom measure as a custom member of the MdmMeasureDimension.
    MdmMeasure mdmMarkup = mdmMeasDim.createCustomMeasure("MARKUP_AW",
                                                           rootSchema,
                                                           calculation,
                                                           10);
    // Set the short and long value descriptions.
    mdmMarkup.setShortDescription("UNIT_PRICE_AW MINUS UNIT_COST_AW");
    mdmMarkup.setDescription("Unit price minus unit cost.");
       
    // Produce a Source that specifies the values of the members of the
    // measure dimension.
    Source measDimSel = measDim.selectValues(new String[]
                                            {mdmMarkup.getValue(),
                                             mdmUnitCost.getValue(),
                                             mdmUnitPrice.getValue()});
                
    // Get the Source objects for the short value description attributes
    // of the Product and Time dimensions.
    Source timeShortDesc =
                    mdmTimeDim.getShortValueDescriptionAttribute().getSource();
    Source prodShortDesc =
                    mdmProdDim.getShortValueDescriptionAttribute().getSource();
                
    // Select members of the product and time hierarchies.
    StringSource prodSel =
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

public class GettingDataTypeOfMdmSource extends ContextExample
  protected void run() throws Exception
  {
    // Get the MdmPrimaryDimension for the dimension of product values.
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
       
    println("Getting the Data Type of an MdmSource\n");
       
    String myDataType = getDataType(getExpressDataProvider(), mdmProdDim);
       
    println("The data type of " + mdmProdDim.getName() + " is "
             + myDataType + ".");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.