Package org.jfree.xmlns.parser

Examples of org.jfree.xmlns.parser.ParseException


   */
  protected void doneParsing() throws SAXException
  {
    if (queryReadHandler == null)
    {
      throw new ParseException
              ("Required element 'query' is missing.", getLocator());
    }
    super.doneParsing();
    JFreeReport report = (JFreeReport) getElement();
    report.setQuery(queryReadHandler.getResult());
View Full Code Here


        }
      }
    }
    catch (BeanException e)
    {
      throw new ParseException("Unable to set attribute '" + getName() + "'", e, getLocator());
    }
    catch (ClassNotFoundException e)
    {
      throw new ParseException("Unable to set attribute '" + getName() + "'", e, getLocator() );
    }
    catch (IOException e)
    {
      throw new ParseException("Unable to set attribute '" + getName() + "'", e, getLocator());
    }
  }
View Full Code Here

  {
    final String styleKey = attrs.getValue
        (FlowReportFactoryModule.NAMESPACE, "style-key");
    if (styleKey == null)
    {
      throw new ParseException
          ("Required attribute stylekey is missing.", getLocator());
    }
    this.styleKey = styleKey;
    super.startParsing(attrs);
  }
View Full Code Here

        getRootHandler().getDependencyCollector().add(resource);
        styleSheet = (StyleSheet) resource.getResource();
      }
      catch (ResourceKeyCreationException e)
      {
        throw new ParseException
            ("Unable to derive key for " + key + " and " + href, getLocator());
      }
      catch (ResourceCreationException e)
      {
        Log.warn("Unable to parse resource for " + key + " and " + href);
View Full Code Here

      }
    }
    catch (BeanException e)
    {
      e.printStackTrace();
      throw new ParseException("Unable to assign property '" + getName()
              + "' to expression '" + expressionName + "'", e, getLocator());
    }
    catch (ClassNotFoundException e)
    {
      throw new ParseException("Unable to assign property '" + getName()
              + "' to expression '" + expressionName + "'", e, getLocator());
    }
    catch (IOException e)
    {
      throw new ParseException("Unable to assign property '" + getName()
              + "' to expression '" + expressionName + "'", e, getLocator());
    }
  }
View Full Code Here

    {
      plainContent = false;
      final String name = atts.getValue(uri, "name");
      if (name == null)
      {
        throw new ParseException("Required attribute 'name' is missing", getLocator());
      }
      try
      {
        final Class type = beanUtility.getPropertyType(name);
        final Object property = type.newInstance();
        final BeanUtility propertyUtility = new BeanUtility(property);
        return new TypedPropertyReadHandler
                (propertyUtility, expressionName, entityParser);
      }
      catch (BeanException e)
      {
        throw new ParseException("Property '" + name + "' for expression '" +
                className + "' is not valid. The specified class was not found.",
                e, getRootHandler().getDocumentLocator());
      }
      catch (IllegalAccessException e)
      {
        throw new ParseException(
                "Property '" + name + "' for expression '" + className +
                        "' is not valid. The specified class was not found.",
                e, getRootHandler().getDocumentLocator());
      }
      catch (InstantiationException e)
      {
        throw new ParseException(
                "Property '" + name + "' for expression '" + className +
                        "' is not valid. The specified class cannot be instantiated.",
                e, getRootHandler().getDocumentLocator());
      }
      catch (IntrospectionException e)
      {
        throw new ParseException(
                "Property '" + name + "' for expression '" + className +
                        "' is not valid. Introspection failed for this expression.",
                e, getRootHandler().getDocumentLocator());
      }
    }
View Full Code Here

    {
      return Integer.parseInt(text);
    }
    catch (NumberFormatException nfe)
    {
      throw new ParseException("NumberFormatError: " + message, locator);
    }
  }
View Full Code Here

                                 final Locator locator)
      throws ParseException
  {
    if (text == null)
    {
      throw new ParseException(message, locator);
    }
    try
    {
      return Float.parseFloat(text);
    }
    catch (NumberFormatException nfe)
    {
      throw new ParseException("NumberFormatError: " + message, locator);
    }
  }
View Full Code Here

    }
    else if ("false".equals(value))
    {
      return Boolean.FALSE;
    }
    throw new ParseException("Failed to parse value: Expected 'true' or 'false'", locator);
  }
View Full Code Here

      else
      {
        className = getDefaultClassName();
        if (className == null)
        {
          throw new ParseException("Required attribute 'class' is missing.",
              getRootHandler().getDocumentLocator());
        }
      }
    }

    if (expression == null)
    {
      expression = (Expression) ObjectUtilities.loadAndInstantiate
        (className, AbstractExpressionReadHandler.class, Expression.class);
      if (expression == null)
      {
        throw new ParseException("Expression '" + className +
            "' is not valid. The specified class is not an expression or function.",
             getRootHandler().getDocumentLocator());
      }
    }

    expression.setName(name);
    expression.setDeepTraversing("true".equals(attrs.getValue(getUri(), "deep-traversing")));
    expression.setPrecompute("true".equals(attrs.getValue(getUri(), "precompute")));
    expression.setPreserve("true".equals(attrs.getValue(getUri(), "preserve")));

    try
    {
      expressionBeanUtility = new BeanUtility(expression);
    }
    catch (ClassCastException e)
    {
      throw new ParseException("Expression '" + className +
          "' is not valid. The specified class is not an expression or function.",
          e, getRootHandler().getDocumentLocator());
    }
    catch (IntrospectionException e)
    {
      throw new ParseException("Expression '" + className +
          "' is not valid. Introspection failed for this expression.",
          e, getRootHandler().getDocumentLocator());
    }

  }
View Full Code Here

TOP

Related Classes of org.jfree.xmlns.parser.ParseException

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.