Package org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.datasource

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.datasource.DataSourceCollector


    if (od == null)
    {
      throw new BundleWriterException("Unable to resolve DataSource: " + datasource.getClass());
    }

    final DataSourceCollector dataSourceCollector =
        writerContext.getDataSourceCollector();
    final String dsname = dataSourceCollector.getDataSourceName(od);
    if (dsname == null)
    {
      throw new BundleWriterException("No name for DataSource " + datasource);
    }
View Full Code Here


      }
    }
    final ElementFactoryCollector elementFactory = new ElementFactoryCollector();
    final StyleKeyFactoryCollector styleKeyFactory = new StyleKeyFactoryCollector();
    final ClassFactoryCollector classFactory = new ClassFactoryCollector();
    final DataSourceCollector dataSourceFactory = new DataSourceCollector();
    final TemplateCollector templateFactory = new TemplateCollector();

    classFactory.configure(getRootHandler().getParserConfiguration());
    dataSourceFactory.configure(getRootHandler().getParserConfiguration());
    templateFactory.configure(getRootHandler().getParserConfiguration());

    getRootHandler().setHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME, report);
    getRootHandler().setHelperObject(ReportDefinitionReadHandler.ELEMENT_FACTORY_KEY, elementFactory);
    getRootHandler().setHelperObject(ReportDefinitionReadHandler.STYLE_FACTORY_KEY, styleKeyFactory);
View Full Code Here

      classFactory.addFactory(new URLClassFactory());
      classFactory.addFactory(new DefaultClassFactory());
      classFactory.addFactory(new BandLayoutClassFactory());
      classFactory.addFactory(new ArrayClassFactory());

      final DataSourceCollector dataSourceFactory = new DataSourceCollector();
      dataSourceFactory.addFactory(new DefaultDataSourceFactory());

      final TemplateCollector templateFactory = new TemplateCollector();
      templateFactory.addTemplateCollection(new DefaultTemplateCollection());

      classFactory.configure(rootHandler.getParserConfiguration());
      dataSourceFactory.configure(rootHandler.getParserConfiguration());
      templateFactory.configure(rootHandler.getParserConfiguration());

      rootHandler.setHelperObject(ReportDefinitionReadHandler.ELEMENT_FACTORY_KEY, elementFactory);
      rootHandler.setHelperObject(ReportDefinitionReadHandler.STYLE_FACTORY_KEY, styleKeyFactory);
      rootHandler.setHelperObject(ReportDefinitionReadHandler.CLASS_FACTORY_KEY, classFactory);
View Full Code Here

   *
   * @return the tablemodel for the reference documentation.
   */
  public static TableModel createData()
  {
    final DataSourceCollector cc = new DataSourceCollector();
    cc.addFactory(new DefaultDataSourceFactory());

    return new DataSourceReferenceTableModel(cc);
  }
View Full Code Here

    {
      throw new ParseException("The datasource type must be specified",
          getRootHandler().getDocumentLocator());
    }

    final DataSourceCollector fc = (DataSourceCollector) getRootHandler()
        .getHelperObject(ReportDefinitionReadHandler.DATASOURCE_FACTORY_KEY);
    final ObjectDescription od = fc.getDataSourceDescription(typeName);
    if (od == null)
    {
      throw new ParseException("The specified DataSource type is not defined", getLocator());
    }
    setObjectDescription(od);
View Full Code Here

    if (od == null)
    {
      throw new ReportWriterException("Unable to resolve DataSource: " + datasource.getClass());
    }

    final DataSourceCollector dataSourceCollector =
        reportWriter.getDataSourceCollector();
    final String dsname = dataSourceCollector.getDataSourceName(od);
    if (dsname == null)
    {
      throw new ReportWriterException("No name for DataSource " + datasource);
    }
View Full Code Here

//    }

    this.encoding = encoding;
    this.configuration = config;

    dataSourceCollector = new DataSourceCollector();
    elementFactoryCollector = new ElementFactoryCollector();
    classFactoryCollector = new ClassFactoryCollector();
    classFactoryCollector.addFactory(dataSourceCollector);
    styleKeyFactoryCollector = new StyleKeyFactoryCollector();
    templateCollector = new TemplateCollector();
View Full Code Here

      classFactory.configure(rootHandler.getParserConfiguration());
      rootHandler.setHelperObject(ExtSubReportReadHandler.CLASS_FACTORY_KEY, classFactory);
    }
    if (rootHandler.getHelperObject(ExtSubReportReadHandler.DATASOURCE_FACTORY_KEY) == null)
    {
      final DataSourceCollector dataSourceFactory = new DataSourceCollector();
      dataSourceFactory.configure(rootHandler.getParserConfiguration());
      rootHandler.setHelperObject(ExtSubReportReadHandler.DATASOURCE_FACTORY_KEY, dataSourceFactory);
    }
    if (rootHandler.getHelperObject(ExtSubReportReadHandler.TEMPLATE_FACTORY_KEY) == null)
    {
      final TemplateCollector templateFactory = new TemplateCollector();
View Full Code Here

    if (className == null)
    {
      throw new ParseException("Attribute 'class' is missing.",
          getRootHandler().getDocumentLocator());
    }
    final DataSourceCollector fc =
        (DataSourceCollector) getRootHandler().getHelperObject
            (ReportDefinitionReadHandler.DATASOURCE_FACTORY_KEY);

    final DataSourceFactory factory = (DataSourceFactory)
        ObjectUtilities.loadAndInstantiate(className, getClass(), DataSourceFactory.class);
    if (factory != null)
    {
      factory.configure(getRootHandler().getParserConfiguration());
      fc.addFactory(factory);
    }
  }
View Full Code Here

      classFactory.addFactory(new URLClassFactory());
      classFactory.addFactory(new DefaultClassFactory());
      classFactory.addFactory(new BandLayoutClassFactory());
      classFactory.addFactory(new ArrayClassFactory());

      final DataSourceCollector dataSourceFactory = new DataSourceCollector();
      dataSourceFactory.addFactory(new DefaultDataSourceFactory());

      final TemplateCollector templateFactory = new TemplateCollector();
      templateFactory.addTemplateCollection(new DefaultTemplateCollection());

      classFactory.configure(rootHandler.getParserConfiguration());
      dataSourceFactory.configure(rootHandler.getParserConfiguration());
      templateFactory.configure(rootHandler.getParserConfiguration());

      rootHandler.setHelperObject(ReportDefinitionReadHandler.ELEMENT_FACTORY_KEY, elementFactory);
      rootHandler.setHelperObject(ReportDefinitionReadHandler.STYLE_FACTORY_KEY, styleKeyFactory);
      rootHandler.setHelperObject(ReportDefinitionReadHandler.CLASS_FACTORY_KEY, classFactory);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.datasource.DataSourceCollector

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.