Examples of ValueCursor


Examples of oracle.olapi.data.cursor.ValueCursor

      print(")");
      _printParentInfo(cursor);
    }
    else if(cursor instanceof ValueCursor)
    {
      ValueCursor valueCursor = (ValueCursor) cursor;
      if (valueCursor.hasCurrentValue())
      {
        if (!displayLocVal)
            print(valueCursor.getCurrentValue());
        else
        {
          int index = 0;
          Object value = valueCursor.getCurrentValue();
          if (value instanceof String)
          {
            String uVal = valueCursor.getCurrentString();
            if (uVal.indexOf("::") > 0)
            {
              index = uVal.lastIndexOf("::");
              String lVal = uVal.substring((uVal.lastIndexOf("::") + 2),
                                            uVal.length());
View Full Code Here

Examples of oracle.olapi.data.cursor.ValueCursor

    {
      pageCursors.add(outputs.get(i));
    }
   
    // Get the base ValueCursor of the CompoundCursor.
    ValueCursor dataCursor = rootCursor.getValueCursor();
   
    // Print the pages of the crosstab.
    printPages(pageCursors, 0, rowCursor, colCursor, dataCursor);
  }
View Full Code Here

Examples of oracle.olapi.data.cursor.ValueCursor

      Cursor cursor = (Cursor) pageIter.next();
      if (cursor instanceof CompoundCursor)
      {
        CompoundCursor cc = (CompoundCursor) cursor;
        List outputs = cc.getOutputs();
        ValueCursor output = (ValueCursor) outputs.get(0);
        String value = output.getCurrentString();
        println(value);
      }
      else
      {
        ValueCursor vc = (ValueCursor) cursor;
        String value = vc.getCurrentString();
        println(getLocalValue(value));
      }
    }
    println();
  }
View Full Code Here

Examples of oracle.olapi.data.cursor.ValueCursor

      print("\t");
      if (colCursor instanceof CompoundCursor)
      {
        CompoundCursor cc = (CompoundCursor) colCursor;
        List outputs = cc.getOutputs();
        ValueCursor output = (ValueCursor) outputs.get(0);
        String value = output.getCurrentString();
        print(value);
      }
      else
      {
        ValueCursor vc = (ValueCursor) colCursor;
        String value = vc.getCurrentString();
        print(getLocalValue(value));
      }
    }
    while (colCursor.next());
    println();
View Full Code Here

Examples of oracle.olapi.data.cursor.ValueCursor

      // Print row dimension value
      if (rowCursor instanceof CompoundCursor)
      {
        CompoundCursor cc = (CompoundCursor) rowCursor;
        List outputs = cc.getOutputs();
        ValueCursor output = (ValueCursor) outputs.get(0);
        String value = output.getCurrentString();
        print(value);
      }
      else
      {
        ValueCursor vc = (ValueCursor) rowCursor;
        String value = vc.getCurrentString();
        print(getLocalValue(value));
      }
      print("\t");
      // Loop over columns
      do
View Full Code Here

Examples of oracle.olapi.data.cursor.ValueCursor

                 dp.createCursorManagerSpecification(prodSource);
    SpecifiedCursorManager cursorMngr =
                 dp.createCursorManager(cursorMngrSpec);
    // Because the Source has no outputs, the Cursor for it
    // is a ValueCursor.
    ValueCursor prodValues = (ValueCursor) cursorMngr.createCursor();
    // Set the position to the fifth element of the ValueCursor.
    prodValues.setPosition(5);

    // Product values are strings. Get the String value at the
    // current position.
    String value = prodValues.getCurrentString();

    // Do something with the value, such as display it.
    println(value);
    // Close the SpecifiedCursorManager.
View Full Code Here

Examples of oracle.olapi.data.cursor.ValueCursor

                   dp.createCursorManager(cursorMngrSpec);
    CompoundCursor unitsForSelCursor =
                   (CompoundCursor) cursorMngr.createCursor();

    // Get the base ValueCursor.
    ValueCursor specifiedUnitsVals = unitsForSelCursor.getValueCursor();

    // Get the outputs.
    List outputs = unitsForSelCursor.getOutputs();
    ValueCursor chanSelVals = (ValueCursor) outputs.get(0);
    ValueCursor timeSelVals = (ValueCursor) outputs.get(1);
    ValueCursor custSelVals = (ValueCursor) outputs.get(2);

    // You can now get the values from the ValueCursor objects.
    // When you have finished using the Cursor objects, close the
    // SpecifiedCursorManager.
    int i = 1;
    do
    {
      println(i + ": " +
              chanSelVals.getCurrentString() + ", " +
              timeSelVals.getCurrentString() + ", " +
              custSelVals.getCurrentString() + ", " +
              specifiedUnitsVals.getCurrentValue());
      i++;
    }
    while(unitsForSelCursor.next());
View Full Code Here

Examples of oracle.olapi.data.cursor.ValueCursor

    CompoundCursor rootCursor = (CompoundCursor) cursorMngr.createCursor();

    // Get the outputs and the ValueCursor.
    List outputs = rootCursor.getOutputs();
    // The first output has the values of timeSel, the slower varying output.
    ValueCursor rowCursor = (ValueCursor) outputs.get(0);
    // The second output has the faster varying values of prodSel.
    ValueCursor columnCursor = (ValueCursor) outputs.get(1);
    // The base ValueCursor has the values from unitPrice.
    ValueCursor unitPriceValues = rootCursor.getValueCursor();

    // Display the values as a crosstab.
    println("\t        PRODUCT_AW");
    println("\t-----------------------");
    print("Month");
    do
    {
      String value = ((ValueCursor) columnCursor).getCurrentString();
      print("\t" + getContext().getLocalValue(value) + "  ");
    }
    while (columnCursor.next());
    println("\n-----\t-------\t-------\t-------");

    // Reset the column Cursor to its first element.
    columnCursor.setPosition(1);

    do
    {
      // Print the row dimension values.
      String value = ((ValueCursor) rowCursor).getCurrentString();
      print(getContext().getLocalValue(value) + "\t");
      // Loop over columns.
      do
      {
        // Print the data value.
        print(unitPriceValues.getCurrentValue() + "\t");
      }
      while (columnCursor.next());

      println();
View Full Code Here

Examples of oracle.olapi.data.cursor.ValueCursor

    // Create the CursorManager and the Cursor.
    SpecifiedCursorManager cursorMngr = dp.createCursorManager(cursorMngrSpec);
    CompoundCursor rootCursor = (CompoundCursor) cursorMngr.createCursor();

    // Get the child Cursor objects.
    ValueCursor baseValCursor = rootCursor.getValueCursor();
    List outputs = rootCursor.getOutputs();
    ValueCursor chanSelVals = (ValueCursor) outputs.get(0);
    ValueCursor timeSelVals = (ValueCursor) outputs.get(1);
    ValueCursor custSelVals = (ValueCursor) outputs.get(2);
    ValueCursor prodSelVals = (ValueCursor) outputs.get(3);
   
    // Set the position of the root CompoundCursor.
    rootCursor.setPosition(15);

    // Get the values at the current position and determine the span
    // of the values of the time and product outputs.
    print(chanSelVals.getCurrentValue() + ", ");
    print(timeSelVals.getCurrentValue() + ", ");
    print(custSelVals.getCurrentValue() + ", ");
    print(prodSelVals.getCurrentValue() + ", ");
    print(baseValCursor.getCurrentValue());
    println();

    // Determine the span of the values of the two fastest varying outputs.
    long span;
    span = ((prodSelVals.getParentEnd() - prodSelVals.getParentStart()) +1);
    println("The span of " + prodSelVals.getCurrentValue() +
            " at the current position is " + span + ".");
    span = ((timeSelVals.getParentEnd() - timeSelVals.getParentStart()) +1);
    println("The span of " + timeSelVals.getCurrentValue() +
            " at the current position is " + span + ".");
View Full Code Here

Examples of oracle.olapi.data.cursor.ValueCursor

  public void displayTopBottomResult(Source source) {
    CursorManagerSpecification cursorMngrSpec = dp
        .createCursorManagerSpecification(source);
    SpecifiedCursorManager cursorManager = dp
        .createCursorManager(cursorMngrSpec);
    ValueCursor valueCursor = (ValueCursor) cursorManager.createCursor();

    cpw.printTopBottomResult(valueCursor);

    // Close the CursorManager.
    cursorManager.close();
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.