@Test public void testGetHandlerForChild() throws SAXException { XmlReadHandler childHandler = handler.getHandlerForChild( "incorrectUri", "tag", null ); assertThat( childHandler, is( nullValue() ) ); childHandler = handler.getHandlerForChild( URI, "tag", null ); assertThat( childHandler, is( nullValue() ) ); childHandler = handler.getHandlerForChild( URI, "formula-header", null ); assertThat( childHandler, is( notNullValue() ) ); assertThat( childHandler, is( instanceOf( FormulaHeaderReadHandler.class ) ) ); childHandler = handler.getHandlerForChild( URI, "static-header", null ); assertThat( childHandler, is( notNullValue() ) ); assertThat( childHandler, is( instanceOf( StaticHeaderReadHandler.class ) ) ); }
protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( isSameNamespace( uri ) == false ) { return null; } if ( "formula-header".equals( tagName ) ) { final FormulaHeaderReadHandler readHandler = new FormulaHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } if ( "static-header".equals( tagName ) ) { final StaticHeaderReadHandler readHandler = new StaticHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } return null; }
HeadersReadHandler extends AbstractXmlReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( isSameNamespace( uri ) == false ) { return null; } if ( "formula-header".equals( tagName ) ) { final FormulaHeaderReadHandler readHandler = new FormulaHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } if ( "static-header".equals( tagName ) ) { final StaticHeaderReadHandler readHandler = new StaticHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } return null; } }
HeadersReadHandler extends AbstractXmlReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( isSameNamespace( uri ) == false ) { return null; } if ( "formula-header".equals( tagName ) ) { final FormulaHeaderReadHandler readHandler = new FormulaHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } if ( "static-header".equals( tagName ) ) { final StaticHeaderReadHandler readHandler = new StaticHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } return null; } HeadersReadHandler(); }
HeadersReadHandler extends AbstractXmlReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( isSameNamespace( uri ) == false ) { return null; } if ( "formula-header".equals( tagName ) ) { final FormulaHeaderReadHandler readHandler = new FormulaHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } if ( "static-header".equals( tagName ) ) { final StaticHeaderReadHandler readHandler = new StaticHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } return null; } HeadersReadHandler(); Object getObject(); MailHeader[] getHeaders(); }
HeadersReadHandler extends AbstractXmlReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( isSameNamespace( uri ) == false ) { return null; } if ( "formula-header".equals( tagName ) ) { final FormulaHeaderReadHandler readHandler = new FormulaHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } if ( "static-header".equals( tagName ) ) { final StaticHeaderReadHandler readHandler = new StaticHeaderReadHandler(); headerReadHandlers.add( readHandler ); return readHandler; } return null; } HeadersReadHandler(); Object getObject(); MailHeader[] getHeaders();  }