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

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


            {
              return false;
            }
          }
          final WizardSpecification specification = editorModel.getReportSpec();
          final DataFactory dataFactory = editorModel.getReportDefinition().getDataFactory().derive();
          final String oldName = editorModel.getReportDefinition().getName();

          report.setAttribute("http://reporting.pentaho.org/namespaces/engine/attributes/wizard", "template", fileName);
          report.setDataFactory(dataFactory);
          report.setName(oldName);
View Full Code Here


          continue;
        }
        logger.debug("Starting to read " + handler.getDemoName());

        final MasterReport report = handler.createReport();
        final DataFactory model = report.getDataFactory();

        // we don't test whether our demo models are serializable :)
        report.setDataFactory(new TableDataFactory
            ("default", new DefaultTableModel()));
        // clear all report properties, which may cause trouble ...
View Full Code Here

      parameterContext.close();
    }

    // definition: Single mail or multi-mail
    final TableModel burstingData;
    final DataFactory dataFactory = definition.getDataFactory();
    if (definition.getBurstQuery() != null &&
        dataFactory.isQueryExecutable(definition.getBurstQuery(), parameterValues))
    {
      burstingData = wrapWithParameters(dataFactory.queryData(definition.getBurstQuery(), parameterValues), parameterValues);
    }
    else
    {
      burstingData = wrapWithParameters(new DefaultTableModel(1, 0), parameterValues);
    }
View Full Code Here

      return;
    }

    // first, try to find a suitable writer implementation.
    final MasterReport report = (MasterReport) getReport();
    final DataFactory dataFactory = report.getDataFactory();

    final DataFactoryWriteHandler handler = DataFactoryWriter.lookupWriteHandler(dataFactory);
    if (handler != null)
    {
      handler.write(getReportWriter(), getXmlWriter(), dataFactory);
View Full Code Here

    if (titleField != null)
    {
      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

    else if (Boolean.FALSE.equals(condensedStyle))
    {
      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

    getBindingFactory().createBinding(DATASOURCES_TREE_ID, SELECTED_ROWS_PROPERTY_NAME, REMOVE_DATASOURCES_BTN_ID, ENABLED_PROPERTY_NAME, indiciesToBooleanBindingConverter);
  }

  public void editQuery(final String queryName)
  {
    final DataFactory dataFactory = getOwnerDataFactory(queryName);
    final DataFactoryMetaData o = getMetaForDataFactory(dataFactory, dataFactoryMetas);
    editOrCreateDataFactory(o);
  }
View Full Code Here

  private int getDataFactoryForMeta(final DataFactoryMetaData dfMetaData)
  {
    for (int i = 0; i < cdf.size(); i++)
    {
      final DataFactory df = cdf.getReference(i);
      if (dfMetaData.getName().equals(df.getClass().getName()))
      {
        return i;
      }
    }
View Full Code Here

    if (o.isHidden())
    {
      return;
    }

    final DataFactory editDataFactory = getEditDataFactory(o);
    final DataSourcePlugin dataSourcePlugin = o.createEditor();
    final DataFactory generatedDataFactory = dataSourcePlugin.performEdit(getDesignTimeContext(), editDataFactory, null);
    if (generatedDataFactory != null)
    {
      cdf.add(generatedDataFactory);
      cdf = CompoundDataFactory.normalize(cdf);
      updateDatasourceTree();
View Full Code Here

  private DataFactory getEditDataFactory(final DataFactoryMetaData o)
  {
    final String mdfactoryName = o.getName();
    for (int i = 0; i < cdf.size(); i++)
    {
      final DataFactory df = cdf.getReference(i);
      final String dfClassName = df.getClass().getName();
      if (mdfactoryName.equals(dfClassName))
      {
        cdf.remove(i);
        return df;
      }
View Full Code Here

TOP

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

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.