Package org.pentaho.reporting.libraries.xmlns.parser

Examples of org.pentaho.reporting.libraries.xmlns.parser.ParseException


      throws SAXException
  {
    final String className = CompatibilityMapperUtil.mapClassName(attrs.getValue(getUri(), "class"));
    if (className == null)
    {
      throw new ParseException("Attribute 'class' is missing.",
          getRootHandler().getDocumentLocator());
    }
    final StyleKeyFactoryCollector fc =
        (StyleKeyFactoryCollector) getRootHandler().getHelperObject
            (ReportDefinitionReadHandler.STYLE_FACTORY_KEY);
View Full Code Here


      throws SAXException
  {
    final String className = CompatibilityMapperUtil.mapClassName(attrs.getValue(getUri(), "class"));
    if (className == null)
    {
      throw new ParseException("Attribute 'class' is missing.",
          getRootHandler().getDocumentLocator());
    }
    final TemplateCollector fc =
        (TemplateCollector) getRootHandler().getHelperObject
            (ReportDefinitionReadHandler.TEMPLATE_FACTORY_KEY);
View Full Code Here

      throws SAXException
  {
    final String name = attrs.getValue(getUri(), "name");
    if (name == null)
    {
      throw new ParseException
          ("Required attribute 'name' is missing.",
              getRootHandler().getDocumentLocator());
    }
    final ElementStyleSheet parent = styleSheetCollection.getStyleSheet(name);
    if (parent == null)
    {
      throw new ParseException
          ("Specified parent stylesheet is not defined.",
              getRootHandler().getDocumentLocator());
    }
    styleSheet.addParent(parent);
  }
View Full Code Here

    }
    if ("no-data-band".equals(elementType))
    {
      return new NoDataBand();
    }
    throw new ParseException("Unregognized root level type");
  }
View Full Code Here

      throws SAXException
  {
    final String className = CompatibilityMapperUtil.mapClassName(attrs.getValue(getUri(), "class"));
    if (className == null)
    {
      throw new ParseException("Attribute 'class' is missing.",
          getRootHandler().getDocumentLocator());
    }
    final DataSourceCollector fc =
        (DataSourceCollector) getRootHandler().getHelperObject
            (ReportDefinitionReadHandler.DATASOURCE_FACTORY_KEY);
View Full Code Here

      throws SAXException
  {
    final String typeName = attrs.getValue(getUri(), "type");
    if (typeName == null)
    {
      throw new ParseException("The datasource type must be specified",
          getRootHandler().getDocumentLocator());
    }

    final DataSourceCollector fc = (DataSourceCollector) getRootHandler()
        .getHelperObject(ReportDefinitionReadHandler.DATASOURCE_FACTORY_KEY);
    final ObjectDescription od = fc.getDataSourceDescription(typeName);
    if (od == null)
    {
      throw new ParseException("The specified DataSource type is not defined", getLocator());
    }
    setObjectDescription(od);
  }
View Full Code Here

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

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

    name = attrs.getValue(getUri(), "name");
    if (name == null)
    {
      throw new ParseException("Required attribute 'name' is missing.", getLocator());
    }

    final String type = attrs.getValue(getUri(), "type");
    final String rawValue = attrs.getValue(getUri(), "value");
    if (rawValue == null)
    {
      value = null;
    }
    else if (type == null)
    {
      value = rawValue;
    }
    else
    {
      try
      {
        final ClassLoader loader = ObjectUtilities.getClassLoader(MetaSelectorReadHandler.class);
        final Class aClass = Class.forName(CompatibilityMapperUtil.mapClassName(type), false, loader);
        value = ConverterRegistry.toPropertyValue(rawValue, aClass);
      }
      catch (ClassNotFoundException e)
      {
        throw new ParseException("Required attribute 'type' is invalid.", e, getLocator());
      }
      catch (BeanException e)
      {
        throw new ParseException("Required attribute 'value' is invalid.", e, getLocator());
      }
    }
  }
View Full Code Here

      throws SAXException
  {
    final String className = CompatibilityMapperUtil.mapClassName(attrs.getValue(getUri(), "class"));
    if (className == null)
    {
      throw new ParseException("Attribute 'class' is missing.",
          getRootHandler().getDocumentLocator());
    }
    final ElementFactoryCollector fc =
        (ElementFactoryCollector) getRootHandler().getHelperObject
            (ReportDefinitionReadHandler.ELEMENT_FACTORY_KEY);
View Full Code Here

      throws SAXException
  {
    String className = CompatibilityMapperUtil.mapClassName(attrs.getValue(getUri(), "class"));
    if (className == null)
    {
      throw new ParseException("Attribute 'class' is missing.",
          getRootHandler().getDocumentLocator());
    }

    // some legacy mappings (0.8.7 and before)
    if ("org.jfree.xml.factory.objects.ArrayClassFactory".equals(className))
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.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.