org.stanwood.media.store.xmlstore
Class XMLShow

java.lang.Object
  extended by org.stanwood.media.xml.XMLParser
      extended by org.stanwood.media.store.xmlstore.XMLShow
All Implemented Interfaces:
IShow, IVideoCertification, IVideoExtra, IVideoGenre

public class XMLShow
extends XMLParser
implements IShow

Used to store and get information about a show from a DOM show node


Field Summary
 
Fields inherited from class org.stanwood.media.xml.XMLParser
DTD_WEB_LOCATION, SCHEMA_WEB_LOCATION
 
Constructor Summary
XMLShow(org.w3c.dom.Element showNode)
          The constructor
 
Method Summary
 void addGenre(java.lang.String genre)
          Used to add a genre to the film
 java.util.List<Certification> getCertifications()
          Used to get a list of the films certifications
 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 film 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 video belongs to more than one genres.
 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.
 java.lang.String getStudio()
          Used to get the studio of the show
 void setCertifications(java.util.List<Certification> certifications)
          Used to set the films certifications
 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 film 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.
 void setStudio(java.lang.String studio)
          Used to set the studio of the show
 
Methods inherited from class org.stanwood.media.xml.XMLParser
createDocBuilder, createFactory, deleteNode, domToStr, encodeAttributeValue, firstChild, getAttribute, getElement, getFirstChildElement, getFloatFromXML, getIntegerFromXML, getLastChildElement, getLongFromXML, getSchema, getStringFromXML, getStringFromXMLOrNull, getURLFromXML, getURLFromXMLOrNull, hasNode, parse, parse, parse, quoteXPathQuery, selectChildNodes, selectNodeList, selectSingleNode, strToDom, strToDom, strToDom, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLShow

public XMLShow(org.w3c.dom.Element showNode)
The constructor

Parameters:
showNode - The show node
Method Detail

setGenres

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

Specified by:
setGenres in interface IVideoGenre
Parameters:
genres - The genres that the film belongs too

getGenres

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

Specified by:
getGenres in interface IVideoGenre
Returns:
The genres the film belongs too

addGenre

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

Specified by:
addGenre in interface IVideoGenre
Parameters:
genre - the genre to add

getPreferredGenre

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

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

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
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
Parameters:
params - The extra information in a map of key value pairs

getLongSummary

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

Specified by:
getLongSummary in interface IShow
Returns:
The long summary of 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
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
Parameters:
shortSummary - The short summary iof the show

getShortSummary

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

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

setName

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

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

getName

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

Specified by:
getName in interface IShow
Returns:
The name/title 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
Parameters:
showURL - The URL which points to a summary 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
Returns:
The URL which points to a summary 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
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
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
Parameters:
imageURL - A URL which points too a image of the show

getStudio

public java.lang.String getStudio()
Used to get the studio of the show

Specified by:
getStudio in interface IShow
Returns:
the studio of the show

setStudio

public void setStudio(java.lang.String studio)
Used to set the studio of the show

Specified by:
setStudio in interface IShow
Parameters:
studio - the studio 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
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
Parameters:
sourceId - The source id

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
Parameters:
preferredGenre - The preferred genre

getCertifications

public java.util.List<Certification> getCertifications()
Used to get a list of the films certifications

Specified by:
getCertifications in interface IVideoCertification
Returns:
The films certification list

setCertifications

public void setCertifications(java.util.List<Certification> certifications)
Used to set the films certifications

Specified by:
setCertifications in interface IVideoCertification
Parameters:
certifications - The films certifications