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

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


  }

  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


    final ResourceManager manager = new ResourceManager();
    manager.registerDefaults();
    final Resource res = manager.createDirectly(XPathQueryTest.class.getResource("xpath-bundle-test.prpt"), MasterReport.class);
    final MasterReport report = (MasterReport) res.getResource();

    final CompoundDataFactory dataFactory = (CompoundDataFactory) report.getDataFactory();
    final XPathDataFactory xpathDataFactory = (XPathDataFactory) dataFactory.getReference(0);
    xpathDataFactory.initialize(new DesignTimeDataFactoryContext(report));
    xpathDataFactory.queryData("default", new StaticDataRow());
    xpathDataFactory.close();
  }
View Full Code Here

        throw new NullPointerException();
      }
      this.globalAttributes = globalAttributes;
      this.entry = parameter;

      this.parameterContext = new DefaultParameterContext(new CompoundDataFactory(), new StaticDataRow(),
          ClassicEngineBoot.getInstance().getGlobalConfig(), new DefaultResourceBundleFactory(),
          resourceManager, null, reportEnvironment);
    }
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

    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

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

    final DataFactory dataFactory = toc.getDataFactory();
    final CompoundDataFactory normalizedDataFactory = CompoundDataFactory.normalize(dataFactory);
    normalizedDataFactory.add(0, new DataPassingDataFactory(name));
    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 DataPassingDataFactory(name));
    toc.setDataFactory(normalizedDataFactory);

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

    while (definition != null)
    {
      final DataFactory dataFactory = definition.getDataFactory();
      if (dataFactory instanceof CompoundDataFactory)
      {
        final CompoundDataFactory cdf = (CompoundDataFactory) dataFactory;
        final DataFactory factoryForQuery = cdf.getDataFactoryForQuery(query);
        if (factoryForQuery != null)
        {
          return factoryForQuery;
        }
      }
View Full Code Here

      }

      final Window parentWindow = designTimeContext.getParentWindow();
      parentWindow.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

      final CompoundDataFactory collection = (CompoundDataFactory) report.getDataFactory();
      final int dataFactoryCount = collection.size();
      for (int j = 0; j < dataFactoryCount; j++)
      {
        final DataFactory originalDataFactory = collection.getReference(j);
        if (originalDataFactory == dataFactory)
        {
          try
          {
            collection.remove(j);

            final DataFactory editedClone = editedDataFactory.derive();
            collection.add(j, editedDataFactory);
            activeContext.getUndo().addChange(ActionMessages.getString("EditQueryAction.Text"),
                new DataSourceEditUndoEntry(j, storedFactory, editedClone));

            report.notifyNodeChildRemoved(originalDataFactory);
            report.notifyNodeChildAdded(editedDataFactory);
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.