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

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


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

    preProcessor = (ReportPreProcessor) ObjectUtilities.loadAndInstantiate
        (CompatibilityMapperUtil.mapClassName(preprocessorClass),
            LayoutPreprocessorReadHandler.class, ReportPreProcessor.class);
    if (preProcessor == null)
    {
      throw new ParseException("Failed to instantiate the specified preprocessor '" + preprocessorClass + '\'',
          getLocator());
    }

    try
    {
      this.beanUtility = new BeanUtility(preProcessor);
    }
    catch (IntrospectionException e)
    {
      throw new ParseException("Failed to introspect the specified preprocessor '" + preprocessorClass + '\'',
          getLocator());
    }
  }
View Full Code Here


      throws SAXException
  {
    final String fieldName = atts.getValue(getUri(), "fieldname");
    if (fieldName == null)
    {
      throw new ParseException("Required attribute 'fieldname' is missing.", getLocator());
    }
    elementFactory.setFieldname(fieldName);
  }
View Full Code Here

      {
        groupList.add((RelationalGroup) g);
      }
      else
      {
        throw new ParseException("The existing report contains non-default groups. " +
            "This parser cannot handle such a construct.");
      }
    }

    final RootXmlReadHandler parser = getRootHandler();
View Full Code Here

    {
      orientationVal = PageFormat.PORTRAIT;
    }
    else
    {
      throw new ParseException("Orientation value in REPORT-Tag is invalid.",
          getRootHandler().getDocumentLocator());
    }
    if (pageformatName != null)
    {
      final Paper p = PageFormatFactory.getInstance().createPaper(pageformatName);
View Full Code Here

    catch (InstantiationException e)
    {
      // This should not happen at this point, as there is no way to instantiate the class if the
      // element is not there. But it could happen if the element is not registered, which indicates
      // a user error (Engine not booted).
      throw new ParseException("Unable to instantiate element for type '" + elementType + '"');
    }
  }
View Full Code Here

      final GroupList groupList1 = (GroupList) groupList.clone();
      report.setGroups(groupList1);
    }
    catch (CloneNotSupportedException e)
    {
      throw new ParseException("Failed to add group-list to report", getLocator());
    }

    report.setAttribute(AttributeNames.Internal.NAMESPACE, AttributeNames.Internal.FILEFORMAT, "simple-xml");
  }
View Full Code Here

        element.setAttribute(namespace, name, attributeValue);
        return;
      }
      catch (MalformedURLException e)
      {
        throw new ParseException("Failed to parse URL value", e);
      }
      catch (ResourceKeyCreationException e)
      {
        throw new ParseException("Failed to parse resource-key value", e);
      }
    }

    final Class type = attributeMetaData.getTargetType();
    if (String.class.equals(type))
View Full Code Here

    else
    {
      final String formula = atts.getValue(getUri(), "formula");
      if (formula == null)
      {
        throw new ParseException
            ("Either 'fieldname' or 'formula' attribute must be given.", getLocator());
      }
      elementFactory.setFormula(formula);
    }
  }
View Full Code Here

    {
      orientationVal = PageFormat.PORTRAIT;
    }
    else
    {
      throw new ParseException("Orientation value in REPORT-Tag is invalid.",
          getRootHandler().getDocumentLocator());
    }
    if (pageformatName != null)
    {
      final Paper p = PageFormatFactory.getInstance().createPaper(pageformatName);
View Full Code Here

    else
    {
      final String formula = atts.getValue(getUri(), "formula");
      if (formula == null)
      {
        throw new ParseException
            ("Either 'fieldname' or 'formula' attribute must be given.", getLocator());
      }
      textFieldElementFactory.setFormula(formula);
    }
  }
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.