Package org.jfree.xmlns.parser

Examples of org.jfree.xmlns.parser.ParseException


  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();
    final 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

      provider = (ConnectionProvider)
              getRootHandler().getHelperObject("connection-provider");
    }
    if (provider == null)
    {
      throw new ParseException
          ("Unable to create SQL Factory: No connection provider.", getLocator());
    }

    final SQLReportDataFactory srdf = new SQLReportDataFactory(provider);
    if (configReadHandler != null)
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

        }
      }
    }
    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

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.