jeroen.film
Class Film

java.lang.Object
  |
  +--jeroen.film.Film
All Implemented Interfaces:
Comparable, HTMLListViewable, HTMLViewable, Indexed, LeesSchrijfbaar, Scoorbaar

public class Film
extends Object
implements LeesSchrijfbaar, HTMLViewable, Indexed, Comparable, HTMLListViewable, Scoorbaar

Deze klasse representeert een film in de ruimste zin van het woord. Titel en jaar (met eventueel een achtervoegsel (suffix) als I en II) identificeren een film uniek.


Constructor Summary
Film(DataInput source)
           
Film(String s)
          Maakt een nieuw Film-object aan, met de gegevens van de meegegeven String.
 
Method Summary
 int compareTo(Object o2)
          Sorteert op basis van film-id.
 DocRep getDocRep()
          Creëert on-the-fly een Document Representative op basis van de plots opgeslagen in dit filmobject.
 int getIndex()
           
 int getJaar()
           
 Icon getListIcon()
          Icon om ervoor weer te geven.
 String getTitel()
           
 VeronicaFilm getVeronicaFilm()
           
 Plots plots()
          Geeft de plots die bij deze film horen.
 void setIndex(int index)
           
 void setScore(int score)
          Beoordeel dit Object met score
 void setVeronicaFilm(VeronicaFilm vf)
           
static Comparator titelComparator()
           
 void toDataOutput(DataOutput target)
          Schrijf dit object naar een DataOutput.
 String toHTML()
          De html-tekst voor in de viewer.
 String toHTMLforVFilm()
          Probeert er geen zender gegevens bij te zoeken, want dat zou in een oneindige lus resulteren.
 String toListHTML()
          De html-tekst om weer te geven.
 String toListHTMLforVFilm()
          Probeert er geen zender gegevens bij te zoeken, want dat zou in een oneindige lus resulteren.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Film

public Film(String s)
Maakt een nieuw Film-object aan, met de gegevens van de meegegeven String. Het formaat van de String moet zijn zoals gespecificeerd door de IMDb:
 	"xxxxx"        = a television series
 	"xxxxx" (mini) = a television mini-series (running time: >= 240 minutes!)
 	(TV)           = TV movie, or made for cable movie
 	(V)            = made for video movie (this category does NOT include TV
 					 episodes repackaged for video, guest appearances in
 					 variety/comedy specials released on video, or
 					 self-help/physical fitness videos)
 	(VG)           = video game (with voices/simulations of actors/actresses)
	

Year data is added for ALL titles (year of first public screening)

If years are not enough to distinguish between titles roman numbers are added:

Example:

The data must be in the ISO-8859-1 character set for West European languages if the title contains non ASCII (accented) characters.

Throws:
IllegalArgumentException - als de titel geen film is, maar een tvserie of computerspelletje oid.

Film

public Film(DataInput source)
     throws IOException
Method Detail

toDataOutput

public void toDataOutput(DataOutput target)
                  throws IOException
Description copied from interface: LeesSchrijfbaar
Schrijf dit object naar een DataOutput.
Specified by:
toDataOutput in interface LeesSchrijfbaar

plots

public Plots plots()
Geeft de plots die bij deze film horen.

toString

public String toString()
Overrides:
toString in class Object

getListIcon

public Icon getListIcon()
Description copied from interface: HTMLListViewable
Icon om ervoor weer te geven. Mag null zijn.
Specified by:
getListIcon in interface HTMLListViewable

toListHTML

public String toListHTML()
Description copied from interface: HTMLListViewable
De html-tekst om weer te geven. Er mogen geen <html>-tags omheen staan.
Specified by:
toListHTML in interface HTMLListViewable

toHTML

public String toHTML()
Description copied from interface: HTMLViewable
De html-tekst voor in de viewer. Er mogen geen <html>-tags omheen staan.
Specified by:
toHTML in interface HTMLViewable

toHTMLforVFilm

public String toHTMLforVFilm()
Probeert er geen zender gegevens bij te zoeken, want dat zou in een oneindige lus resulteren.

toListHTMLforVFilm

public String toListHTMLforVFilm()
Probeert er geen zender gegevens bij te zoeken, want dat zou in een oneindige lus resulteren.

setScore

public void setScore(int score)
Description copied from interface: Scoorbaar
Beoordeel dit Object met score
Specified by:
setScore in interface Scoorbaar
Following copied from interface: jeroen.film.ui.Scoorbaar
Parameters:
score - de score, van 0 tot 10.

setVeronicaFilm

public void setVeronicaFilm(VeronicaFilm vf)

getVeronicaFilm

public VeronicaFilm getVeronicaFilm()

getDocRep

public DocRep getDocRep()
Creëert on-the-fly een Document Representative op basis van de plots opgeslagen in dit filmobject. Omdat dit zo snel gaat (meestal 2 tot 6 ms, anderhalve minuut voor de hele IMDb) wordt het geheugen-vretende resultaat niet intern opgeslagen.

setIndex

public void setIndex(int index)
Specified by:
setIndex in interface Indexed

getIndex

public int getIndex()
Specified by:
getIndex in interface Indexed

compareTo

public int compareTo(Object o2)
Sorteert op basis van film-id.
Specified by:
compareTo in interface Comparable

titelComparator

public static Comparator titelComparator()

getTitel

public String getTitel()

getJaar

public int getJaar()