Package org.pentaho.reporting.libraries.base.util

Examples of org.pentaho.reporting.libraries.base.util.LinkedMap$MapEntry


   *
   * @throws SAXException if there is a parsing error.
   */
  protected void doneParsing() throws SAXException
  {
    final LinkedMap map = (LinkedMap) parameters.getObject();
    staticDataFactory = new NamedStaticDataFactory();
    if (map.isEmpty())
    {
      staticDataFactory.setQuery(queryName, className + '#' + methodName);
    }
    else
    {
      String query = className + '#' + methodName + '(';
      final Object[] objects = map.keys();
      for (int i = 0; i < objects.length; i++)
      {
        if (i != 0)
        {
          query += ",";
View Full Code Here


  private boolean safariLengthFix;

  public StyleBuilder()
  {
    this.lineSeparator = StringUtils.getLineSeparator();
    this.styles = new LinkedMap(1024, 0.75f);
    this.cachedBorderStyle = new LFUMap(30);
    this.buffer = new StringBuffer(100);

    if ("true".equals(ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.table.html.SafariLengthHack")))
View Full Code Here

    final ParameterDataRow parameterRow;
    if (parent instanceof MasterReport)
    {
      final MasterReport mr = (MasterReport) parent;
      parameterDefinitions = mr.getParameterDefinition().getParameterDefinitions();
      final LinkedMap values = computeParameterValueSet(mr);
      parameterRow = new ParameterDataRow((String[]) values.keys(new String[values.size()]), values.values());
    }
    else if (parent instanceof SubReport)
    {
      final SubReport sr = (SubReport) parent;
      final ParameterMapping[] inputMappings = sr.getInputMappings();
View Full Code Here

  private String[] collectColumnNames(final TableModel reportData,
                                      final ParameterDataRow parameterRow,
                                      final Expression[] expressions)
  {

    final LinkedMap columnNamesCollector = new LinkedMap();

    final LinkedMap envCols = ReportEnvironmentDataRow.createEnvironmentMapping();
    final Object[] envColArray = envCols.values();
    for (int i = 0; i < envColArray.length; i++)
    {
      final String name = (String) envColArray[i];
      columnNamesCollector.put(name, Boolean.TRUE);
    }
View Full Code Here

    return false;
  }

  public static LinkedMap computeParameterValueSet(final MasterReport report)
  {
    final LinkedMap retval = new LinkedMap();
    retval.put(MasterReport.REPORT_DATE_PROPERTY, new Date());
    final String reportName = (String) report.getProperty(MasterReport.NAME_PROPERTY);
    if (StringUtils.isEmpty(reportName) == false)
    {
      retval.put(MasterReport.NAME_PROPERTY, reportName);
    }

    final ReportParameterValues reportParameterValues = report.getParameterValues();
    final ParameterDefinitionEntry[] columnNames = report.getParameterDefinition().getParameterDefinitions();
    for (int i = 0; i < columnNames.length; i++)
    {
      final ParameterDefinitionEntry parameter = columnNames[i];
      final String columnName = parameter.getName();
      if (columnName == null)
      {
        continue;
      }
      retval.put(columnName, reportParameterValues.get(columnName));
    }
    return retval;
  }
View Full Code Here

  public CompoundDataRow(final DataRow envDataRow, final DataRow dataRow)
  {
    this.envDataRow = envDataRow;
    this.dataRow = dataRow;

    columnSources = new LinkedMap();
    final String[] dataRowNames = dataRow.getColumnNames();
    for (int i = 0; i < dataRowNames.length; i++)
    {
      final String dataRowName = dataRowNames[i];
      columnSources.put(dataRowName, Boolean.TRUE);
View Full Code Here

   *
   * @return the column names as array.
   */
  public String[] getColumnNames()
  {
    final LinkedMap columnSources = new LinkedMap();
    final String[] dataRowNames = dataRow.getColumnNames();
    for (int i = 0; i < dataRowNames.length; i++)
    {
      final String dataRowName = dataRowNames[i];
      columnSources.put(dataRowName, Boolean.TRUE);
    }

    final String[] envRowNames = envDataRow.getColumnNames();
    for (int i = 0; i < envRowNames.length; i++)
    {
      final String dataRowName = envRowNames[i];
      columnSources.put(dataRowName, Boolean.FALSE);
    }
    return (String[]) columnSources.keys(new String[columnSources.size()]);
  }
View Full Code Here

  protected void processReportEnvironment(final DefaultDataAttributes globalAttributes,
                                          final DataSchemaRule[] indirectRules,
                                          final DataSchemaRule[] directRules,
                                          final DefaultDataSchema schema)
  {
    final LinkedMap names = ReportEnvironmentDataRow.createEnvironmentMapping();
    final String[] parameterNames = (String[]) names.keys(new String[names.size()]);
    for (int i = 0; i < parameterNames.length; i++)
    {
      final String envName = parameterNames[i];
      final String name = (String) names.get(envName);
      if (envName.endsWith("-array"))
      {
        environmentDataAttributes.setup(name, String[].class, MetaAttributeNames.Core.SOURCE_VALUE_ENVIRONMENT, globalAttributes);
      }
      else
View Full Code Here

  private ReportEnvironment environment;
  private LinkedMap columnMap;

  public ReportEnvironmentDataRow(final ReportEnvironment environment)
  {
    final LinkedMap envMapping = createEnvironmentMapping();
    this.columnMap = new LinkedMap();
    final Object[] keys = envMapping.keys();
    for (int i = 0; i < keys.length; i++)
    {
      final String key = (String) keys[i];
      final String value = (String) envMapping.get(key);
      if (StringUtils.isEmpty(key) == false && StringUtils.isEmpty(value) == false)
      {
        this.columnMap.put(value, key);
      }
    }
View Full Code Here

   */
  public static LinkedMap createEnvironmentMapping()
  {
    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    final Iterator propertyKeys = configuration.findPropertyKeys(ENV_MAPPING_KEY_PREFIX);
    final LinkedMap names = new LinkedMap();
    while (propertyKeys.hasNext())
    {
      final String key = (String) propertyKeys.next();
      final String value = configuration.getConfigProperty(key);
      final String shortKey = key.substring(ENV_MAPPING_KEY_PREFIX.length());
      names.put(shortKey, value);
    }
    return names;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.util.LinkedMap$MapEntry

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.