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

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


    this.parameterDefinition = new DefaultParameterDefinition();
    this.resourceBundleFactory = new DefaultResourceBundleFactory();
    this.resourceManager = new ResourceManager();
    this.resourceManager.registerDefaults();
    this.parameterValues = new ReportParameterValues();
    this.dataFactory = new CompoundDataFactory();
    this.headers = new ArrayList();
    this.attachmentReports = new ArrayList();
    this.attachmentTypes = new ArrayList();
    this.sessionProperties = new Properties();
    this.reportEnvironment = new DefaultReportEnvironment(ClassicEngineBoot.getInstance().getGlobalConfig());
View Full Code Here


    {
      o.setTitleField(String.valueOf(titleField));
    }

    final DataFactory dataFactory = toc.getDataFactory();
    final CompoundDataFactory normalizedDataFactory = CompoundDataFactory.normalize(dataFactory);
    normalizedDataFactory.add(0, new ExternalDataFactory());
    toc.setDataFactory(normalizedDataFactory);

    definition.addExpression(o);
  }
View Full Code Here

    {
      o.setCondensedStyle(false);
    }

    final DataFactory dataFactory = toc.getDataFactory();
    final CompoundDataFactory normalizedDataFactory = CompoundDataFactory.normalize(dataFactory);
    normalizedDataFactory.add(0, new ExternalDataFactory());
    toc.setDataFactory(normalizedDataFactory);

    definition.addExpression(o);
  }
View Full Code Here

    columnTypes[1] = String.class;
    columnTypes[2] = Integer[].class;
    columnTypes[3] = String.class;
    final TypedTableModel sampleModel = new TypedTableModel(columnNames, columnTypes);

    final CompoundDataFactory compoundDataFactory = new CompoundDataFactory();
    compoundDataFactory.add(new TableDataFactory("design-time-data", sampleModel));
    setQuery("design-time-data");
    setDataFactory(compoundDataFactory);
  }
View Full Code Here

      columnNames[i + 4] = "group-value-" + i;
      columnTypes[i + 4] = Object.class;
    }
    final TypedTableModel sampleModel = new TypedTableModel(columnNames, columnTypes);

    final CompoundDataFactory compoundDataFactory = new CompoundDataFactory();
    compoundDataFactory.add(new TableDataFactory("design-time-data", sampleModel));
    setQuery("design-time-data");
    setDataFactory(compoundDataFactory);
  }
View Full Code Here

   *
   * @throws SAXException if there is a parsing error.
   */
  protected void doneParsing() throws SAXException
  {
    dataFactory = new CompoundDataFactory();
    for (int i = 0; i < dataSets.size(); i++)
    {
      final XmlReadHandler handler = (XmlReadHandler) dataSets.get(i);
      dataFactory.add((DataFactory) handler.getObject());
    }
View Full Code Here

  }

  private CompoundDataFactory createDataFactory(AbstractReportDefinition reportDefinition)
      throws ReportDataFactoryException
  {
    final CompoundDataFactory cdf = new CompoundDataFactory();
    while (reportDefinition != null)
    {
      final DataFactory dataFactory = reportDefinition.getDataFactory();
      if (dataFactory != null)
      {
        cdf.add(dataFactory);
      }
      final Section parentSection = reportDefinition.getParentSection();
      if (parentSection == null)
      {
        reportDefinition = null;
View Full Code Here

    while (reportDefinition != null)
    {
      final DataFactory reportDataFactory = reportDefinition.getDataFactory();
      if (reportDataFactory instanceof CompoundDataFactory)
      {
        final CompoundDataFactory compoundDataFactory = (CompoundDataFactory) reportDataFactory;
        for (int i = 0; i < compoundDataFactory.size(); i++)
        {
          final DataFactory df = compoundDataFactory.getReference(i);
          for (final String query : df.getQueryNames())
          {
            if (!query.equals(queryName))
            {
              continue;
View Full Code Here

   *
   * @throws SAXException if there is a parsing error.
   */
  protected void doneParsing() throws SAXException
  {
    final CompoundDataFactory srdf = new CompoundDataFactory();
    for (int i = 0; i < dataFactories.size(); i++)
    {
      final DataFactoryReadHandler handler = (DataFactoryReadHandler) dataFactories.get(i);
      srdf.add(handler.getDataFactory());
    }

    dataFactory = srdf;
  }
View Full Code Here

    {
      throw new NullPointerException();
    }


    final CompoundDataFactory compoundDataFactory = (CompoundDataFactory) dataFactory;

    final String fileName = BundleUtilities.getUniqueName(bundle, state.getFileName(),
        "datasources/compound-ds{0}.xml");
    if (fileName == null)
    {
      throw new IOException("Unable to generate unique name for Inline-Data-Source");
    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription = new DefaultTagDescription(
        ClassicEngineBoot.getInstance().getGlobalConfig(), CompoundDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ",
        "\n");
    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", CompoundDataFactoryModule.NAMESPACE);
    xmlWriter.writeTag(CompoundDataFactoryModule.NAMESPACE, "compound-datasource", rootAttrs, XmlWriterSupport.OPEN);

    for (int i = 0; i < compoundDataFactory.size(); i++)
    {
      final DataFactory df = compoundDataFactory.get(i);
      final BundleDataFactoryWriterHandler writerHandler = BundleWriterUtilities.lookupWriteHandler(df);
      if (writerHandler == null)
      {
        throw new BundleWriterException("Unable to find writer-handler for data-factory " + df.getClass());
      }
View Full Code Here

TOP

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

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.