Examples of TypeValuePair


Examples of org.jfree.formula.lvalues.TypeValuePair

        if (parameters.getParameterCount() != 0)
        {
            throw new EvaluationException(LibFormulaErrorValue.ERROR_ARGUMENTS_VALUE);
        }

        return new TypeValuePair(TextType.TYPE, context.getConfiguration().getConfigProperty(ReportEngineParameterNames.AUTHOR));
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair

      b.append("','");
      b.append(QuoteTextFunction.saveConvert(tabText));
      b.append("','");
      b.append(QuoteTextFunction.saveConvert(urlText));
      b.append("')");
      return new TypeValuePair(TextType.TYPE, b.toString());
    }
    else
    {
      return new TypeValuePair(TextType.TYPE, urlText);
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair

  public TypeValuePair evaluate(final FormulaContext context,
                                final ParameterCallback parameters) throws EvaluationException
  {
    if (parameters.getParameterCount() == 0)
    {
      return new TypeValuePair(TextType.TYPE, "?");
    }
    final String text = context.getTypeRegistry().convertToText(parameters.getType(0), parameters.getValue(0));
    if (text == null)
    {
      return new TypeValuePair(TextType.TYPE, "?");
    }
    if (text.indexOf('?') == -1)
    {
      return new TypeValuePair(TextType.TYPE, "?");
    }

    if (text.endsWith("?"))
    {
      return new TypeValuePair(TextType.TYPE, text);
    }
   
    return new TypeValuePair(TextType.TYPE, text + "&");
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair

      }
    }
    final ArrayCallback parameter = typeRegistry.convertToArray(parameters.getType(2), parameters.getValue(2));

    final LinkCustomizer pattern = createLinkCustomizer(configIndicator);
    return new TypeValuePair(TextType.TYPE, pattern.format(context, configIndicator, path,
        computeParameterEntries(parameter, typeRegistry)));
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair

    {
      queryLimit = 0;
    }

    final Object result = performQuery(rfc, query, resultColumn, queryTimeOut, queryLimit);
    return new TypeValuePair(AnyType.ANY_ARRAY, result);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair

      encodingResult = "javascript";
    }

    if (encodingResult.equals("xml"))
    {
      return new TypeValuePair(TextType.TYPE, CharacterEntityParser.createXMLEntityParser().encodeEntities(textResult));
    }
    else if (encodingResult.equals("html"))
    {
      return new TypeValuePair(TextType.TYPE, HtmlCharacterEntities.getEntityParser().encodeEntities(textResult));
    }
    else if (encodingResult.equals("formula-string"))
    {
      return new TypeValuePair(TextType.TYPE, FormulaUtil.quoteString(textResult));
    }
    else if (encodingResult.equals("formula-reference"))
    {
      return new TypeValuePair(TextType.TYPE, FormulaUtil.quoteReference(textResult));
    }
    else // javascript
    {
      return new TypeValuePair(TextType.TYPE, saveConvert(textResult));
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair

      final String groupName = context.getTypeRegistry().convertToText(parameters.getType(0), parameters.getValue(0));
      groupStart = rfc.getRuntime().getGroupStartRow(groupName);
    }
    final int row = rfc.getRuntime().getCurrentRow();
    //noinspection UnpredictableBigDecimalConstructorCall
    return new TypeValuePair(NumberType.GENERIC_NUMBER, new BigDecimal((double) (row - groupStart)));
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair

    final ReportFormulaContext rfc = (ReportFormulaContext) context;
    final boolean value = rfc.isResultSetEmpty();

    if (value)
    {
      return new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
    }

    return new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair

                                final ParameterCallback parameters) throws EvaluationException
  {
    final ReportFormulaContext rfc = (ReportFormulaContext) context;
    if (isDashboardMode(rfc))
    {
      return new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
    }
    return new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair

    final Object value = parameters.getValue(0);
    final ReportFormulaContext rfc = (ReportFormulaContext) context;
    if (value != null && rfc.getExportType().startsWith(String.valueOf(value)))
    {
      return new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
    }

    return new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.