private static Episode parseEpisodeInfo ( Element eEpisodeInfo ) { Episode episode = new Episode ( ) ; episode . setTitle ( DOMHelper . getValueFromElement ( eEpisodeInfo , TITLE ) ) ; episode . setAirDate ( DOMHelper . getValueFromElement ( eEpisodeInfo , AIRDATE ) ) ; episode . setLink ( DOMHelper . getValueFromElement ( eEpisodeInfo , "url" ) ) ; episode . setSummary ( DOMHelper . getValueFromElement ( eEpisodeInfo , SUMMARY ) ) ; // Process the season & episode field Pattern pattern = Pattern . compile ( "(\\d*)[x](\\d*)" ) ; Matcher matcher = pattern . matcher ( DOMHelper . getValueFromElement ( eEpisodeInfo , "number" ) ) ; if ( matcher . find ( ) ) { EpisodeNumber en = new EpisodeNumber ( ) ; en . setSeason ( matcher . group ( MATCH_SEASON ) ) ; en . setEpisode ( matcher . group ( MATCH_EPISODE ) ) ; episode . setEpisodeNumber ( en ) ; } return episode ; }
Parse the episode info node into an Episode object