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

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


      addDataFactory(activeContext, dataFactory, recorder.getChanges());
    }
    finally
    {
      final ContextAwareDataSchemaModel dataSchemaModel = activeContext.getReportDataSchemaModel();
      if (dataSchemaModel.getDataFactoryException() != null)
      {
        UncaughtExceptionsModel.getInstance().addException(dataSchemaModel.getDataFactoryException());
      }

      parentWindow.setCursor(Cursor.getDefaultCursor());
    }
  }
View Full Code Here


    }
  }

  protected ReportFieldNode[] computeColumns(final ReportDocumentContext context)
  {
    ContextAwareDataSchemaModel model = context.getReportDataSchemaModel();
    final String[] columnNames = model.getColumnNames();
    final ArrayList<ReportFieldNode> nodes = new ArrayList<ReportFieldNode>(columnNames.length);
    for (int i = 0; i < columnNames.length; i++)
    {
      final String name = columnNames[i];
      final DataAttributes attributes = model.getDataSchema().getAttributes(name);
      if (attributes != null)
      {
        if (DataSchemaUtility.isFiltered(attributes, model.getDataAttributeContext()))
        {
          continue;
        }
        final Class type = (Class) attributes.getMetaAttribute
            (MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.TYPE, Class.class, model.getDataAttributeContext());
        nodes.add(new ReportFieldNode(context, name, type));
      }
      else
      {
        nodes.add(new ReportFieldNode(context, name, Object.class));
View Full Code Here

  private void configureWizardProperties(final String fieldName,
                                         final ReportDocumentContext context,
                                         final Element visualElement)
  {
    final ContextAwareDataSchemaModel model = context.getReportDataSchemaModel();
    if (fieldName == null)
    {
      return;
    }

    final DataAttributes attributes = model.getDataSchema().getAttributes(fieldName);
    final String source = (String) attributes.getMetaAttribute
        (MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.SOURCE, String.class, model.getDataAttributeContext());
    if (!MetaAttributeNames.Core.SOURCE_VALUE_TABLE.equals(source))
    {
      return;
    }
View Full Code Here

    final MasterReport report = new MasterReport();
    report.setPageDefinition(new SimplePageDefinition(PageSize.A3, PageFormat.LANDSCAPE, new Insets(0, 0, 0, 0)));
    report.setDataFactory(new TableDataFactory("query", tableModel));
    report.setQuery("query");
    final ContextAwareDataSchemaModel dataSchemaModel = new DesignTimeDataSchemaModel(report);

    final CrosstabBuilder builder = new CrosstabBuilder(dataSchemaModel);
    builder.addRowDimension(ROW_DIMENSION_A);
    builder.addRowDimension(ROW_DIMENSION_B);
    builder.addColumnDimension(COLUMN_DIMENSION_A);
View Full Code Here

  }

  @Test
  public void testSortOrderCalculationCrosstab() throws ReportProcessingException
  {
    ContextAwareDataSchemaModel model = new DesignTimeDataSchemaModel(new MasterReport());
    CrosstabBuilder builder = new CrosstabBuilder(model);
    builder.addDetails("Details", null);
    builder.addRowDimension("Row-A");
    builder.addRowDimension("Row-B");
    builder.addOtherDimension("Other-A");
View Full Code Here

  public void inspect(final ReportDesignerContext designerContext,
                      final ReportDocumentContext reportRenderContext,
                      final InspectionResultListener resultHandler) throws ReportDataFactoryException
  {
    final AbstractReportDefinition reportDefinition = reportRenderContext.getReportDefinition();
    final ContextAwareDataSchemaModel model = reportRenderContext.getReportDataSchemaModel();
    final String[] columnNames = model.getColumnNames();

    final HashSet<String> warnedNames = new HashSet<String>();
    final HashSet<String> exprNames = new HashSet<String>();
    final Expression[] expressions = reportDefinition.getExpressions().getExpressions();
    for (int i = 0; i < expressions.length; i++)
View Full Code Here

    if (renderContext == null)
    {
      return EMPTY_FIELDS;
    }

    final ContextAwareDataSchemaModel model = renderContext.getReportDataSchemaModel();
    final String[] columnNames = model.getColumnNames();
    final ArrayList<FieldDefinition> fields = new ArrayList<FieldDefinition>(columnNames.length);
    final DataSchema dataSchema = model.getDataSchema();
    final DefaultDataAttributeContext attributeContext = new DefaultDataAttributeContext();
    final String parameter;
    if (editorDataModel != null)
    {
      parameter = editorDataModel.getParameter();
View Full Code Here

TOP

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

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.