org.stanwood.media.store.memory
Class CacheShow

java.lang.Object
  extended by org.stanwood.media.model.Show
      extended by org.stanwood.media.store.memory.CacheShow
All Implemented Interfaces:
IShow, IVideoCertification, IVideoExtra, IVideoGenre

public class CacheShow
extends Show

Used to create a cache of the TV show data


Constructor Summary
CacheShow(IShow show)
          Used to create a instance of the cache show
 
Method Summary
 void addGenre(java.lang.String genre)
          Used to add a genre to the show
 void addSeason(CacheSeason season)
          Used to add a season to the show.
 java.util.Map<java.lang.String,java.lang.String> getExtraInfo()
          Used to get extra information to a show that their are no getters/setters for in the regular fields
 java.util.List<java.lang.String> getGenres()
          Used to get the genres that the show belongs too
 java.net.URL getImageURL()
          Used to get a URL which points too a image of the show
 java.lang.String getLongSummary()
          Used to get a long summary of the show
 java.lang.String getName()
          Used to get the name/title of the show
 java.lang.String getPreferredGenre()
          This is useful if the film belongs to more than one genres.
 ISeason getSeason(int seasonNum)
          Used to get a season from the show with the given season number.
 java.util.List<CacheSeason> getSeasons()
          Used to get a list of seasons in the show
 java.lang.String getShortSummary()
          Used to get a short summary of the show
 java.lang.String getShowId()
          Used to get the id of the show, which was defined by the source it was fetched from.
 java.net.URL getShowURL()
          Used to get a URL which points to a summary of the show
 java.lang.String getSourceId()
          Used to get the source id of the source that was used to retrieve the shows information.
 void removeSeason(int seasonNumber)
          Used to remove a season with the given season number from the show.
 void setExtraInfo(java.util.Map<java.lang.String,java.lang.String> params)
          Used to add extra information to a show that their are no getters/setters for in the regular fields
 void setGenres(java.util.List<java.lang.String> genres)
          Used to set the genres that the show belongs too
 void setImageURL(java.net.URL imageURL)
          Used to set a URL which points too a image of the show
 void setLongSummary(java.lang.String longSummary)
          Used to set the long summary of the show
 void setName(java.lang.String name)
          Used to set the name/title of the show
 void setPreferredGenre(java.lang.String preferredGenre)
          Used to set the genre that is preferred in the list of genres.
 void setShortSummary(java.lang.String shortSummary)
          Used to set the show summary of the show
 void setShowURL(java.net.URL showURL)
          Used too set the URL which points to a summary of the show
 void setSourceId(java.lang.String sourceId)
          Used to set the source id of the source that was used to retrieve the shows information.
 
Methods inherited from class org.stanwood.media.model.Show
getCertifications, getStudio, setCertifications, setStudio, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheShow

public CacheShow(IShow show)
Used to create a instance of the cache show

Parameters:
show - The show that is been cached
Method Detail

getSeason

public ISeason getSeason(int seasonNum)
Used to get a season from the show with the given season number. If the season can't be found, then it will return null.

Parameters:
seasonNum - The number of the season too fetch.
Returns:
The season, or null if it can't be found

removeSeason

public void removeSeason(int seasonNumber)
Used to remove a season with the given season number from the show.

Parameters:
seasonNumber - The season number of the season to remove

addSeason

public void addSeason(CacheSeason season)
Used to add a season to the show.

Parameters:
season - The season to add to the show.

setLongSummary

public void setLongSummary(java.lang.String longSummary)
Used to set the long summary of the show

Specified by:
setLongSummary in interface IShow
Overrides:
setLongSummary in class Show
Parameters:
longSummary - The long summary of the show

setShortSummary

public void setShortSummary(java.lang.String shortSummary)
Used to set the show summary of the show

Specified by:
setShortSummary in interface IShow
Overrides:
setShortSummary in class Show
Parameters:
shortSummary - The short summary iof the show

setGenres

public void setGenres(java.util.List<java.lang.String> genres)
Used to set the genres that the show belongs too

Specified by:
setGenres in interface IVideoGenre
Overrides:
setGenres in class Show
Parameters:
genres - The genres that the show belongs too

setName

public void setName(java.lang.String name)
Used to set the name/title of the show

Specified by:
setName in interface IShow
Overrides:
setName in class Show
Parameters:
name - The name of the show

setShowURL

public void setShowURL(java.net.URL showURL)
Used too set the URL which points to a summary of the show

Specified by:
setShowURL in interface IShow
Overrides:
setShowURL in class Show
Parameters:
showURL - The URL which points to a summary of the show

getLongSummary

public java.lang.String getLongSummary()
Used to get a long summary of the show

Specified by:
getLongSummary in interface IShow
Overrides:
getLongSummary in class Show
Returns:
The long summary of the show

getShortSummary

public java.lang.String getShortSummary()
Used to get a short summary of the show

Specified by:
getShortSummary in interface IShow
Overrides:
getShortSummary in class Show
Returns:
The short summary of the show

getGenres

public java.util.List<java.lang.String> getGenres()
Used to get the genres that the show belongs too

Specified by:
getGenres in interface IVideoGenre
Overrides:
getGenres in class Show
Returns:
The genres the show belongs too

getName

public java.lang.String getName()
Used to get the name/title of the show

Specified by:
getName in interface IShow
Overrides:
getName in class Show
Returns:
The name/title of the show

getShowId

public java.lang.String getShowId()
Used to get the id of the show, which was defined by the source it was fetched from.

Specified by:
getShowId in interface IShow
Overrides:
getShowId in class Show
Returns:
The show id

getImageURL

public java.net.URL getImageURL()
Used to get a URL which points too a image of the show

Specified by:
getImageURL in interface IShow
Overrides:
getImageURL in class Show
Returns:
A URL which points too a image of the show

setImageURL

public void setImageURL(java.net.URL imageURL)
Used to set a URL which points too a image of the show

Specified by:
setImageURL in interface IShow
Overrides:
setImageURL in class Show
Parameters:
imageURL - A URL which points too a image of the show

getShowURL

public java.net.URL getShowURL()
Used to get a URL which points to a summary of the show

Specified by:
getShowURL in interface IShow
Overrides:
getShowURL in class Show
Returns:
The URL which points to a summary of the show

getSourceId

public java.lang.String getSourceId()
Used to get the source id of the source that was used to retrieve the shows information.

Specified by:
getSourceId in interface IShow
Overrides:
getSourceId in class Show
Returns:
The source id

setSourceId

public void setSourceId(java.lang.String sourceId)
Used to set the source id of the source that was used to retrieve the shows information.

Specified by:
setSourceId in interface IShow
Overrides:
setSourceId in class Show
Parameters:
sourceId - The source id

addGenre

public void addGenre(java.lang.String genre)
Used to add a genre to the show

Specified by:
addGenre in interface IVideoGenre
Overrides:
addGenre in class Show
Parameters:
genre - The genre

getPreferredGenre

public java.lang.String getPreferredGenre()
This is useful if the film belongs to more than one genres. It will returned the genre that is preferred.

Specified by:
getPreferredGenre in interface IVideoGenre
Overrides:
getPreferredGenre in class Show
Returns:
The preferred genre or null if not or flagged as preferred.

setPreferredGenre

public void setPreferredGenre(java.lang.String preferredGenre)
Used to set the genre that is preferred in the list of genres.

Specified by:
setPreferredGenre in interface IVideoGenre
Overrides:
setPreferredGenre in class Show
Parameters:
preferredGenre - The preferred genre

getExtraInfo

public java.util.Map<java.lang.String,java.lang.String> getExtraInfo()
Used to get extra information to a show that their are no getters/setters for in the regular fields

Specified by:
getExtraInfo in interface IVideoExtra
Overrides:
getExtraInfo in class Show
Returns:
The extra information in a map of key value pairs

setExtraInfo

public void setExtraInfo(java.util.Map<java.lang.String,java.lang.String> params)
Used to add extra information to a show that their are no getters/setters for in the regular fields

Specified by:
setExtraInfo in interface IVideoExtra
Overrides:
setExtraInfo in class Show
Parameters:
params - The extra information in a map of key value pairs

getSeasons

public java.util.List<CacheSeason> getSeasons()
Used to get a list of seasons in the show

Returns:
a list of seasons in the show