Examples of MdmPrimaryDimension


Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

   
  protected void run() throws Exception
  {
    println("Drilling in a Hierarchy");
       
    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();
   
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

       
//    NumberSource unitPrice = (NumberSource) mdmAmount.getSource();
//    NumberSource unitCost = (NumberSource) mdmCOAL_EQUIVALENT.getSource();
       
    // Get the MdmPrimaryDimension objects and the default hierarchies for them.
    MdmPrimaryDimension mdmDepartmentDim = getMdmPrimaryDimension("DEPARTMENT");
    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("MYTIME");
    MdmPrimaryDimension mdmMediaDim = getMdmPrimaryDimension("MEDIA");
   
    MdmValueHierarchy mdmDepartmentRollup = (MdmValueHierarchy)
                                       mdmDepartmentDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmCalendar = (MdmLevelHierarchy)
                                      mdmTimeDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmMedia = (MdmLevelHierarchy)mdmMediaDim.getDefaultHierarchy();
   
    System.out.println(mdmAmount.getID()+":"+mdmAmount.getName());
    System.out.println(mdmCOAL_EQUIVALENT.getID()+":"+mdmCOAL_EQUIVALENT.getName());
   
    System.out.println(mdmDepartmentRollup.getID()+":"+mdmDepartmentRollup.getName());
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

   
  protected void run() throws Exception
  {
    println("Drilling in a Hierarchy");
       
    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();
   
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

  }
   
  protected void run() throws Exception
  {
  System.out.println("Departments:");
    MdmPrimaryDimension mdmDeptDim = getMdmPrimaryDimension("DEPARTMENT");
       
    MdmValueHierarchy mdmDeptHier = (MdmValueHierarchy)
                                     mdmDeptDim.getDefaultHierarchy();
   
    StringSource valueSource = (StringSource)mdmDeptHier.getSource();
   
    Source depShortLabel = mdmDeptDim.getShortValueDescriptionAttribute().getSource();
   
    Source levelSrcWithShortDescr = depShortLabel.join(valueSource);
   
    prepareAndCommit();
 
    // Create Cursor objects and display their values.
   
    getContext().displayResult(levelSrcWithShortDescr);
  
    /**
     * 选择某个部门,以及他的直接下属部门
     */

   
   
   
    System.out.println("Media:");
    MdmPrimaryDimension mdmMediaDim = getMdmPrimaryDimension("MEDIA");
   
    MdmLevelHierarchy mdmMediaHier = (MdmLevelHierarchy)
                                     mdmMediaDim.getDefaultHierarchy();
   
    Source levelSource = mdmMediaHier.getSource();
   
    depShortLabel = mdmMediaDim.getShortValueDescriptionAttribute().getSource();
   
    Source mediaShortLabel = depShortLabel.join(levelSource);
   
    prepareAndCommit();
 
    // Create Cursor objects and display their values.
   
    getContext().displayResult(mediaShortLabel);
   
   
   
    System.out.println("Time:");   
    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("MYTIME");
   
    MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();
   
    levelSource = mdmTimeHier.getSource();
   
//    depShortLabel = mdmTimeDim.getShortValueDescriptionAttribute().getSource();
//   
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

  {
    // If the hash map has not been created yet, then create it.
        if (m_hashMap == null)
            m_hashMap = loadHashMap();
       
        MdmPrimaryDimension result = null;
       
    // If the hash map load succeeded, then get the dimension.
    if (m_hashMap != null)
    {
      // Loop over the names.
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

    // Creating a Cursor example.

    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

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

    // Get the metadata objects.
    MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");
    NumberSource units = (NumberSource) mdmUnits.getSource();

    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

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 measures.
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
    MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
    MdmPrimaryDimension mdmChanDim = getMdmPrimaryDimension("CHANNEL_AW");
   
    // Get the default MdmLevelHierarchy for each dimension.
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                     mdmProdDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
                                     mdmTimeDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmCustHier = (MdmLevelHierarchy)
                                     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();
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

    // Get the metadata and source objects for a measure and the dimensions
    // of the measure. 
    MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
    Source unitPrice = mdmUnitPrice.getSource();
 
    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");
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmPrimaryDimension

    }

    // Get the dimension list.
    m_dimensionList = schema.getDimensions();
    Iterator objIter = m_dimensionList.iterator();
    MdmPrimaryDimension mdmPDim = null;

    // Get the dimensions and put them in the hash map.
    while (objIter.hasNext()) {
      mdmPDim = (MdmPrimaryDimension) objIter.next();
      // Put the upper case name of the dimension into the hash map as the
      // key
      // with the object as the value.
      map.put(mdmPDim.getName().toUpperCase(), mdmPDim);
    }

    // Get the measure list.
    if (isGlobal) {
      m_measureList = schema.getMeasures();
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.