/**
 * Preview model class. A preview may be a video or a image file.
 */
function Preview(){
	
	// CONSTANTS ??
	this.PREVIEW_IMAGE = "1";
	this.PREVIEW_VIDEO = "2"; 
	
	this.FILENAME_XSMALL = ".jpg?x=55&y=34";
	this.FILENAME_SMALL = ".jpg?x=82&y=50";
	this.FILENAME_MEDIUM = ".jpg?x=160&y=98";
	this.FILENAME_LARGE = ".jpg?x=418&y=256";
	
	this.__id;
	this.__caption;
	this.__fileName;
	this.__default;
	this.__type;	// type of the preview - image or video
	
	this.getId = function (){
		return this.__id;
	}
	this.setId = function (id){
		this.__id = id;
	}
	
	this.getCaption = function (){
		return this.__caption;
	}
	this.setCaption = function (caption){
		this.__caption = caption;
	}
	
	this.getFileName = function (){
		return this.__fileName;
	}
	this.setFileName = function (fileName){
		this.__fileName = fileName;
	}
	
	this.getFileNameXSmall = function () {
		return this.__fileName+this.FILENAME_XSMALL;
	}
	
	this.getFileNameSmall = function () {
		return this.__fileName+this.FILENAME_SMALL;
	}
	
	this.getFileNameMedium = function () {
		return this.__fileName+this.FILENAME_MEDIUM;
	}
	
	this.getFileNameLarge = function () {
		return this.__fileName+this.FILENAME_LARGE;
	}
	
	this.isDefault = function (){
		return this.__default;
	}
	this.setDefault = function (val){
		this.__default = val;
	}
	
	this.getType = function () {
		return this.__type;
	}
	this.setType = function (type){
		this.__type = type;
	}
}
