Back to project page BuildingForAndroidTV.
The source code is released under:
MIT License
If you think the Android project BuildingForAndroidTV listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.sgottard.tvdemoapp; // w w w .ja va2 s . co m import java.io.Serializable; import java.net.URI; import java.net.URISyntaxException; import android.util.Log; public class Movie implements Serializable { static final long serialVersionUID = 727566175075960653L; private static long count = 0; private long id; private String title; private String description; private String bgImageUrl; private String cardImageUrl; private String videoUrl; private String studio; private String category; public Movie() { } public static long getCount() { return count; } public static void incCount() { count++; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getStudio() { return studio; } public void setStudio(String studio) { this.studio = studio; } public String getVideoUrl() { return videoUrl; } public void setVideoUrl(String videoUrl) { this.videoUrl = videoUrl; } public String getBackgroundImageUrl() { return bgImageUrl; } public void setBackgroundImageUrl(String bgImageUrl) { this.bgImageUrl = bgImageUrl; } public String getCardImageUrl() { return cardImageUrl; } public void setCardImageUrl(String cardImageUrl) { this.cardImageUrl = cardImageUrl; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public URI getBackgroundImageURI() { try { Log.d("BACK MOVIE: ", bgImageUrl); return new URI(getBackgroundImageUrl()); } catch (URISyntaxException e) { Log.d("URI exception: ", bgImageUrl); return null; } } public URI getCardImageURI() { try { return new URI(getCardImageUrl()); } catch (URISyntaxException e) { return null; } } @Override public String toString() { return "Movie{" + "id=" + id + ", title='" + title + '\'' + ", videoUrl='" + videoUrl + '\'' + ", backgroundImageUrl='" + bgImageUrl + '\'' + ", backgroundImageURI='" + getBackgroundImageURI().toString() + '\'' + ", cardImageUrl='" + cardImageUrl + '\'' + '}'; } }