org.stanwood.media.store.xmlstore
Class XMLFilm

java.lang.Object
  extended by org.stanwood.media.xml.XMLParser
      extended by org.stanwood.media.store.xmlstore.XMLVideo
          extended by org.stanwood.media.store.xmlstore.XMLFilm
All Implemented Interfaces:
IFilm, IVideo, IVideoActors, IVideoCertification, IVideoGenre, IVideoRating

public class XMLFilm
extends XMLVideo
implements IFilm

This is a Film object that talks directory to the DOM of the XML store


Field Summary
 
Fields inherited from class org.stanwood.media.xml.XMLParser
DTD_WEB_LOCATION, SCHEMA_WEB_LOCATION
 
Constructor Summary
XMLFilm(org.w3c.dom.Element node, java.io.File rootMediaDir)
          The constructor
 
Method Summary
 void addChapter(Chapter chapter)
          Used to add a chapter to the film
 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.List<Chapter> getChapters()
          Used to get the chapters of the film
 java.lang.String getCountry()
          This will return the country the film was made in, or null if it's not known.
 java.util.Date getDate()
          Used to get the release date of the film
 java.lang.String getDescription()
          Used to get the films long description
 java.net.URL getFilmUrl()
          Used to get the URL used to get a summary of the film
 java.util.List<java.lang.String> getGenres()
          Used to get the genres that the film belongs too
 java.lang.String getId()
          Used to get the id of the film used by the source that it was read from.
 java.net.URL getImageURL()
          Used to get the URL of the film poster.
 java.lang.String getPreferredGenre()
          This is useful if the video belongs to more than one genres.
 java.lang.String getSourceId()
          Used to get the source id of the source that was used to retrieve the film information.
 java.lang.String getStudio()
          Used to get the films studio
 void setCertifications(java.util.List<Certification> certifications)
          Used to set the films certifications
 void setChapters(java.util.List<Chapter> chapters)
          Used to set the chapter information for the film
 void setCountry(java.lang.String country)
          Used to set the country the film was made in.
 void setDate(java.util.Date date)
          Used to set the release date of the film
 void setDescription(java.lang.String description)
          Used to set the films long description
 void setFilmUrl(java.net.URL url)
          Used to set the URL used to get a summary of the film
 void setGenres(java.util.List<java.lang.String> genres)
          Used to set the genres that the film belongs too
 void setId(java.lang.String id)
          Used to set the id of the film used by the source that it was read from.
 void setImageURL(java.net.URL imageURL)
          Used to set the URL of the film poster
 void setPreferredGenre(java.lang.String preferredGenre)
          Used to set the genre that is preferred in the list of genres.
 void setSourceId(java.lang.String sourceId)
          Used to set the source id of the source that was used to retrieve the film information.
 void setStudio(java.lang.String studio)
          Used to set the films studio
 
Methods inherited from class org.stanwood.media.store.xmlstore.XMLVideo
getActors, getDirectors, getFiles, getRating, getSummary, getTitle, getWriters, setActors, setDirectors, setFiles, setRating, setSummary, setTitle, setWriters
 
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
 
Methods inherited from interface org.stanwood.media.model.IVideo
getDirectors, getFiles, getSummary, getTitle, getWriters, setDirectors, setFiles, setSummary, setTitle, setWriters
 
Methods inherited from interface org.stanwood.media.model.IVideoActors
getActors, setActors
 
Methods inherited from interface org.stanwood.media.model.IVideoRating
getRating, setRating
 

Constructor Detail

XMLFilm

public XMLFilm(org.w3c.dom.Element node,
               java.io.File rootMediaDir)
The constructor

Parameters:
node - The node with video data
rootMediaDir - The root media dir
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.

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

getId

public java.lang.String getId()
Used to get the id of the film used by the source that it was read from.

Specified by:
getId in interface IFilm
Returns:
The id of the film

setId

public void setId(java.lang.String id)
Used to set the id of the film used by the source that it was read from.

Specified by:
setId in interface IFilm
Parameters:
id - The id of the film

getSourceId

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

Specified by:
getSourceId in interface IFilm
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 film information.

Specified by:
setSourceId in interface IFilm
Parameters:
sourceId - The source id

setFilmUrl

public void setFilmUrl(java.net.URL url)
Used to set the URL used to get a summary of the film

Specified by:
setFilmUrl in interface IFilm
Parameters:
url - The summary URL

getFilmUrl

public java.net.URL getFilmUrl()
Used to get the URL used to get a summary of the film

Specified by:
getFilmUrl in interface IFilm
Returns:
The summary URL

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

getDate

public java.util.Date getDate()
Used to get the release date of the film

Specified by:
getDate in interface IFilm
Returns:
The release date of the film

setDate

public void setDate(java.util.Date date)
Used to set the release date of the film

Specified by:
setDate in interface IFilm
Parameters:
date - The release date of the film

setImageURL

public void setImageURL(java.net.URL imageURL)
Used to set the URL of the film poster

Specified by:
setImageURL in interface IFilm
Parameters:
imageURL - The URL of the film poster.

getImageURL

public java.net.URL getImageURL()
Used to get the URL of the film poster. This will return null if a poster could not be found.

Specified by:
getImageURL in interface IFilm
Returns:
The film poster, or null if it does not have one

addChapter

public void addChapter(Chapter chapter)
Used to add a chapter to the film

Specified by:
addChapter in interface IFilm
Parameters:
chapter - The chapter to add

getChapters

public java.util.List<Chapter> getChapters()
Used to get the chapters of the film

Specified by:
getChapters in interface IFilm
Returns:
The chapters of the film

setChapters

public void setChapters(java.util.List<Chapter> chapters)
Used to set the chapter information for the film

Specified by:
setChapters in interface IFilm
Parameters:
chapters - The chapters of the film

setDescription

public void setDescription(java.lang.String description)
Used to set the films long description

Specified by:
setDescription in interface IFilm
Parameters:
description - The films long description

getDescription

public java.lang.String getDescription()
Used to get the films long description

Specified by:
getDescription in interface IFilm
Returns:
the films long description

getCountry

public java.lang.String getCountry()
This will return the country the film was made in, or null if it's not known.

Specified by:
getCountry in interface IFilm
Returns:
the country the film was made in.

setCountry

public void setCountry(java.lang.String country)
Used to set the country the film was made in.

Specified by:
setCountry in interface IFilm
Parameters:
country - the country to set

getStudio

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

Specified by:
getStudio in interface IFilm
Returns:
the films studio

setStudio

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

Specified by:
setStudio in interface IFilm
Parameters:
studio - the films studio