Examples of convertToText()


Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Type startType = parameters.getType(1);
    final Object startValue = parameters.getValue(1);
    final Type lengthType = parameters.getType(2);
    final Object lengthValue = parameters.getValue(2);

    final String text = typeRegistry.convertToText(textType, textValue);
    final Number start = typeRegistry.convertToNumber(startType, startValue);
    final Number length = typeRegistry.convertToNumber(lengthType, lengthValue);

    if(length.doubleValue() < 0 || start.doubleValue() < 1)
    {
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Type textType1 = parameters.getType(0);
    final Object textValue1 = parameters.getValue(0);
    final Type textType2 = parameters.getType(1);
    final Object textValue2 = parameters.getValue(1);

    final String text = typeRegistry.convertToText(textType1, textValue1);
    final String substring = typeRegistry.convertToText(textType2, textValue2);

    return text.contains(substring) ? RETURN_TRUE : RETURN_FALSE;
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Object textValue1 = parameters.getValue(0);
    final Type textType2 = parameters.getType(1);
    final Object textValue2 = parameters.getValue(1);

    final String text = typeRegistry.convertToText(textType1, textValue1);
    final String substring = typeRegistry.convertToText(textType2, textValue2);

    return text.contains(substring) ? RETURN_TRUE : RETURN_FALSE;
  }

  public String getCanonicalName()
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Type textType1 = parameters.getType(0);
    final Object textValue1 = parameters.getValue(0);
    final Type patternType = parameters.getType(1);
    final Object patternValue = parameters.getValue(1);

    final String text = typeRegistry.convertToText(textType1, textValue1);

    String regex = typeRegistry.convertToText(patternType, patternValue);

    // replace any * or % with .*
    regex = regex.replaceAll("\\*", ".*").replaceAll("%", ".*");
 
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Type patternType = parameters.getType(1);
    final Object patternValue = parameters.getValue(1);

    final String text = typeRegistry.convertToText(textType1, textValue1);

    String regex = typeRegistry.convertToText(patternType, patternValue);

    // replace any * or % with .*
    regex = regex.replaceAll("\\*", ".*").replaceAll("%", ".*");

    final Pattern p = Pattern.compile(regex);
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    {
      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_ARGUMENTS_VALUE);
    }

    final TypeRegistry typeRegistry = context.getTypeRegistry();
    final String formatCode = typeRegistry.convertToText
        (parameters.getType(2), parameters.getValue(2));

    if (formatCode == null || "".equals(formatCode))
    {
      throw EvaluationException.getInstance(
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    if (raw1 == null || raw2 == null)
    {
      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_NA_VALUE);
    }

    final String text1 = typeRegistry.convertToText(value1.getType(), raw1);
    final String text2 = typeRegistry.convertToText(value2.getType(), raw2);
    if (text1 == null && text2 == null)
    {
      throw EvaluationException.getInstance
          (LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    {
      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_NA_VALUE);
    }

    final String text1 = typeRegistry.convertToText(value1.getType(), raw1);
    final String text2 = typeRegistry.convertToText(value2.getType(), raw2);
    if (text1 == null && text2 == null)
    {
      throw EvaluationException.getInstance
          (LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

      {
        throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_MISSING_ARGUMENT_VALUE);
      }
    }

    final String search = typeRegistry.convertToText(searchType, searchValue);
    final String text = typeRegistry.convertToText(textType, textValue);

    if (search == null || text == null)
    {
      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

        throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_MISSING_ARGUMENT_VALUE);
      }
    }

    final String search = typeRegistry.convertToText(searchType, searchValue);
    final String text = typeRegistry.convertToText(textType, textValue);

    if (search == null || text == null)
    {
      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
    }
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.