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

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


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

    final ClassFactory fact = getClassFactory();
    final ObjectDescription currentOd = getObjectDescription();
    final Class paramDesc = currentOd.getParameterDefinition(name);
    if (paramDesc == null)
    {
      currentOd.getParameterDefinition(name);
      throw new ParseException
          ("The parameter type for '" + name + "' is not known.", getLocator());
    }
    final ObjectDescription objectDescription =
        ObjectFactoryUtility.findDescription(fact, paramDesc, getLocator());
View Full Code Here


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

    final ClassFactory fact = getClassFactory();
    final ObjectDescription currentObjDesc = getObjectDescription();
    final Class parameterDefinition =
        currentObjDesc.getParameterDefinition(name);
    if (parameterDefinition == null)
    {
      throw new ParseException("No such parameter description: " + name, getLocator());
    }
    final ObjectDescription objectDescription =
        ObjectFactoryUtility.findDescription(fact,
            parameterDefinition, getLocator());
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.");
      }
    }

  }
View Full Code Here

    {
      report.setGroups((GroupList) groupList.clone());
    }
    catch (CloneNotSupportedException e)
    {
      throw new ParseException("Failed to add group-list to report", getLocator());
    }
  }
View Full Code Here

    super.startParsing(atts);

    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

    {
      report.setGroups((GroupList) groupList.clone());
    }
    catch (CloneNotSupportedException e)
    {
      throw new ParseException("Failed to add group-list to report", getLocator());
    }
  }
View Full Code Here

      throws SAXException
  {
    final String templateName = attrs.getValue(getUri(), "name");
    if (nameRequired && templateName == null)
    {
      throw new ParseException("The 'name' attribute is required for template definitions",
          getRootHandler().getDocumentLocator());
    }
    final String references = attrs.getValue(getUri(), "references");
    if (references == null)
    {
      throw new ParseException("The 'references' attribute is required for template definitions",
          getRootHandler().getDocumentLocator());
    }
    TemplateDescription template = templateCollection.getTemplate(references);
    if (template == null)
    {
      throw new ParseException("The template '" + references + "' is not defined",
          getRootHandler().getDocumentLocator());
    }

    // Clone the defined template ... we don't change the original ..
    template = (TemplateDescription) template.getInstance();
View Full Code Here

    fieldName = atts.getValue(getUri(), "fieldname");
    formula = atts.getValue(getUri(), "formula");

    if (formula == null && fieldName == null)
    {
      throw new ParseException
          ("Either 'fieldname' or 'formula' attribute must be given.", getLocator());
    }
  }
View Full Code Here

    final ObjectDescription indirectMatch = cf.getSuperClassObjectDescription(c, null);
    if (indirectMatch != null)
    {
      return indirectMatch;
    }
    throw new ParseException
        ("No object description found for '" + c + '\'', locator);
  }
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.