@Test public void testGetHandlerForChild() throws Exception { handler.init( rootXmlReadHandler, URI, TAG_NAME ); XmlReadHandler result = handler.getHandlerForChild( "__uri", "tagName", null ); assertThat( result, is( nullValue() ) ); result = handler.getHandlerForChild( URI, "tagName", null ); assertThat( result, is( nullValue() ) ); result = handler.getHandlerForChild( URI, "config", null ); assertThat( result, is( notNullValue() ) ); assertThat( result, is( instanceOf( ConfigReadHandler.class ) ) ); result = handler.getHandlerForChild( URI, "query", null ); assertThat( result, is( notNullValue() ) ); assertThat( result, is( instanceOf( PropertyReadHandler.class ) ) ); }
protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( !isSameNamespace( uri ) ) { return null; } if ( "config".equals( tagName ) ) { configReadHandler = new ConfigReadHandler(); return configReadHandler; } if ( "query".equals( tagName ) ) { final PropertyReadHandler queryReadHandler = new PropertyReadHandler(); queries.add( queryReadHandler ); return queryReadHandler; } return null; }
ScriptableDataSourceReadHandler extends AbstractXmlReadHandler implements DataFactoryReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( !isSameNamespace( uri ) ) { return null; } if ( "config".equals( tagName ) ) { configReadHandler = new ConfigReadHandler(); return configReadHandler; } if ( "query".equals( tagName ) ) { final PropertyReadHandler queryReadHandler = new PropertyReadHandler(); queries.add( queryReadHandler ); return queryReadHandler; } return null; } }
ScriptableDataSourceReadHandler extends AbstractXmlReadHandler implements DataFactoryReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( !isSameNamespace( uri ) ) { return null; } if ( "config".equals( tagName ) ) { configReadHandler = new ConfigReadHandler(); return configReadHandler; } if ( "query".equals( tagName ) ) { final PropertyReadHandler queryReadHandler = new PropertyReadHandler(); queries.add( queryReadHandler ); return queryReadHandler; } return null; } ScriptableDataSourceReadHandler(); }
ScriptableDataSourceReadHandler extends AbstractXmlReadHandler implements DataFactoryReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( !isSameNamespace( uri ) ) { return null; } if ( "config".equals( tagName ) ) { configReadHandler = new ConfigReadHandler(); return configReadHandler; } if ( "query".equals( tagName ) ) { final PropertyReadHandler queryReadHandler = new PropertyReadHandler(); queries.add( queryReadHandler ); return queryReadHandler; } return null; } ScriptableDataSourceReadHandler(); Object getObject(); DataFactory getDataFactory(); }
ScriptableDataSourceReadHandler extends AbstractXmlReadHandler implements DataFactoryReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( !isSameNamespace( uri ) ) { return null; } if ( "config".equals( tagName ) ) { configReadHandler = new ConfigReadHandler(); return configReadHandler; } if ( "query".equals( tagName ) ) { final PropertyReadHandler queryReadHandler = new PropertyReadHandler(); queries.add( queryReadHandler ); return queryReadHandler; } return null; } ScriptableDataSourceReadHandler(); Object getObject(); DataFactory getDataFactory();  }