private static Banner parseNextBanner ( Element eBanner ) { Banner banner = new Banner ( ) ; String artwork ; artwork = DOMHelper . getValueFromElement ( eBanner , BANNER_PATH ) ; if ( ! artwork . isEmpty ( ) ) { banner . setUrl ( URL_BANNER + artwork ) ; } artwork = DOMHelper . getValueFromElement ( eBanner , VIGNETTE_PATH ) ; if ( ! artwork . isEmpty ( ) ) { banner . setVignette ( URL_BANNER + artwork ) ; } artwork = DOMHelper . getValueFromElement ( eBanner , THUMBNAIL_PATH ) ; if ( ! artwork . isEmpty ( ) ) { banner . setThumb ( URL_BANNER + artwork ) ; } banner . setId ( DOMHelper . getValueFromElement ( eBanner , "id" ) ) ; banner . setBannerType ( BannerListType . fromString ( DOMHelper . getValueFromElement ( eBanner , "BannerType" ) ) ) ; banner . setBannerType2 ( BannerType . fromString ( DOMHelper . getValueFromElement ( eBanner , "BannerType2" ) ) ) ; banner . setLanguage ( DOMHelper . getValueFromElement ( eBanner , LANGUAGE ) ) ; banner . setSeason ( DOMHelper . getValueFromElement ( eBanner , "Season" ) ) ; banner . setColours ( DOMHelper . getValueFromElement ( eBanner , "Colors" ) ) ; banner . setRating ( DOMHelper . getValueFromElement ( eBanner , RATING ) ) ; banner . setRatingCount ( DOMHelper . getValueFromElement ( eBanner , "RatingCount" ) ) ; try { banner . setSeriesName ( Boolean . parseBoolean ( DOMHelper . getValueFromElement ( eBanner , SERIES_NAME ) ) ) ; } catch ( WebServiceException ex ) { LOG . trace ( "Failed to transform SeriesName to boolean" , ex ) ; banner . setSeriesName ( false ) ; } return banner ; }
Parse the banner record from the document