@Test public void getDocumentSupport_recognized_by_tagname() { XmlDocumentInfo xmlDocumentInfo = mock( XmlDocumentInfo.class ); when( xmlDocumentInfo.getRootElement() ).thenReturn( "kettle-datasource" ); int actualValue = kettleDataSourceXmlFactoryModule.getDocumentSupport( xmlDocumentInfo ); assertEquals( XmlFactoryModule.RECOGNIZED_BY_TAGNAME, actualValue ); }
public int getDocumentSupport( final XmlDocumentInfo documentInfo ) { final String rootNamespace = documentInfo.getRootElementNameSpace(); if ( rootNamespace != null && rootNamespace.length() > 0 ) { if ( KettleDataFactoryModule.NAMESPACE.equals( rootNamespace ) == false ) { return NOT_RECOGNIZED; } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_NAMESPACE; } } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_TAGNAME; } return NOT_RECOGNIZED; }
KettleDataSourceXmlFactoryModule implements XmlFactoryModule { public int getDocumentSupport( final XmlDocumentInfo documentInfo ) { final String rootNamespace = documentInfo.getRootElementNameSpace(); if ( rootNamespace != null && rootNamespace.length() > 0 ) { if ( KettleDataFactoryModule.NAMESPACE.equals( rootNamespace ) == false ) { return NOT_RECOGNIZED; } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_NAMESPACE; } } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_TAGNAME; } return NOT_RECOGNIZED; } }
KettleDataSourceXmlFactoryModule implements XmlFactoryModule { public int getDocumentSupport( final XmlDocumentInfo documentInfo ) { final String rootNamespace = documentInfo.getRootElementNameSpace(); if ( rootNamespace != null && rootNamespace.length() > 0 ) { if ( KettleDataFactoryModule.NAMESPACE.equals( rootNamespace ) == false ) { return NOT_RECOGNIZED; } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_NAMESPACE; } } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_TAGNAME; } return NOT_RECOGNIZED; } KettleDataSourceXmlFactoryModule(); }
KettleDataSourceXmlFactoryModule implements XmlFactoryModule { public int getDocumentSupport( final XmlDocumentInfo documentInfo ) { final String rootNamespace = documentInfo.getRootElementNameSpace(); if ( rootNamespace != null && rootNamespace.length() > 0 ) { if ( KettleDataFactoryModule.NAMESPACE.equals( rootNamespace ) == false ) { return NOT_RECOGNIZED; } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_NAMESPACE; } } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_TAGNAME; } return NOT_RECOGNIZED; } KettleDataSourceXmlFactoryModule(); int getDocumentSupport( final XmlDocumentInfo documentInfo ); String getDefaultNamespace( final XmlDocumentInfo documentInfo ); XmlReadHandler createReadHandler( final XmlDocumentInfo documentInfo ); }
KettleDataSourceXmlFactoryModule implements XmlFactoryModule { public int getDocumentSupport( final XmlDocumentInfo documentInfo ) { final String rootNamespace = documentInfo.getRootElementNameSpace(); if ( rootNamespace != null && rootNamespace.length() > 0 ) { if ( KettleDataFactoryModule.NAMESPACE.equals( rootNamespace ) == false ) { return NOT_RECOGNIZED; } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_NAMESPACE; } } else if ( "kettle-datasource".equals( documentInfo.getRootElement() ) ) { return RECOGNIZED_BY_TAGNAME; } return NOT_RECOGNIZED; } KettleDataSourceXmlFactoryModule(); int getDocumentSupport( final XmlDocumentInfo documentInfo ); String getDefaultNamespace( final XmlDocumentInfo documentInfo ); XmlReadHandler createReadHandler( final XmlDocumentInfo documentInfo );  }