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

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


    }
    else if (value instanceof ReportFieldNode)
    {
      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());
      }
      else
      {
        final String displayName = (String) attributes.getMetaAttribute
            (MetaAttributeNames.Formatting.NAMESPACE, MetaAttributeNames.Formatting.LABEL,
                String.class, model.getDataAttributeContext());
        setText(formatFieldType(displayName, fieldNode.getFieldName(), fieldNode.getFieldClass()));
      }
    }
View Full Code Here


    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)
      {
        throw new IllegalStateException("No data-schema for expression with name '" + columnName + '\'');
      }
      if (ReportDataSchemaModel.isFiltered(attributes, dataAttributeContext))
View Full Code Here

      final ReportDataSchemaModel model = context.getReportDataSchemaModel();
      if (model.isSelectedDataSource(dataFactory, queryNode.getQueryName()))
      {
        final String[] names = getDataFactoryColumns();
        final String name = names[index];
        final DataAttributes attributes = model.getDataSchema().getAttributes(name);
        final Class type = (Class) attributes.getMetaAttribute
            (MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.TYPE, Class.class, model.getDataAttributeContext());
        return new ReportFieldNode(model, dataFactory, name, type);
      }

      throw new IndexOutOfBoundsException();
View Full Code Here

    final String[] columnNames = model.getColumnNames();
    final ArrayList<String> targetCols = new ArrayList<String>(columnNames.length);
    for (int i = 0; i < columnNames.length; i++)
    {
      final String columnName = columnNames[i];
      final DataAttributes attributes = model.getDataSchema().getAttributes(columnName);
      if (attributes == null)
      {
        // if in doubt, then do not add.
        continue;
      }
      if (ReportDataSchemaModel.isFiltered(attributes, model.getDataAttributeContext()))
      {
        continue;
      }

      if ("table".equals(attributes.getMetaAttribute
          (MetaAttributeNames.Core.NAMESPACE, MetaAttributeNames.Core.SOURCE,
              String.class, model.getDataAttributeContext())))
      {
        targetCols.add(columnName);
      }
View Full Code Here

TOP

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

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.