Package oracle.olapi.data.source

Examples of oracle.olapi.data.source.StringSource


    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();
    StringSource shipHier = (StringSource) mdmCustDefLvlHier.getSource();

    // Get the DataProvider.
    ExpressDataProvider dp = getExpressDataProvider();

    // Create NumberParameter objects for the starting and ending values
View Full Code Here


    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

    MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");

    // Get the Source objects for the measure and for the default hierarchies
    // of the dimensions.
    NumberSource units = (NumberSource) mdmUnits.getSource();
    StringSource prodHier = (StringSource)
        getMdmPrimaryDimension("PRODUCT_AW").getDefaultHierarchy().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();

    // Select single values for the hierarchies.
    Source prodSel = prodHier.selectValue("PRODUCT_PRIMARY_AW::ITEM_AW::15");
    Source custSel = custHier.selectValue("SHIPMENTS_AW::SHIP_TO_AW::52");
    Source timeSel = timeHier.selectValue("CALENDAR_YEAR_AW::MONTH_AW::55");

    // Produce a Source that specifies the units values for the selected
    // dimension values.
    Source unitsSel = units.join(timeSel).join(custSel).join(prodSel);
View Full Code Here

    MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");

    // Get the MARKET_SEGMENT_AW  hierarchy of the dimension and the Source for it.
    MdmHierarchy mdmMarketSegment =
          getContext().getHierarchyByName(mdmCustDim, "MARKET_SEGMENT_AW");
    StringSource mktSegment = (StringSource)mdmMarketSegment.getSource();

    // Get the ancestors attribute of the hierarchy and the Source for it.
    MdmAttribute mdmMarketSegmentAncestorsAttr =
                                    mdmMarketSegment.getAncestorsAttribute();
    Source mktSegmentAncestors = mdmMarketSegmentAncestorsAttr.getSource();

    // Reverse the ancestors relation to get the descendants relation.
    Source mktSegmentDescendants =
              mktSegment.join(mktSegmentAncestors, mktSegment.value());

    // Select an element of the hierarchy.
    Source selVal = mktSegment.selectValue("MARKET_SEGMENT_AW::ACCOUNT_AW::23");

    // Select the descendants of the specified element.
    Source selValDescendants = mktSegmentDescendants.join(mktSegment,
                                                          selVal,
                                                          false);
View Full Code Here

    // Get the MARKET_SEGMENT_AW  hierarchy of the dimension and the Source
    // for it.
    MdmHierarchy mdmMarketSegment =
             getContext().getHierarchyByName(mdmCustDim, "MARKET_SEGMENT_AW");
    StringSource mktSegment = (StringSource)mdmMarketSegment.getSource();

    // Get the ancestors attribute of the hierarchy and the Source for it.
    MdmAttribute mdmMarketSegmentAncestorsAttr =
                                     mdmMarketSegment.getAncestorsAttribute();
    Source mktSegmentAncestors = mdmMarketSegmentAncestorsAttr.getSource();

    // Reverse the ancestors relation to get the descendants relation.
    Source mktSegmentDescendants =
              mktSegment.join(mktSegmentAncestors, mktSegment.value());

    // Select an element of the hierarchy.
    Source selVal = mktSegment.selectValue("MARKET_SEGMENT_AW::ACCOUNT_AW::23");

    // Create a descendants relation that removes the input value.
    Source mktSegmentDescendantsOnly =
        mktSegmentDescendants.join(mktSegmentDescendants.getDataType().value(),
                                   mktSegment.value(),
                                   Source.COMPARISON_RULE_REMOVE);

    // Select the descendants of the specified element.
    Source selValDescendants = mktSegmentDescendants.join(mktSegment, selVal);
View Full Code Here

    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                     mdmProdDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmTimeHIer = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();
    Source prodHier = mdmProdHier.getSource();
    StringSource timeHier = (StringSource) mdmTimeHIer.getSource();

    // Get the FAMILY level of the hierarchy and the Source for it.
      MdmLevel mdmFamilyLevel =
                     getContext().getLevelByName(mdmProdHier, "FAMILY_AW");
      Source prodSel = mdmFamilyLevel.getSource();

    // Join the family elements to the product short description attribute.
    Source prodSelWithShortDescr = prodShortDescr.join(prodSel);

    // Select the May, 2001.
    Source timeSel = timeHier.selectValue("CALENDAR_YEAR_AW::MONTH_AW::59");

    // Join the time selection to the time short description attribute.
    Source timeSelWithShortDescr = timeShortDescr.join(timeSel);

View Full Code Here

    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();

    // Create a Source array containing the TIME levels.
    Source[] levelSources = new Source[3];
    List levels = mdmTimeHier.getLevels();
    for (int i = 0; i < levelSources.length; i++)
    {
      levelSources[i] = ((MdmLevel) levels.get(i)).getSource();
    }
    // Create a list Source that has the levels as element values.
    Source levelList = dp.createListSource(levelSources);

    // Create a Source that selects the elements of a level and has
    // levelList as an input.
    Source levelMembers = timeHier.join(levelRel, levelList.value());

    // Create a range Source that specifies all elements after the first and
    // before the last.
    Source range = dp.createRangeSource(2, levelMembers.count().minus(1));
View Full Code Here

    // of the dimensions.
    NumberSource units = (NumberSource) mdmUnits.getSource();
    NumberSource sales = (NumberSource) mdmSales.getSource();
    NumberSource unitPrice = (NumberSource) mdmUnitPrice.getSource();

    StringSource prodHier = (StringSource)
        getMdmPrimaryDimension("PRODUCT_AW").getDefaultHierarchy().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();

    // Select values for the hierarchies.
    Source prodSel = prodHier.selectValues(new String[]
                                           {"PRODUCT_PRIMARY_AW::ITEM_AW::13",
                                            "PRODUCT_PRIMARY_AW::ITEM_AW::14",
                                            "PRODUCT_PRIMARY_AW::ITEM_AW::15"});
   Source chanSel = chanHier.selectValue("CHANNEL_PRIMARY_AW::CHANNEL_AW::2");
   //Source timeSel = timeHier.selectValue("CALENDAR_YEAR_AW::YEAR_AW::3");
   Source timeSel = timeHier.selectValue("CALENDAR_YEAR_AW::MONTH_AW::59");
   Source custSel = custHier.selectValue("SHIPMENTS_AW::TOTAL_CUSTOMER_AW::1");

   Source measDim = dp.createListSource(new Source[] {unitPrice, units, sales});

   Source result = measDim.extract().join(measDim)
View Full Code Here

    // 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.
    StringSource custSel = (StringSource) shipments.selectValues(new String[]
                                             {"SHIPMENTS_AW::SHIP_TO_AW::60",
                                              "SHIPMENTS_AW::SHIP_TO_AW::61",
                                              "SHIPMENTS_AW::SHIP_TO_AW::62",
                                              "SHIPMENTS_AW::SHIP_TO_AW::63"});
    // Select a subset of the selection.
    Source custSel2 = custSel.selectValues(new String[]
                                             {"SHIPMENTS_AW::SHIP_TO_AW::60",
                                              "SHIPMENTS_AW::SHIP_TO_AW::62"});

    // Join the selection to itself, using the subset as the comparison.
    Source result1 = custSel.join(custSel, custSel2, true);

    // Join the selection to the result of the value method, using the subset
    // as the comparison.
    Source  result2 = custSel.join(custSel.value(), custSel2, true);

    // Prepare and commit the Transaction.
    prepareAndCommit();

    // Display the results.
View Full Code Here

    // them.
    MdmLevelHierarchy mdmCalendar = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmProdPrimary = (MdmLevelHierarchy)
                                     mdmProdStdDim.getDefaultHierarchy();
    StringSource calendar = (StringSource) mdmCalendar.getSource();
    StringSource prodHier = (StringSource) mdmProdPrimary.getSource();
       
    // Get the measures and the Source objects for them.
    MdmMeasure mdmUnitCost = getMdmMeasure("UNIT_COST_AW");
    MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
       
    NumberSource unitCost = (NumberSource) mdmUnitCost.getSource();
    NumberSource unitPrice = (NumberSource) mdmUnitPrice.getSource();
   
    DataProvider dp = getContext().getDataProvider();
       
    // Get the placeholder Source for the Number data type.
    Source ph = dp.getFundamentalMetadataProvider().getNumberPlaceholder()
                                                   .getSource();
       
    // Create a Source that specifies the value to assign as the
    // value of a measure for the custom dimension member.
    Source calc = ((NumberSource)
                   (ph.join(prodHier, "PRODUCT_PRIMARY_AW::ITEM_AW::14")))
                  .plus(
                  (NumberSource)
                  (ph.join(prodHier, "PRODUCT_PRIMARY_AW::ITEM_AW::15")));
       
    // Get the level to which the dimension members belong.
    MdmLevel mdmItemLevel = getContext().getLevelByName(mdmProdPrimary,
                                                        "ITEM_AW");
       
    // Create the custom dimension member.
    MdmStandardMember mdmItem60 = mdmProdStdDim.createCustomMember(
                                                "60"// member local value
                                                 mdmItemLevel, // member level
                                                 "4",   // parent local value
                                                 calc, // calculation Source
                                                 10);   // precedence value
       
    // Select a set of Product member values.
    StringSource prodSel = prodHier.selectValues(
                               new String[]{"PRODUCT_PRIMARY_AW::ITEM_AW::14",
                                            "PRODUCT_PRIMARY_AW::ITEM_AW::15",
                                            "PRODUCT_PRIMARY_AW::ITEM_AW::60"});
                       
    // Produce a query that specifies the unit price and the unit cost for the
View Full Code Here

TOP

Related Classes of oracle.olapi.data.source.StringSource

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.