Package org.pentaho.reporting.libraries.formula.lvalues

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


        }

        try
        {
            final Formula formula = formulaExpression.getCompiledFormula();
            final LValue lValue = formula.getRootReference();
            return isReferenceChanged(lValue);
        }
        catch (ParseException e)
        {
            return false;
View Full Code Here


        formula = FormulaUtil.extractFormula(formulaWithPrefix);
      }
      try
      {
        final FormulaParser parser = new FormulaParser();
        final LValue value = parser.parse(formula);
        if (value instanceof FormulaFunction)
        {
          final FormulaFunction function = (FormulaFunction) value;
          if ("DRILLDOWN".equals(function.getFunctionName())) // NON-NLS
          {
View Full Code Here

    if (lValues.length == 0)
    {
      return;
    }

    final LValue configValue = lValues[0];
    final String configText = extractStringValue(configValue);
    final String pathText;
    if (lValues.length > 1)
    {
      final LValue pathValue = lValues[1];
      pathText = extractStringValue(pathValue);
    }
    else
    {
      pathText = null;
    }

    final DrillDownParameter[] parameters;
    if (lValues.length == 3)
    {
      final LValue dataValue = lValues[2];
      if (dataValue instanceof DataTable)
      {
        final ArrayList<DrillDownParameter> values = new ArrayList<DrillDownParameter>();
        final DataTable paramsStaticValue = (DataTable) dataValue;
        final int colCount = paramsStaticValue.getColumnCount();
        final int rowCount = paramsStaticValue.getRowCount();
        for (int row = 0; row < rowCount; row++)
        {
          if (colCount == 0)
          {
            continue;
          }
          final LValue parameterNameValue = paramsStaticValue.getValueAt(row, 0);
          final String parameterName = extractStringValue(parameterNameValue);
          final String parameterText;
          if (colCount > 1)
          {
            final LValue parameterTextValue = paramsStaticValue.getValueAt(row, 1);
            if (parameterTextValue != null)
            {
              parameterText = parameterTextValue.toString();
            }
            else
            {
              parameterText = null;
            }
View Full Code Here

                            {
                                final FormulaExpression reportExp = (FormulaExpression) reportFunctions[j];

                                if (reportExp.getName().equals(name))
                                {
                                    LValue val = parser.parse(reportExp.getFormulaExpression());
                                    while( !(val instanceof ContextLookup))
                                    {
                                        if (val instanceof Term)
                                        {
                                            val = ((Term)val).getHeadValue();
View Full Code Here

        }

        try
        {
            final Formula formula = formulaExpression.getCompiledFormula();
            final LValue lValue = formula.getRootReference();
            return isReferenceChanged(lValue);
        }
        catch (ParseException e)
        {
            return false;
View Full Code Here

        try
        {
            final FormattedTextElement element = (FormattedTextElement) getNode();
            final FormulaExpression formulaExpression = element.getValueExpression();
            final Formula formula = formulaExpression.getCompiledFormula();
            final LValue lValue = formula.getRootReference();
            return isReferenceChanged(lValue);
        }
        catch (final ParseException e)
        {
            LOGGER.debug("Parse Exception", e);
View Full Code Here

            }
        }
        final LValue[] childValues = lValue.getChildValues();
        for (int i = 0; i < childValues.length; i++)
        {
            final LValue value = childValues[i];
            if (isReferenceChanged(value))
            {
                return true;
            }
        }
View Full Code Here

    // connects the parsed formula to the context. The context provides the
    // operator and function implementations and resolves the references.
    f.initialize(new DefaultFormulaContext());

    final LValue rootReference = f.getRootReference();
    print(rootReference, 0);
  }
View Full Code Here

  {
    System.out.println (level + " " + lValue.getClass() + " " + lValue.getParsePosition());
    final LValue[] lValues = lValue.getChildValues();
    for (int i = 0; i < lValues.length; i++)
    {
      LValue value = lValues[i];
      print (value, level +1);
    }
  }
View Full Code Here

        try
        {
            final FormattedTextElement element = (FormattedTextElement) getNode();
            final FormulaExpression formulaExpression = element.getValueExpression();
            final Formula formula = formulaExpression.getCompiledFormula();
            final LValue lValue = formula.getRootReference();
            return isReferenceChanged(lValue);
        }
        catch (final ParseException e)
        {
            LOGGER.debug("Parse Exception", e);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.formula.lvalues.LValue

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.