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

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


  protected void startParsing(final Attributes attrs) throws SAXException
  {
    styleKey = StyleKey.getStyleKey(attrs.getValue(getUri(), "styleKeyName"));
    if (styleKey == null)
    {
      throw new ParseException("No such style-key", getLocator());
    }

    formula = attrs.getValue(getUri(), "expression");
  }
View Full Code Here


    {
      return Float.valueOf(s.trim());
    }
    catch (NumberFormatException nfe)
    {
      throw new ParseException(nfe.getMessage(), locator);
    }
  }
View Full Code Here

    {
      return Integer.valueOf(s.trim());
    }
    catch (NumberFormatException nfe)
    {
      throw new ParseException(nfe.getMessage(), locator);
    }
  }
View Full Code Here

    {
      return new URL(s);
    }
    catch (MalformedURLException e)
    {
      throw new ParseException(e.getMessage());
    }
  }
View Full Code Here

    {
      return Long.valueOf(s.trim());
    }
    catch (NumberFormatException nfe)
    {
      throw new ParseException(nfe.getMessage(), locator);
    }
  }
View Full Code Here

    {
      return Double.valueOf(s.trim());
    }
    catch (NumberFormatException nfe)
    {
      throw new ParseException(nfe.getMessage(), locator);
    }
  }
View Full Code Here

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

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

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

  protected void startParsing(final Attributes attrs) throws SAXException
  {
    name = attrs.getValue(getUri(), "name"); // NON-NLS
    if (name == null)
    {
      throw new ParseException("Attribute 'name' is undefined.", getLocator()); // NON-NLS
    }
    bundleName = attrs.getValue(getUri(), "bundle-name"); // NON-NLS
    if (bundleName == null)
    {
      throw new ParseException("Attribute 'bundle-name' is undefined.", getLocator()); // NON-NLS
    }
    expert = "true".equals(attrs.getValue(getUri(), "expert")); // NON-NLS
    hidden = "true".equals(attrs.getValue(getUri(), "hidden")); // NON-NLS
    preferred = "true".equals(attrs.getValue(getUri(), "preferred")); // NON-NLS
    deprecated = "true".equals(attrs.getValue(getUri(), "deprecated")); // NON-NLS

    final String valueTypeText = attrs.getValue(getUri(), "class"); // NON-NLS
    if (valueTypeText != null)
    {
      try
      {
        final ClassLoader loader = ObjectUtilities.getClassLoader(DrillDownProfileReadHandler.class);
        linkCustomizerType = Class.forName(valueTypeText, false, loader);
        if (LinkCustomizer.class.isAssignableFrom(linkCustomizerType) == false)
        {
          //noinspection ThrowCaughtLocally
          throw new ParseException("Attribute 'class' is not valid", getLocator()); // NON-NLS
        }
      }
      catch (ParseException pe)
      {
        throw pe;
      }
      catch (Exception e)
      {
        throw new ParseException("Attribute 'class' is not valid", e, getLocator()); // NON-NLS
      }
    }
    else
    {
      linkCustomizerType = PatternLinkCustomizer.class;
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.