001package net.filebot.web; 002 003import static java.util.Arrays.*; 004import static java.util.Collections.*; 005 006import java.net.URL; 007import java.util.List; 008 009public class EpisodeInfo extends Episode implements Crew { 010 011 protected String productionCode; 012 protected String overview; 013 014 protected Double rating; 015 protected Integer votes; 016 017 protected URL image; 018 protected Person[] people; 019 020 public EpisodeInfo() { 021 // used by deserializer 022 } 023 024 public EpisodeInfo(EpisodeInfo other) { 025 super(other); 026 productionCode = other.productionCode; 027 overview = other.overview; 028 rating = other.rating; 029 votes = other.votes; 030 image = other.image; 031 people = other.people == null ? null : other.people.clone(); 032 } 033 034 public EpisodeInfo(Episode base, String productionCode, String overview, Double rating, Integer votes, URL image, List<Person> people) { 035 super(base); 036 this.productionCode = productionCode; 037 this.overview = overview; 038 this.votes = votes; 039 this.rating = rating; 040 this.image = image; 041 this.people = people.toArray(new Person[0]); 042 } 043 044 public String getProductionCode() { 045 return productionCode; 046 } 047 048 public String getOverview() { 049 return overview; 050 } 051 052 public Double getRating() { 053 return rating; 054 } 055 056 public Integer getVotes() { 057 return votes; 058 } 059 060 public URL getImage() { 061 return image; 062 } 063 064 public List<Person> getCrew() { 065 return unmodifiableList(asList(people)); 066 } 067 068 @Override 069 public EpisodeInfo clone() { 070 return new EpisodeInfo(this); 071 } 072 073 @Override 074 public String toString() { 075 return seriesInfo + "::" + id; 076 } 077 078}