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

Examples of org.pentaho.reporting.libraries.formula.lvalues.FormulaFunction$FormulaParameterCallback


                try
                {
                    final String expression = exp.getFormulaExpression();
                    if ( expression == null)
                        continue;
                    final FormulaFunction function = (FormulaFunction) parser.parse(expression);
                    final LValue[] parameters = function.getChildValues();
                    if (parameters.length > 0)
                    {
                        String name = parameters[0].toString();
                        for (int j = 0; j < reportFunctions.length; j++)
                        {
                            if (reportFunctions[j] instanceof FormulaExpression)
                            {
                                final FormulaExpression reportExp = (FormulaExpression) reportFunctions[j];

                                if (reportExp.getName().equals(name))
                                {
                                    final LValue val = (LValue) parser.parse(reportExp.getFormulaExpression());
                                    if (val instanceof FormulaFunction)
                                    {
                                        final FormulaFunction reportFunction = (FormulaFunction) val;
                                   
                                        final ContextLookup context = (ContextLookup) reportFunction.getChildValues()[0];
                                        name = context.getName();
                                    }
                                    else if (val instanceof Term)
                                    {
                                        final Term term = (Term) val;
View Full Code Here


      {
        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
          {
            updateModelFromFunction(function);
            return true;
          }
        }
View Full Code Here

       params.add(new StaticValue(null, createPosition(value)));
     }

     if (params == null)
     {
       {if (true) return new FormulaFunction(name, new LValue[0], parsePosition);}
     }

     LValue[] paramVals = (LValue[]) params.toArray(new LValue[params.size()]);
     {if (true) return new FormulaFunction(name, paramVals, parsePosition);}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

                try
                {
                    final String expression = exp.getFormulaExpression();
                    if ( expression == null)
                        continue;
                    final FormulaFunction function = (FormulaFunction) parser.parse(expression);
                    final LValue[] parameters = function.getChildValues();
                    if (parameters.length > 0)
                    {
                        String name = parameters[0].toString();
                        for (int j = 0; j < reportFunctions.length; j++)
                        {
                            if (reportFunctions[j] instanceof FormulaExpression)
                            {
                                final FormulaExpression reportExp = (FormulaExpression) reportFunctions[j];

                                if (reportExp.getName().equals(name))
                                {
                                    final LValue val = (LValue) parser.parse(reportExp.getFormulaExpression());
                                    if (val instanceof FormulaFunction)
                                    {
                                        final FormulaFunction reportFunction = (FormulaFunction) val;
                                   
                                        final ContextLookup context = (ContextLookup) reportFunction.getChildValues()[0];
                                        name = context.getName();
                                    }
                                    else if (val instanceof Term)
                                    {
                                        final Term term = (Term) val;
View Full Code Here

      {
        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
          {
            updateModelFromFunction(function);
            return true;
          }
        }
View Full Code Here

                    final String expression = exp.getFormulaExpression();
                    if (expression == null)
                    {
                        continue;
                    }
                    final FormulaFunction function = (FormulaFunction) parser.parse(expression);
                    final LValue[] parameters = function.getChildValues();
                    if (parameters.length > 0)
                    {
                        String name = parameters[0].toString();
                        if (parameters[0] instanceof ContextLookup)
                        {
                            final ContextLookup context = (ContextLookup) parameters[0];
                            name = context.getName();
                        }
                        for (int j = 0; j < reportFunctions.length; j++)
                        {
                            if (reportFunctions[j] instanceof FormulaExpression)
                            {
                                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();
                                        }
                                        else if (val instanceof FormulaFunction)
                                        {
                                            final FormulaFunction reportFunction = (FormulaFunction) val;
                                            val = reportFunction.getChildValues()[0];
                                        }
                                    }
                                    if (val instanceof ContextLookup)
                                    {
                                        final ContextLookup context = (ContextLookup) val;
View Full Code Here

       params.add(new StaticValue(null, createPosition(value)));
     }

     if (params == null)
     {
       {if (true) return new FormulaFunction(name, new LValue[0], parsePosition);}
     }

     LValue[] paramVals = (LValue[]) params.toArray(new LValue[params.size()]);
     {if (true) return new FormulaFunction(name, paramVals, parsePosition);}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

                try
                {
                    final String expression = exp.getFormulaExpression();
                    if ( expression == null)
                        continue;
                    final FormulaFunction function = (FormulaFunction) parser.parse(expression);
                    final LValue[] parameters = function.getChildValues();
                    if (parameters.length > 0)
                    {
                        String name = parameters[0].toString();
                        for (int j = 0; j < reportFunctions.length; j++)
                        {
                            if (reportFunctions[j] instanceof FormulaExpression)
                            {
                                final FormulaExpression reportExp = (FormulaExpression) reportFunctions[j];

                                if (reportExp.getName().equals(name))
                                {
                                    final LValue val = (LValue) parser.parse(reportExp.getFormulaExpression());
                                    if (val instanceof FormulaFunction)
                                    {
                                        final FormulaFunction reportFunction = (FormulaFunction) val;
                                   
                                        final ContextLookup context = (ContextLookup) reportFunction.getChildValues()[0];
                                        name = context.getName();
                                    }
                                    else if (val instanceof Term)
                                    {
                                        final Term term = (Term) val;
View Full Code Here

                    final String expression = exp.getFormulaExpression();
                    if (expression == null)
                    {
                        continue;
                    }
                    final FormulaFunction function = (FormulaFunction) parser.parse(expression);
                    final LValue[] parameters = function.getChildValues();
                    if (parameters.length > 0)
                    {
                        String name = parameters[0].toString();
                        if (parameters[0] instanceof ContextLookup)
                        {
                            final ContextLookup context = (ContextLookup) parameters[0];
                            name = context.getName();
                        }
                        for (int j = 0; j < reportFunctions.length; j++)
                        {
                            if (reportFunctions[j] instanceof FormulaExpression)
                            {
                                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();
                                        }
                                        else if (val instanceof FormulaFunction)
                                        {
                                            final FormulaFunction reportFunction = (FormulaFunction) val;
                                            val = reportFunction.getChildValues()[0];
                                        }
                                    }
                                    if (val instanceof ContextLookup)
                                    {
                                        final ContextLookup context = (ContextLookup) val;
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.formula.lvalues.FormulaFunction$FormulaParameterCallback

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.