@Test( expected = ParseException.class ) public void testStartParsingWithoutFormula() throws SAXException { XMLAttributesImpl attrs = new XMLAttributesImpl(); attrs.addAttribute( new QName( null, "name", null, URI ), ATTR_TYPE, NAME_VALUE ); attrs.addAttribute( new QName( null, "formula", null, URI ), ATTR_TYPE, null ); AttributesProxy fAttributesProxy = new AttributesProxy( attrs ); handler.startParsing( fAttributesProxy ); }
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() ); } }
FormulaHeaderReadHandler extends AbstractXmlReadHandler { 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() ); } } }
FormulaHeaderReadHandler extends AbstractXmlReadHandler { 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() ); } } FormulaHeaderReadHandler(); }
FormulaHeaderReadHandler extends AbstractXmlReadHandler { 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() ); } } FormulaHeaderReadHandler(); Object getObject(); }
FormulaHeaderReadHandler extends AbstractXmlReadHandler { 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() ); } } FormulaHeaderReadHandler(); Object getObject();  }