Package org.pentaho.reporting.engine.classic.core

Examples of org.pentaho.reporting.engine.classic.core.ReportElement


                              final AbstractReportDefinition reportDefinition) throws ReportProcessingException
  {
    final int count = section.getElementCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = section.getElement(i);
      if (element instanceof SubReport)
      {
        continue;
      }

      if (element instanceof Section)
      {
        processSection((Section) element, dataSchema, reportDefinition);
        continue;
      }

      final Object attribute =
          element.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.ELEMENT_TYPE);
      if (attribute instanceof LegacyChartType == false)
      {
        continue;
      }

      final Object maybeChartExpression =
          element.getAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE);
      if (maybeChartExpression instanceof ChartExpression == false)
      {
        continue;
      }

      final ChartExpression chartExpression = (ChartExpression) maybeChartExpression;
      final Object primaryChartExpression = element.getAttribute
          (LegacyChartElementModule.NAMESPACE, LegacyChartElementModule.PRIMARY_DATA_COLLECTOR_FUNCTION_ATTRIBUTE);
      if (primaryChartExpression instanceof Expression)
      {
        final Expression datasetExpression = (Expression) primaryChartExpression;
        final Expression datasetExpressionInstance = datasetExpression.getInstance();
        final String name = AutoGeneratorUtility.generateUniqueExpressionName
            (dataSchema, "::legacy-charts::primary-dataset::{0}", reportDefinition);
        datasetExpressionInstance.setName(name);
        chartExpression.setDataSource(name);
        reportDefinition.addExpression(datasetExpressionInstance);
      }

      if (chartExpression instanceof MultiPlotChartExpression == false)
      {
        continue;
      }
      final MultiPlotChartExpression multiPlotChartExpression = (MultiPlotChartExpression) chartExpression;

      final Object secondaryDataSourceExpression = element.getAttribute
          (LegacyChartElementModule.NAMESPACE, LegacyChartElementModule.SECONDARY_DATA_COLLECTOR_FUNCTION_ATTRIBUTE);
      if (secondaryDataSourceExpression instanceof Expression)
      {
        final Expression datasetExpression = (Expression) secondaryDataSourceExpression;
        final Expression datasetExpressionInstance = datasetExpression.getInstance();
View Full Code Here


    {
      final int count = gb.getElementCount();
      GroupBody locatedBody = null;
      for (int i = 0; i < count; i++)
      {
        final ReportElement element = gb.getElement(i);
        if (element instanceof Group)
        {
          existingGroup = (Group) element;
          locatedBody = existingGroup.getBody();
          break;
View Full Code Here

    {
      final int count = gb.getElementCount();
      boolean found = false;
      for (int i = 0; i < count; i++)
      {
        final ReportElement element = gb.getElement(i);
        if (element instanceof Group)
        {
          existingGroup = (Group) element;
          result += 1;
          gb = existingGroup.getBody();
View Full Code Here

    {
      final int count = gb.getElementCount();
      boolean found = false;
      for (int i = 0; i < count; i++)
      {
        final ReportElement element = gb.getElement(i);
        if (element instanceof Group)
        {
          existingGroup = (Group) element;
          result += 1;
          if (result == groupIndex)
View Full Code Here

    this.childMatcher = childMatcher;
  }

  public boolean matches(final MatcherContext context, final ReportElement node)
  {
    ReportElement n = node;
    while (n != null)
    {

      final Section parent = context.getParent(n);
      if (parent == null)
View Full Code Here

        final DescendantSelector ds = (DescendantSelector) selector;
        if (isMatch(node, ds.getSimpleSelector()) == false)
        {
          return false;
        }
        final ReportElement parent = node.getParentSection();
        return (isMatch(parent, ds.getAncestorSelector()));
      }
      case Selector.SAC_DESCENDANT_SELECTOR:
      {
        final DescendantSelector ds = (DescendantSelector) selector;
View Full Code Here

  }

  private boolean isDescendantMatch(final ReportElement node,
                                    final Selector selector)
  {
    ReportElement parent = node.getParentSection();
    while (parent != null)
    {
      if (isMatch(parent, selector))
      {
        return true;
      }
      parent = parent.getParentSection();
    }
    return false;
  }
View Full Code Here

  }

  private boolean isSilblingMatch(final ReportElement node,
                                  final SiblingSelector select)
  {
    ReportElement pred = getPreviousReportElement(node);
    while (pred != null)
    {
      if (isMatch(pred, select))
      {
        return true;
View Full Code Here

  private void processSection(final Section section) throws ReportProcessingException
  {
    final int count = section.getElementCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = section.getElement(i);
      if (element instanceof SubReport)
      {
        continue;
      }

      if (element instanceof Section)
      {
        processSection((Section) element);
        continue;
      }

      final Object attribute =
          element.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.AGGREGATION_TYPE);
      if (attribute instanceof Class == false)
      {
        continue;
      }
View Full Code Here

  protected void iterateSection(final Section s, final UpdateTask task)
  {
    final int count = s.getElementCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = s.getElement(i);
      task.processElement(element);
      if (element instanceof SubReport)
      {
        continue;
      }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.ReportElement

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.