Package org.jfree.formula

Examples of org.jfree.formula.LibFormulaErrorValue


    {
      final DataFlags flags = dataRow.getFlags(String.valueOf(name));
      if (flags == null)
      {
        throw new ContextEvaluationException
            (new LibFormulaErrorValue(LibFormulaErrorValue.ERROR_REFERENCE_NOT_RESOLVABLE));
      }
      return flags.isChanged();
    }
    catch(Exception e)
    {
      throw new ContextEvaluationException
          (new LibFormulaErrorValue(LibFormulaErrorValue.ERROR_REFERENCE_NOT_RESOLVABLE));
    }
  }
View Full Code Here


      return dataRow.get(String.valueOf(name));
    }
    catch (DataSourceException e)
    {
      Log.debug ("Error while resolving formula reference: ", e);
      throw new ContextEvaluationException(new LibFormulaErrorValue
          (LibFormulaErrorValue.ERROR_REFERENCE_NOT_RESOLVABLE));
    }
  }
View Full Code Here

  {
    // we expect strings and will check, whether the reference for theses
    // strings is dirty.
    if (context instanceof ReportFormulaContext == false)
    {
      return new TypeValuePair(ErrorType.TYPE, new LibFormulaErrorValue
          (LibFormulaErrorValue.ERROR_REFERENCE_NOT_RESOLVABLE));
    }

    final ReportFormulaContext reportFormulaContext =
        (ReportFormulaContext) context;
    final Object declaringElement = reportFormulaContext.getDeclaringElement();
    if (declaringElement instanceof Element == false)
    {
      return new TypeValuePair(ErrorType.TYPE, new LibFormulaErrorValue
          (LibFormulaErrorValue.ERROR_REFERENCE_NOT_RESOLVABLE));
    }

    final Element element = (Element) declaringElement;

    if (parameters.getParameterCount() == 1)
    {
      final String value = (String) parameters.getValue(0);
      return new TypeValuePair(AnyType.TYPE, element.getAttribute(value));
    }
    else if (parameters.getParameterCount() == 2)
    {
      final String namespace = (String) parameters.getValue(0);
      final String attrName = (String) parameters.getValue(1);
      return new TypeValuePair(AnyType.TYPE,
          element.getAttribute(namespace, attrName));
    }
    return new TypeValuePair(ErrorType.TYPE, new LibFormulaErrorValue
        (LibFormulaErrorValue.ERROR_INVALID_ARGUMENT));
  }
View Full Code Here

      return flags.isChanged();
    }
    catch(Exception e)
    {
      throw new ContextEvaluationException
          (new LibFormulaErrorValue(LibFormulaErrorValue.ERROR_REFERENCE_NOT_RESOLVABLE));
    }
  }
View Full Code Here

      return dataRow.get(String.valueOf(name));
    }
    catch (DataSourceException e)
    {
      Log.debug ("Error while resolving formula reference: ", e);
      throw new ContextEvaluationException(new LibFormulaErrorValue
          (LibFormulaErrorValue.ERROR_REFERENCE_NOT_RESOLVABLE));
    }
  }
View Full Code Here

  {
    // we expect strings and will check, whether the reference for theses
    // strings is dirty.
    if (context instanceof ReportFormulaContext == false)
    {
      return new TypeValuePair(ErrorType.TYPE, new LibFormulaErrorValue
          (LibFormulaErrorValue.ERROR_REFERENCE_NOT_RESOLVABLE));
    }

    final ReportFormulaContext reportFormulaContext =
        (ReportFormulaContext) context;
    Object declaringElement = reportFormulaContext.getDeclaringElement();
    if (declaringElement instanceof Element == false)
    {
      return new TypeValuePair(ErrorType.TYPE, new LibFormulaErrorValue
          (LibFormulaErrorValue.ERROR_REFERENCE_NOT_RESOLVABLE));
    }

    final Element element = (Element) declaringElement;

    if (parameters.getParameterCount() == 1)
    {
      final String value = (String) parameters.getValue(0);
      return new TypeValuePair(AnyType.TYPE, element.getAttribute(value));
    }
    else if (parameters.getParameterCount() == 2)
    {
      final String namespace = (String) parameters.getValue(0);
      final String attrName = (String) parameters.getValue(1);
      return new TypeValuePair(AnyType.TYPE,
          element.getAttribute(namespace, attrName));
    }
    return new TypeValuePair(ErrorType.TYPE, new LibFormulaErrorValue
        (LibFormulaErrorValue.ERROR_INVALID_ARGUMENT));
  }
View Full Code Here

TOP

Related Classes of org.jfree.formula.LibFormulaErrorValue

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.