Package org.pentaho.reporting.libraries.base.util

Examples of org.pentaho.reporting.libraries.base.util.FastStack


  /**
   */
  public MajorAxisParagraphBreakState()
  {
    this.contexts = new FastStack(50);
  }
View Full Code Here


  private FastStack groupStarts;

  protected DefaultGroupingState()
  {
    this.currentGroup = -1;
    this.groupStarts = new FastStack();
  }
View Full Code Here

      {
        final CrosstabGroup crosstabGroup = (CrosstabGroup) group;
        // yeay! we encountered a crosstab.
        if (processingStack == null)
        {
          processingStack = new FastStack();
        }
        final String[] columnSet = computeColumns(crosstabGroup);
        final ReportStateKey processKey = state.getProcessKey();
        final DataSchema dataSchema = getRuntime().getDataSchema();
        final DataAttributes tableAttributes = dataSchema.getTableAttributes();
View Full Code Here

    final char[] chars = value.toCharArray();
    StringBuffer result = new StringBuffer(chars.length);

    boolean haveEscape = false;
    int state = PropertyLookupParser.EXPECT_DOLLAR;
    final FastStack stack = new FastStack();

    for (int i = 0; i < chars.length; i++)
    {
      final char c = chars[i];

      if (haveEscape)
      {
        haveEscape = false;
        if (state == PropertyLookupParser.EXPECT_CLOSE_BRACE ||
            escapeMode == ESCAPE_MODE_ALL)
        {
          result.append(c);
        }
        else
        {
          if (c == openingBraceChar || c == closingBraceChar || c == escapeChar || c == markerChar)
          {
            result.append(c);
          }
          else
          {
            result.append(escapeChar);
            result.append(c);
          }
        }
        continue;
      }

      if ((state == PropertyLookupParser.EXPECT_DOLLAR || state == PropertyLookupParser.EXPECT_CLOSE_BRACE)
          && c == markerChar)
      {
        state = PropertyLookupParser.EXPECT_OPEN_BRACE;
        continue;
      }

      if (state == PropertyLookupParser.EXPECT_CLOSE_BRACE && c == closingBraceChar)
      {
        final String columnName = result.toString();
        result = (StringBuffer) stack.pop();
        handleVariableLookup(result, parameters, columnName);

        if (stack.isEmpty())
        {
          state = PropertyLookupParser.EXPECT_DOLLAR;
        }
        else
        {
          state = PropertyLookupParser.EXPECT_CLOSE_BRACE;
        }
        continue;
      }

      if (state == PropertyLookupParser.EXPECT_OPEN_BRACE)
      {
        if (c == openingBraceChar)
        {
          state = PropertyLookupParser.EXPECT_CLOSE_BRACE;
          stack.push(result);
          result = new StringBuffer(100);
          continue;
        }

        result.append(markerChar);
        if (stack.isEmpty())
        {
          state = PropertyLookupParser.EXPECT_DOLLAR;
        }
        else
        {
          state = PropertyLookupParser.EXPECT_CLOSE_BRACE;
        }

        // continue with adding the current char ..
      }

      if (c == escapeChar && escapeMode != ESCAPE_MODE_NONE)
      {
        haveEscape = true;
        continue;
      }

      result.append(c);
    }

    if (state != PropertyLookupParser.EXPECT_DOLLAR)
    {
      while (stack.isEmpty() == false)
      {
        final String columnName = result.toString();
        result = (StringBuffer) stack.pop();
        result.append(markerChar);
        if (state != PropertyLookupParser.EXPECT_OPEN_BRACE)
        {
          result.append(openingBraceChar);
          result.append(columnName);
View Full Code Here

    this.applyAutoCommitStep = new ApplyAutoCommitStep();
    this.applyCommitStep = new ApplyCommitStep();
    this.rollbackStep = new RollbackStep();
    this.sectionBoxes = new SectionRenderBox[5];

    this.groupStack = new FastStack(50);

    bandWithKeepTogetherStyle = new SimpleStyleSheet(new SectionKeepTogetherStyleSheet(true));
    bandWithoutKeepTogetherStyle = new SimpleStyleSheet(new SectionKeepTogetherStyleSheet(false));

    final boolean paddingsDisabled = metaData.isFeatureSupported(OutputProcessorFeature.DISABLE_PADDING);
View Full Code Here

    {
      parameterContext.close();
    }

    this.processLevels = new HashSet();
    this.groupStarts = new FastStack();
    this.errorHandler = IgnoreEverythingReportErrorHandler.INSTANCE;
    this.advanceHandler = BeginReportHandler.HANDLER;
    this.parentState = null;
    this.currentPage = ReportState.BEFORE_FIRST_PAGE;
    this.currentSubReport = -1;
View Full Code Here

    if (parentState == null)
    {
      throw new NullPointerException();
    }

    this.groupStarts = new FastStack();
    this.parentState = parentState;
    this.parentSubReportState = parentState;
    this.advanceHandler = BeginReportHandler.HANDLER;
    this.errorHandler = parentState.errorHandler;
    this.functionStorage = parentState.functionStorage;
View Full Code Here

    columnToAxisPosition = new int[columnCount];

    int columnIndex = 0;
    int dimColIndex = 0;

    final FastStack memberStack = new FastStack();
    for (int axesIndex = axes.size() - 1; axesIndex >= 0; axesIndex -= 1)
    {
      final CellSetAxis axis = axes.get(axesIndex);
      final List<Position> positions = axis.getPositions();
      final LinkedHashSet<String> columnNamesSet = new LinkedHashSet<String>();
      for (int positionsIndex = 0; positionsIndex < positions.size(); positionsIndex++)
      {
        final Position position = positions.get(positionsIndex);
        final List<Member> members = position.getMembers();
        for (int positionIndex = 0; positionIndex < members.size(); positionIndex++)
        {
          memberStack.clear();
          Member m = members.get(positionIndex);
          while (m != null)
          {
            memberStack.push(m);
            m = m.getParentMember();
          }

          while (memberStack.isEmpty() == false)
          {
            m = (Member) memberStack.pop();
            final String name = m.getLevel().getUniqueName();
            if (columnNamesSet.contains(name) == false)
            {
              columnNamesSet.add(name);
            }
View Full Code Here

    columnToAxisPosition = new int[columnCount];

    int columnIndex = 0;
    int dimColIndex = 0;

    final FastStack memberStack = new FastStack();
    for (int axesIndex = axes.length - 1; axesIndex >= 0; axesIndex -= 1)
    {
      final Axis axis = axes[axesIndex];
      final List<Position> positions = axis.getPositions();
      final LinkedHashSet<String> columnNamesSet = new LinkedHashSet<String>();
      for (int positionsIndex = 0; positionsIndex < positions.size(); positionsIndex++)
      {
        final Position position = positions.get(positionsIndex);
        for (int positionIndex = 0; positionIndex < position.size(); positionIndex++)
        {
          memberStack.clear();
          Member m = position.get(positionIndex);
          while (m != null)
          {
            memberStack.push(m);
            m = m.getParentMember();
          }

          while (memberStack.isEmpty() == false)
          {
            m = (Member) memberStack.pop();
            final String name = m.getLevel().getUniqueName();
            if (columnNamesSet.contains(name) == false)
            {
              columnNamesSet.add(name);
            }
View Full Code Here

    columnToAxisPosition = new int[columnCount];

    int columnIndex = 0;
    int dimColIndex = 0;

    final FastStack memberStack = new FastStack();

    for (int axesIndex = axes.length - 1; axesIndex >= 1; axesIndex -= 1)
    {
      final Axis axis = axes[axesIndex];
      final List<Position> positions = axis.getPositions();
      final LinkedHashSet<String> columnNamesSet = new LinkedHashSet<String>();
      for (int positionsIndex = 0; positionsIndex < positions.size(); positionsIndex++)
      {
        final Position position = positions.get(positionsIndex);
        for (int positionIndex = 0; positionIndex < position.size(); positionIndex++)
        {
          memberStack.clear();
          Member m = position.get(positionIndex);
          while (m != null)
          {
            memberStack.push(m);
            m = m.getParentMember();
          }

          while (memberStack.isEmpty() == false)
          {
            m = (Member) memberStack.pop();
            final String name = m.getLevel().getUniqueName();
            if (columnNamesSet.contains(name) == false)
            {
              columnNamesSet.add(name);
            }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.util.FastStack

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.