Package oracle.olapi.data.source

Examples of oracle.olapi.data.source.StringSource


    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("MYTIME");
       
//    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("MEDIA");
    MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();
    StringSource timeHier =  (StringSource) mdmTimeHier.getSource();
       
    Source levelElement = timeHier.selectValue("TIMEHIER::MONTH::MONTH_2011-M01");
       
    // Get the Source for the short label attribute of the dimension.
    Source prodShortLabel = mdmTimeDim.getShortValueDescriptionAttribute()
                                      .getSource();
       
    // Get the parent relation from the hierarchy.
    MdmAttribute mdmTimeHierParentAttr = mdmTimeHier.getParentAttribute();
   
    Source prodHierParentAttr = mdmTimeHierParentAttr.getSource();
       
    // Reverse the parent relation to get a children relation.
    Source timeHierChildren = timeHier.join(prodHierParentAttr,
        timeHier.value());
       
    // Select the children of the specified level element.
    Source levelElementChildren = timeHierChildren.join(timeHier, levelElement);
       
    //Join the children to the short description attribute.
View Full Code Here


    /**
     * 选择维度这儿是正确的
     */
   
    // Get the Source objects for the hierarchies.
    StringSource departmentRollup = (StringSource) mdmDepartmentRollup.getSource();
    StringSource calendar = (StringSource) mdmCalendar.getSource();
       
    // Create a Source that represents a selection of Product dimension members.
    Source prodSel = departmentRollup.selectValues(new String[]
                                            {"DEPARTMENT::0",
                                             "DEPARTMENT::1"});
View Full Code Here

    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("MEDIA");
       
//    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("MEDIA");
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                     mdmProdDim.getDefaultHierarchy();
    StringSource prodHier =  (StringSource) mdmProdHier.getSource();
       
    // Get one of the levels of the hierachy.
    MdmLevel mdmLevel = getContext().getLevelByName(mdmProdHier, "MEDIA");
       
    Source levelSrc = mdmLevel.getSource();
       
    int pos = 1;
    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();
   
    MdmAttribute mdmProdHierAncestAttr = mdmProdHier.getAncestorsAttribute();
   
   
    Source prodHierParentAttr = mdmProdHierParentAttr.getSource();
       
    // Get the ancestor relation from the hierarchy.
    MdmAttribute mdmProdHierAncsAttr = mdmProdHier.getAncestorsAttribute();
    Source prodHierAncsAttr = mdmProdHierAncsAttr.getSource();
       
    // Get ancestors of the level element.
    Source levelElementAncs = prodHierAncsAttr.join(prodHier, levelElement);
       
    // Get the parent of the level element.
    Source levelElementParent = prodHierParentAttr.join(prodHier, levelElement);
       
    // Reverse the parent relation to get a children relation.
    Source prodHierChildren = prodHier.join(prodHierParentAttr,
                                            prodHier.value());
       
    // Select the children of the specified level element.
    Source levelElementChildren = prodHierChildren.join(prodHier, levelElement);
       
    //Join the level to the short description attribute.
View Full Code Here

    MdmPrimaryDimension mdmDeptDim = getMdmPrimaryDimension("DEPARTMENT");
       
    MdmValueHierarchy mdmDeptHier = (MdmValueHierarchy)
                                     mdmDeptDim.getDefaultHierarchy();
   
    StringSource valueSource = (StringSource)mdmDeptHier.getSource();
   
    Source depShortLabel = mdmDeptDim.getShortValueDescriptionAttribute().getSource();
   
    Source levelSrcWithShortDescr = depShortLabel.join(valueSource);
   
View Full Code Here

 
  public void getAllDecendents(MdmPrimaryDimension dim,MdmHierarchy hierarchy,String node) throws Exception {
//      MdmHierarchy mdmMarketSegment =
//          getContext().getHierarchyByName(dim, "DEPT");   

      StringSource mktSegment = (StringSource)hierarchy.getSource();

      // Get the ancestors attribute of the hierarchy and the Source for it.
      MdmAttribute mdmMarketSegmentAncestorsAttr =
        hierarchy.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(node);

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

                                     mdmProdDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();

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

    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 timeSel = timeHier.selectValues(new String[] {
                                           "CALENDAR_YEAR_AW::MONTH_AW::55",
                                           "CALENDAR_YEAR_AW::MONTH_AW::58",
                                           "CALENDAR_YEAR_AW::MONTH_AW::61",
                                           "CALENDAR_YEAR_AW::MONTH_AW::64"});
View Full Code Here

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

    Source custSel = custHier.selectValues(new String[] {
                                            "SHIPMENTS_AW::SHIP_TO_AW::58",
                                            "SHIPMENTS_AW::SHIP_TO_AW::61",
                                            "SHIPMENTS_AW::SHIP_TO_AW::65"});

    Source prodSel = prodHier.selectValues(new String[] {
View Full Code Here

                                     mdmCustDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmChanHier = (MdmLevelHierarchy)
                                     mdmChanDim.getDefaultHierarchy();
   
    // Get the Source objects for the hierarhies.
    StringSource prodHier = (StringSource) mdmProdDim.getSource();
    StringSource timeHier = (StringSource) mdmTimeHier.getSource();
    StringSource custHier = (StringSource) mdmCustDim.getSource();
    StringSource chanHier = (StringSource) mdmChanHier.getSource();
   
    // Get the MdmAttribute for the short description attribute of the
    // Product dimension, and get the Source for the attribute.
    MdmAttribute mdmProdShortDescr =
                         mdmProdDim.getShortValueDescriptionAttribute();
View Full Code Here

  {
    println("\nDataProvider.createListSource(Object[][] tuples) Example");
   
    Source units = (Source) sources.get(0);
    Source prodHier = (Source) sources.get(1);
    StringSource calendarHier = (StringSource) sources.get(2);
    StringSource shipmentsHier = (StringSource) sources.get(3);
    Source chanHier = (Source) sources.get(4);
   
    Source custSel = shipmentsHier.selectValue(
                                       "SHIPMENTS_AW::SHIP_TO_AW::104");
    
    Source edge = prodHier.join(calendarHier).join(chanHier);
    
    Source edgeSel = edge.selectValues(dp.createListSource(
View Full Code Here

    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    Source productDim = mdmProdDim.getSource();
   
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                     mdmProdDim.getDefaultHierarchy();
    StringSource prodHier = (StringSource) mdmProdDim.getSource();
   
    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
    MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();
    StringSource timeHier = (StringSource) mdmTimeHier.getSource();
   
    // Select one member of each dimension.   
    Source timeSel = timeHier.selectValue("CALENDAR_YEAR_AW::YEAR_AW::4");   
    Source prodSel = prodHier.selectValue("PRODUCT_PRIMARY_AW::FAMILY_AW::7");
   
    // Join the dimension selections to the measure and display the result.
    Source result = unitPrice.join(prodSel)
                             .join(timeSel);
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.