Package org.pentaho.reporting.designer.core.model

Examples of org.pentaho.reporting.designer.core.model.ReportDataSchemaModel


  public ContextAwareDataSchemaModel getModel()
  {
    if (model == null)
    {
      model = new ReportDataSchemaModel(masterReport, report);
    }
    return model;
  }
View Full Code Here


public class QueryMetaDataActorImpl implements QueryMetaDataActor
{
  public Future<ContextAwareDataSchemaModel> retrieve(final MasterReport master, final AbstractReportDefinition report)
  {
    ContextAwareDataSchemaModel model = new ReportDataSchemaModel(master, report);
    // trigger the actual query while still being on the actor thread.
    model.getDataSchema();
    return Futures.successful(model);
  }
View Full Code Here

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

    final ReportDataSchemaModel model = renderContext.getReportDataSchemaModel();
    final String[] columnNames = model.getColumnNames();
    final ArrayList<FieldDefinition> fields = new ArrayList<FieldDefinition>(columnNames.length);
    final DataSchema dataSchema = model.getDataSchema();
    for (int i = 0; i < columnNames.length; i++)
    {
      final String columnName = columnNames[i];
      final DataAttributes attributes = dataSchema.getAttributes(columnName);
      if (attributes == null)
View Full Code Here

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

    final ReportDataSchemaModel 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

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

    final ReportDataSchemaModel model = renderContext.getReportDataSchemaModel();
    final String[] columnNames = model.getColumnNames();
    final FieldDefinition[] fields = new FieldDefinition[columnNames.length];
    final DataSchema dataSchema = model.getDataSchema();
    for (int i = 0; i < columnNames.length; i++)
    {
      final String columnName = columnNames[i];
      final DataAttributes attributes = dataSchema.getAttributes(columnName);
      if (attributes == null)
View Full Code Here

      styleSheet.setStyleProperty(ElementStyleKeys.POS_X, new Float(Math.max(0, point.getX() - getParentX(band))));
      styleSheet.setStyleProperty(ElementStyleKeys.POS_Y, new Float(Math.max(0, point.getY() - getParentY(band))));

      final ReportRenderContext context = dragContext.getRenderContext();

      final ReportDataSchemaModel model = context.getReportDataSchemaModel();
      if (fieldName != null)
      {
        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))
        {
          final AbstractReportDefinition report = context.getReportDefinition();
          final DataFactory dataFactory = ModelUtility.findDataFactoryForQuery(report, report.getQuery());
          if (dataFactory != null)
View Full Code Here

    if (value instanceof ReportFieldNode == false)
    {
      return this;
    }
    final ReportFieldNode fieldNode = (ReportFieldNode) value;
    final ReportDataSchemaModel model = fieldNode.getDataSchemaModel();
    final DataAttributes attributes = model.getDataSchema().getAttributes(fieldNode.getFieldName());
    setToolTipText(fieldNode.getFieldClass().getSimpleName());
    if (attributes == null)
    {
      setText(fieldNode.toString());
      setIcon(IconLoader.getInstance().getBlankDocumentIcon());
    }
    else
    {
      final String displayName = (String) attributes.getMetaAttribute
          (MetaAttributeNames.Formatting.NAMESPACE, MetaAttributeNames.Formatting.LABEL,
              String.class, model.getDataAttributeContext());
      setText(formatFieldType(displayName, fieldNode.getFieldName(), fieldNode.getFieldClass()));
      final Object source = attributes.getMetaAttribute
          (MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.SOURCE, String.class,
              model.getDataAttributeContext());
      if (MetaAttributeNames.Core.SOURCE_VALUE_ENVIRONMENT.equals(source))
      {
        setIcon(IconLoader.getInstance().getPropertiesDataSetIcon());
      }
      else if (MetaAttributeNames.Core.SOURCE_VALUE_EXPRESSION.equals(source))
View Full Code Here

    else
    {
      report = newContext.getReportDefinition();
      report.addReportModelListener(changeHandler);

      final ReportDataSchemaModel model = newContext.getReportDataSchemaModel();
      dataModel.setDataSchema(computeColumns(model));
    }
  }
View Full Code Here

        return;
      }

      if (event.getElement() == activeContext.getReportDefinition())
      {
        final ReportDataSchemaModel model = activeContext.getReportDataSchemaModel();
        dataModel.setDataSchema(computeColumns(model));
      }
    }
View Full Code Here

      final ReportRenderContext activeContext = designerContext.getActiveContext();
      if (activeContext == null)
      {
        return;
      }
      final ReportDataSchemaModel model = activeContext.getReportDataSchemaModel();
      dataModel.setDataSchema(computeColumns(model));
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.designer.core.model.ReportDataSchemaModel

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.