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

Examples of org.pentaho.reporting.engine.classic.core.wizard.DataSchemaDefinition


    final BundleWriterState contentState = new BundleWriterState(state, state.getReport(), "dataschema.xml");

    final OutputStream outputStream = new BufferedOutputStream(bundle.createEntry(contentState.getFileName(),
        "text/xml"));
    final MasterReport report = state.getMasterReport();
    final DataSchemaDefinition definition = report.getDataSchemaDefinition();

    final StandaloneDataSchemaWriter dataSchemaWriter = new StandaloneDataSchemaWriter();
    dataSchemaWriter.write(definition, outputStream, "UTF-8");
    outputStream.close();
    return contentState.getFileName();
View Full Code Here


  {
    try
    {
      final Map parameters = deriveParseParameters();
      parameters.put(new FactoryParameterKey(ReportParserUtil.HELPER_OBJ_REPORT_NAME), null);
      final DataSchemaDefinition metaData = (DataSchemaDefinition)
          performExternalParsing("dataschema.xml", DataSchemaDefinition.class, parameters);
      report.setDataSchemaDefinition(metaData);
      return true;
    }
    catch (ResourceLoadingException e)
View Full Code Here

    else
    {
      processingContext = new DefaultProcessingContext();
    }

    final DataSchemaDefinition definition = report.getDataSchemaDefinition();
    final DefaultFlowController flowController = new DefaultFlowController(processingContext,
        definition, StateUtilities.computeParameterValueSet(report), null, false);
    final CachingDataFactory dataFactory = new CachingDataFactory(report.getDataFactory(), isCacheEnabled(report));
    dataFactory.initialize(processingContext.getConfiguration(), processingContext.getResourceManager(),
        DesignTimeUtil.getContextKey(report), processingContext.getResourceBundleFactory());
View Full Code Here

  public static MasterReport materialize(final MasterReport report,
                                         final WizardProcessor processor) throws ReportProcessingException
  {
    final DefaultProcessingContext processingContext = new DefaultProcessingContext(report);
    final DataSchemaDefinition definition = report.getDataSchemaDefinition();
    final DefaultFlowController flowController = new DefaultFlowController(processingContext,
        definition, StateUtilities.computeParameterValueSet(report),
        report.getParameterDefinition().getParameterDefinitions(), false);
    final CachingDataFactory dataFactory = new CachingDataFactory(report.getDataFactory(), isCacheEnabled(report));
    dataFactory.initialize(processingContext.getConfiguration(), processingContext.getResourceManager(),
View Full Code Here

      // otherwise process the report one time to walk through all eligible states. Record all subreports,
      // and then compute the runlevels based on what we have in the caches.
      this.structuralPreprocessingNeeded = true;
    }

    final DataSchemaDefinition definition = report.getDataSchemaDefinition();
    final DefaultFlowController flowController = new DefaultFlowController(processingContext,
        definition, StateUtilities.computeParameterValueSet(report, parameterValues),
        report.getParameterDefinition().getParameterDefinitions(), structuralPreprocessingNeeded);

    final Object dataCacheEnabledRaw =
        report.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.DATA_CACHE);
    final boolean dataCacheEnabled = Boolean.FALSE.equals(dataCacheEnabledRaw) == false;
    final CachingDataFactory dataFactory = new CachingDataFactory(report.getDataFactory(), dataCacheEnabled);
    dataFactory.initialize(processingContext.getConfiguration(), processingContext.getResourceManager(),
        processingContext.getContentBase(), processingContext.getResourceBundleFactory());
    dataFactory.open();

    final FunctionStorageKey functionStorageKey = FunctionStorageKey.createKey(null, report);
    this.dataFactoryManager.store(functionStorageKey, dataFactory);
    // eval query, query-limit and query-timeout
    this.flowController = flowController;
    final Integer queryLimitDefault = IntegerCache.getInteger(report.getQueryLimit());
    final Integer queryTimeoutDefault = IntegerCache.getInteger(report.getQueryTimeout());

    final Object queryRaw = evaluateExpression(report.getAttributeExpression(AttributeNames.Internal.NAMESPACE,
        AttributeNames.Internal.QUERY), report.getQuery());
    final Object queryLimitRaw = evaluateExpression(report.getAttributeExpression(AttributeNames.Internal.NAMESPACE,
        AttributeNames.Internal.QUERY_LIMIT), queryLimitDefault);
    final Object queryTimeoutRaw = evaluateExpression(report.getAttributeExpression(AttributeNames.Internal.NAMESPACE,
        AttributeNames.Internal.QUERY_TIMEOUT), queryTimeoutDefault);
    this.query = (String) ConverterRegistry.convert(queryRaw, String.class, report.getQuery());
    this.queryLimit = (Integer) ConverterRegistry.convert(queryLimitRaw, Integer.class, queryLimitDefault);
    this.queryTimeout = (Integer) ConverterRegistry.convert(queryTimeoutRaw, Integer.class, queryTimeoutDefault);

    DefaultFlowController postQueryFlowController = flowController.performQuery
        (dataFactory, query, queryLimit.intValue(), queryTimeout.intValue(),
            processingContext.getResourceBundleFactory());
    final ReportPreProcessor[] processors = getAllPreProcessors(report);
    MasterReport fullReport = report;
    DataSchemaDefinition fullDefinition = definition;
    for (int i = 0; i < processors.length; i++)
    {
      final ReportPreProcessor processor = processors[i];
      fullReport = processor.performPreProcessing(fullReport, postQueryFlowController);
      if (fullReport.getDataSchemaDefinition() != fullDefinition)
View Full Code Here

          new ProxyDataSchemaDefinition(report.getDataSchemaDefinition(),
              postQueryFlowController.getMasterRow().getDataSchemaDefinition());
      postQueryFlowController = postQueryFlowController.updateDataSchema(schemaDefinition);

      SubReport fullReport = report;
      DataSchemaDefinition fullDefinition = schemaDefinition;

      if (needPreProcessing)
      {
        final ReportPreProcessor[] processors = getAllPreProcessors(report);
        for (int i = 0; i < processors.length; i++)
View Full Code Here

    super(masterReportElement, parent);
  }

  protected DataSchemaDefinition createDataSchemaDefinition(final MasterReport masterReportElement)
  {
    DataSchemaDefinition dataSchemaDefinition = masterReportElement.getDataSchemaDefinition();
    if (dataSchemaDefinition == null)
    {
      return DataSchemaUtility.parseDefaults(masterReportElement.getResourceManager());
    }
    return dataSchemaDefinition;
View Full Code Here

    final BundleWriterState contentState = new BundleWriterState(state, state.getReport(), "dataschema.xml");

    final OutputStream outputStream = new BufferedOutputStream(bundle.createEntry(contentState.getFileName(),
        "text/xml"));
    final MasterReport report = state.getMasterReport();
    final DataSchemaDefinition definition = report.getDataSchemaDefinition();

    final StandaloneDataSchemaWriter dataSchemaWriter = new StandaloneDataSchemaWriter();
    dataSchemaWriter.write(definition, outputStream, "UTF-8");
    outputStream.close();
    return contentState.getFileName();
View Full Code Here

  {
    try
    {
      final Map parameters = deriveParseParameters();
      parameters.put(new FactoryParameterKey(ReportParserUtil.HELPER_OBJ_REPORT_NAME), null);
      final DataSchemaDefinition metaData = (DataSchemaDefinition)
          performExternalParsing("dataschema.xml", DataSchemaDefinition.class, parameters);
      report.setDataSchemaDefinition(metaData);
      return true;
    }
    catch (ResourceLoadingException e)
View Full Code Here

  protected MasterReport materialize(final MasterReport report,
                                            final ReportPreProcessor processor) throws ReportProcessingException
  {
    final PerformanceMonitorContext pmc = new NoOpPerformanceMonitorContext();
    final DefaultProcessingContext processingContext = new DefaultProcessingContext(report);
    final DataSchemaDefinition definition = report.getDataSchemaDefinition();
    final DefaultFlowController flowController = new DefaultFlowController(processingContext,
        definition, StateUtilities.computeParameterValueSet(report), pmc);
    final CachingDataFactory dataFactory = new CachingDataFactory(report.getDataFactory(), false);
    dataFactory.initialize(new ProcessingDataFactoryContext(processingContext, dataFactory));
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.wizard.DataSchemaDefinition

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.