Examples of FastStack


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

    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

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

    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

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

    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

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

    columnToAxisPosition = new int[columnCount];

    int columnIndex = 0;
    int dimColIndex = 0;

    final FastStack memberStack = new FastStack();
    for (int axesIndex = axes.size() - 1; axesIndex >= 1; 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

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

  }

  private FormulaFunctionElement getFunction(final int offset)
  {
    FormulaFunctionElement function = null;
    final FastStack functionsStack = new FastStack();
    final int count = rootElement.getElementCount();
    boolean haveCloseParentheses = false;
    for (int i = 0; i < count; i++)
    {

      final FormulaElement node = (FormulaElement) rootElement.getElement(i);
      if ((node != null) && (node.getStartOffset() > offset))
      {
        if (function == null)
        {
          return null;
        }
        return function;
      }

      if (haveCloseParentheses)
      {
        if (functionsStack.isEmpty() == false)
        {
          functionsStack.pop();
        }
        if (functionsStack.isEmpty())
        {
          function = null;
        }
        else
        {
          function = (FormulaFunctionElement) functionsStack.peek();
        }
        haveCloseParentheses = false;
      }

      if (node instanceof FormulaFunctionElement)
      {
        function = (FormulaFunctionElement) node;
      }
      if (node instanceof FormulaOpenParenthesisElement)
      {
        functionsStack.push(function);
      }
      if (node instanceof FormulaClosingParenthesisElement)
      {
        haveCloseParentheses = true;
      }
    }

    if (functionsStack.isEmpty() == false)
    {
      final FormulaElement lastElement = (count >= 1) ? (FormulaElement)rootElement.getElement(count - 1) : null;
      if ((lastElement != null) && (lastElement.getEndOffset() >= offset))
      {
        return (FormulaFunctionElement)functionsStack.get(0);
      }
      else
      {
        return (FormulaFunctionElement)functionsStack.peek();
      }
    }
    return function;
  }
View Full Code Here

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

  private String defaultNamespace;

  public StyleSheetHandler()
  {
    this.namespaces = new HashMap();
    this.parentRules = new FastStack();
  }
View Full Code Here

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

    return element;
  }

  protected String[] computeFileNames(FileName file)
  {
    final FastStack stack = new FastStack();
    while (file != null)
    {
      final String name = file.getBaseName();
      stack.push(name);
      file = file.getParent();
    }

    final int size = stack.size();
    final String[] result = new String[size];
    for (int i = 0; i < result.length; i++)
    {
      result[i] = (String) stack.pop();
    }
    return result;
  }
View Full Code Here

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

        this.tableNameGenerator = new AttributeNameGenerator();
        this.frameNameGenerator = new AttributeNameGenerator();
        this.autoStyleNameGenerator = new AttributeNameGenerator();
        this.outputRepository = outputRepository;
        this.inputRepository = inputRepository;
        this.states = new FastStack();
        this.xmlWriters = new FastStack();
        this.imageNames = new AttributeNameGenerator();

        this.imageProducer = new ImageProducer(inputRepository, outputRepository, imageService);
        this.oleProducer = new OleProducer(inputRepository, outputRepository, imageService, datasourcefactory);
View Full Code Here

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

            final ImageService imageService,
            final DataSourceFactory datasourcefactory)
            throws ReportProcessingException
    {
        super(reportJob, resourceManager, baseResource, inputRepository, outputRepository, target, imageService, datasourcefactory);
        activePageContext = new FastStack();
        this.sectionNames = new AttributeNameGenerator();

        this.tableLayoutConfig = TABLE_LAYOUT_SINGLE_DETAIL_TABLE;
    }
View Full Code Here

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

      throw new NullPointerException("LineSeparator must not be null");
    }

    this.normalizeBuffer = new StringBuffer(128);
    this.safeTags = safeTags;
    this.openTags = new FastStack();
    this.indentString = indentString;
    this.lineEmpty = true;
    this.writeFinalLinebreak = true;
    this.lineSeparator = lineseparator;
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.