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

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


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


      return metaTableModel.getColumnCount();
    }

    public String getColumnName(final int columnIndex)
    {
      final DataAttributes columnAttributes = getColumnAttributes(columnIndex);
      final String friendlyName = (String) columnAttributes.getMetaAttribute
          (PmdDataFactoryModule.META_DOMAIN, MetaAttributeNames.Core.NAME,
              String.class, dataAttributeContext);
      if (friendlyName != null)
      {
        return friendlyName;
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 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());
View Full Code Here

    {
      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());
View Full Code Here

    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 (ReportDataSchemaModel.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(model, name, type));
      }
      else
      {
View Full Code Here

    }

    for (int i = columnNames.length - 1; i >= 0; i -= 1)
    {
      final String columnName = columnNames[i];
      final DataAttributes attributes = dataSchema.getAttributes(columnName);
      if (attributes == null)
      {
        throw new IllegalStateException("No data-schema for field with name '" + columnName + '\'');
      }
      if (ReportDataSchemaModel.isFiltered(attributes, dataAttributeContext))
View Full Code Here

        final Object labelFor = element.getAttribute
            (AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.LABEL_FOR);
        if (labelFor instanceof String)
        {
          final String labelForText = (String) labelFor;
          final DataAttributes attributes = runtime.getDataSchema().getAttributes(labelForText);
          if (attributes != null)
          {
            final DefaultDataAttributeContext context = new DefaultDataAttributeContext
                (runtime.getProcessingContext().getOutputProcessorMetaData(),
                    runtime.getResourceBundleFactory().getLocale());
            final Object o = attributes.getMetaAttribute
                (MetaAttributeNames.Formatting.NAMESPACE, MetaAttributeNames.Formatting.LABEL, String.class, context);
            if (o != null)
            {
              return o;
            }
View Full Code Here

  private ElementMetaData createMetaData(final String fieldName)
  {

    final ReportDataSchemaModel model = editorContext.getRenderContext().getReportDataSchemaModel();
    final DataSchema dataSchema = model.getDataSchema();
    final DataAttributes attributes = dataSchema.getAttributes(fieldName);
    final DataAttributeContext dataAttributeContext = new DefaultDataAttributeContext();
    if (attributes == null)
    {
      return null;
    }
View Full Code Here

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