/******************************************************************************
 * Video.java - One video object from plex
 * $Id: Video.java,v 1.6 2015/05/11 17:52:58 dick Exp $
 * 
 * BuckoVidLib - The BuckoSoft Video Library
 * Copyright(c) 2014 - Dick Balaska
 * 
 * $Log: Video.java,v $
 * Revision 1.6  2015/05/11 17:52:58  dick
 * Better alpha sorting. VideoBase gets a sortIndex which is derived from Video's sortTitle.
 *
 * Revision 1.5  2015/03/25 06:31:42  dick
 * Spell tagline correctly.
 *
 * Revision 1.4  2014/10/31 06:56:17  dick
 * duration is an int, not a string.
 *
 * Revision 1.3  2014/10/20 01:13:13  dick
 * addedAt and updatedAt are ints (maybe should be longs).
 *
 * Revision 1.2  2014/10/12 07:21:46  dick
 * Add the rest of the Video attributes.
 *
 * Revision 1.1  2014/10/08 04:41:44  dick
 * Define a Video from Plex.
 *
 */
package tv.plex.domain;

import java.util.ArrayList;
import java.util.Collection;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/** Define one Video from plex.
 * @author dick
 * @since 2014-10-07
 */
@XmlRootElement(name="Video")
public class Video {
	private	int		addedAt;
	private	String	art;
	private	String	contentRating;
	private	int		duration;
	private	String	key;
	private	String	originallyAvailableAt;
	private	int		ratingKey;
	private	String	studio;
	private	String	summary;
	private	String	tagline;
	private	String	thumb;
	private	String	title;
	private	String	titleSort;
	private	String	type;
	private	int		updatedAt;
	private	String	year;

	// XXX: Ignore Media for now (maybe forever)

	Collection<Genre> 		genres = new ArrayList<Genre>();
	Collection<Writer>		writers = new ArrayList<Writer>();
	Collection<Director>	directors = new ArrayList<Director>();
	Collection<Role>		roles = new ArrayList<Role>();
	
	/**
	 * @return the key
	 */
	@XmlAttribute
	public String getKey() {
		return key;
	}
	/**
	 * @param key the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}
	/**
	 * @return the ratingKey
	 */
	@XmlAttribute
	public int getRatingKey() {
		return ratingKey;
	}
	/**
	 * @param ratingKey the ratingKey to set
	 */
	public void setRatingKey(int ratingKey) {
		this.ratingKey = ratingKey;
	}
	/**
	 * @return the type
	 */
	@XmlAttribute
	public String getType() {
		return type;
	}
	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}
	/**
	 * @return the title
	 */
	@XmlAttribute
	public String getTitle() {
		return title;
	}
	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}
	/**
	 * @return the titleSort
	 */
	@XmlAttribute
	public String getTitleSort() {
		return titleSort;
	}
	/**
	 * @param titleSort the titleSort to set
	 */
	public void setTitleSort(String titleSort) {
		this.titleSort = titleSort;
	}
	/**
	 * @return the summary
	 */
	@XmlAttribute
	public String getSummary() {
		return summary;
	}
	/**
	 * @param summary the summary to set
	 */
	public void setSummary(String summary) {
		this.summary = summary;
	}
	/**
	 * @return the year
	 */
	@XmlAttribute
	public String getYear() {
		return year;
	}
	/**
	 * @param year the year to set
	 */
	public void setYear(String year) {
		this.year = year;
	}
	/**
	 * @return the thumb
	 */
	@XmlAttribute
	public String getThumb() {
		return thumb;
	}
	/**
	 * @param thumb the thumb to set
	 */
	public void setThumb(String thumb) {
		this.thumb = thumb;
	}
	/**
	 * @return the art
	 */
	@XmlAttribute
	public String getArt() {
		return art;
	}
	/**
	 * @param art the art to set
	 */
	public void setArt(String art) {
		this.art = art;
	}
	/**
	 * @return the duration
	 */
	@XmlAttribute
	public int getDuration() {
		return duration;
	}
	/**
	 * @param duration the duration to set
	 */
	public void setDuration(int duration) {
		this.duration = duration;
	}
	/**
	 * @return the originallyAvailableAt
	 */
	@XmlAttribute
	public String getOriginallyAvailableAt() {
		return originallyAvailableAt;
	}
	/**
	 * @param originallyAvailableAt the originallyAvailableAt to set
	 */
	public void setOriginallyAvailableAt(String originallyAvailableAt) {
		this.originallyAvailableAt = originallyAvailableAt;
	}
	/**
	 * @return the addedAt
	 */
	@XmlAttribute
	public int getAddedAt() {
		return addedAt;
	}
	/**
	 * @param addedAt the addedAt to set
	 */
	public void setAddedAt(int addedAt) {
		this.addedAt = addedAt;
	}
	/**
	 * @return the updatedAt
	 */
	@XmlAttribute
	public int getUpdatedAt() {
		return updatedAt;
	}
	/**
	 * @param updatedAt the updatedAt to set
	 */
	public void setUpdatedAt(int updatedAt) {
		this.updatedAt = updatedAt;
	}
	/**
	 * @return the contentRating
	 */
	@XmlAttribute
	public String getContentRating() {
		return contentRating;
	}
	/**
	 * @param contentRating the contentRating to set
	 */
	public void setContentRating(String contentRating) {
		this.contentRating = contentRating;
	}
	/**
	 * @return the studio
	 */
	@XmlAttribute
	public String getStudio() {
		return studio;
	}
	/**
	 * @param studio the studio to set
	 */
	public void setStudio(String studio) {
		this.studio = studio;
	}
	/**
	 * @return the tagLine
	 */
	@XmlAttribute
	public String getTagline() {
		return tagline;
	}
	/**
	 * @param tagLine the tagLine to set
	 */
	public void setTagline(String tagline) {
		this.tagline = tagline;
	}
	/**
	 * @return the genres
	 */
	@XmlElement(name = "Genre")
	public Collection<Genre> getGenres() {
		return genres;
	}
	/**
	 * @param genres the genres to set
	 */
	public void setGenres(Collection<Genre> genres) {
		this.genres = genres;
	}
	/**
	 * @return the writers
	 */
	@XmlElement(name = "Writer")
	public Collection<Writer> getWriters() {
		return writers;
	}
	/**
	 * @param writers the writers to set
	 */
	public void setWriters(Collection<Writer> writers) {
		this.writers = writers;
	}
	/**
	 * @return the directors
	 */
	@XmlElement(name = "Director")
	public Collection<Director> getDirectors() {
		return directors;
	}
	/**
	 * @param directors the directors to set
	 */
	public void setDirectors(Collection<Director> directors) {
		this.directors = directors;
	}
	/**
	 * @return the roles
	 */
	@XmlElement(name = "Role")
	public Collection<Role> getRoles() {
		return roles;
	}
	/**
	 * @param roles the roles to set
	 */
	public void setRoles(Collection<Role> roles) {
		this.roles = roles;
	}

}
