Package org.jfree.xmlns.parser

Examples of org.jfree.xmlns.parser.ParseException


            throws SAXException
    {
        final String formula = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "formula");
        if (formula == null)
        {
            throw new ParseException("Required attribute 'formula' is missing", getLocator());
        }
       
        final String name = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "name");
        if (name == null)
        {
            throw new ParseException("Required attribute 'name' is missing", getLocator());
        }
        final String initialFormula = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "initial-formula");
        final String deepTraversing = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "deep-traversing");

        if (initialFormula != null)
View Full Code Here


  {
    final String elementNamespace = attrs.getValue(getUri(),
        "element-namespace");
    if (elementNamespace == null)
    {
      throw new ParseException
          ("Required attribute 'element-namespace' is missing", getLocator());
    }

    final String elementName = attrs.getValue(getUri(), "element-name");

    if (elementName == null)
    {
      throw new ParseException
          ("Required attribute 'element-name' is missing", getLocator());
    }

    final String attributeNamespace = attrs.getValue(getUri(),
        "attribute-namespace");
View Full Code Here

       
        final String formula =
                attrs.getValue(OfficeNamespaces.OOREPORT_NS, "formula");
        if (formula == null)
        {
            throw new ParseException("Required attribute 'formula' is missing.", getLocator());
        }
        final String stylename =
                attrs.getValue(OfficeNamespaces.OOREPORT_NS, OfficeToken.STYLE_NAME);
        if (stylename == null)
        {
            throw new ParseException("Required attribute 'style-name' is missing.", getLocator());
        }
        final FormulaExpression valueExpression = new FormulaExpression();
        valueExpression.setFormula(formula);

        final String enabledText = attrs.getValue(OfficeNamespaces.OOREPORT_NS, "enabled");
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

  protected void startParsing(final Attributes attrs) throws SAXException
  {
    name = attrs.getValue(getUri(), "name");
    if (name == null)
    {
      throw new ParseException
          ("Required attribute 'name' is missing.", getLocator());
    }
    alias = attrs.getValue(getUri(), "alias");
    if (alias == null)
    {
View Full Code Here

   */
  protected void doneParsing() throws SAXException
  {
    if (groupingExpressionReadHandler == null)
    {
      throw new ParseException
          ("Required element 'grouping-expression' is missing.", getLocator());
    }

    super.doneParsing();
    Group group = (Group) getElement();
View Full Code Here

  protected void startParsing(final Attributes attrs) throws SAXException
  {
    final String value = attrs.getValue(getUri(), "operation");
    if (value == null)
    {
      throw new ParseException("Required attribute 'operation' is missing.", getLocator());
    }
    final String valueTrimmed = value.trim();
    if (FlowControlOperation.ADVANCE.toString().equals(valueTrimmed))
    {
      operation = FlowControlOperation.ADVANCE;
    }
    else if (FlowControlOperation.COMMIT.toString().equals(valueTrimmed))
    {
      operation = FlowControlOperation.COMMIT;
    }
    else if (FlowControlOperation.DONE.toString().equals(valueTrimmed))
    {
      operation = FlowControlOperation.DONE;
    }
    else if (FlowControlOperation.MARK.toString().equals(valueTrimmed))
    {
      operation = FlowControlOperation.MARK;
    }
    else if (FlowControlOperation.NO_OP.toString().equals(valueTrimmed))
    {
      operation = FlowControlOperation.NO_OP;
    }
    else if (FlowControlOperation.RECALL.toString().equals(valueTrimmed))
    {
      operation = FlowControlOperation.RECALL;
    }
    else
    {
      throw new ParseException("attribute 'operation' has an invalid value.", getLocator());
    }
  }
View Full Code Here

  protected void doneParsing() throws SAXException
  {
    super.doneParsing();
    if (nameReadHandler == null)
    {
      throw new ParseException
          ("Required element 'attribute-name' is missing.", getLocator());
    }

    attributeName = nameReadHandler.getResult();
View Full Code Here

  {
    super.startParsing(attrs);
    final String href = attrs.getValue(getUri(), "href");
    if (href == null)
    {
      throw new ParseException("Required attribute 'href' is missing.", getLocator());
    }
    final ResourceKey key = getRootHandler().getSource();
    final ResourceManager manager = getRootHandler().getResourceManager();
    try
    {
      final ResourceKey derivedKey = manager.deriveKey(key, href);
      final Resource resource = manager.create(derivedKey, null, ReportDataFactory.class);
      getRootHandler().getDependencyCollector().add(resource);
      dataFactory = (ReportDataFactory) resource.getResource();
    }
    catch (ResourceKeyCreationException e)
    {
      throw new ParseException
          ("Unable to derive key for " + key + " and " + href, getLocator());
    }
    catch (ResourceCreationException e)
    {
      throw new ParseException
          ("Unable to parse resource for " + key + " and " + href, getLocator());
    }
    catch (ResourceLoadingException e)
    {
      throw new ParseException
          ("Unable to load resource data for " + key + " and " + href, getLocator());
    }
    catch (ResourceException e)
    {
      throw new ParseException("Unable to parse resource for " + key + " and " + href, getLocator());
    }
  }
View Full Code Here

              (ParameterMappingReadHandler) exportParameters.get(i);
      report.addExportParameter(handler.getAlias(), handler.getName());
    }
    if (queryReadHandler == null)
    {
      throw new ParseException("Query is not specified.", getLocator());
    }
    final String result = queryReadHandler.getResult();
    report.setQuery(result);
  }
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.