diff --git a/src/main/java/com/omertron/themoviedbapi/model/CollectionInfo.java b/src/main/java/com/omertron/themoviedbapi/model/CollectionInfo.java index 91a1fd475..5e6fd1808 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/CollectionInfo.java +++ b/src/main/java/com/omertron/themoviedbapi/model/CollectionInfo.java @@ -1,124 +1,135 @@ -/* - * Copyright (c) 2004-2013 Stuart Boston - * - * This file is part of TheMovieDB API. - * - * TheMovieDB API is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * TheMovieDB API is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with TheMovieDB API. If not, see . - * - */ -package com.omertron.themoviedbapi.model; - -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * - * @author Stuart - */ -public class CollectionInfo implements Serializable { - - private static final long serialVersionUID = 1L; - /* - * Logger - */ - private static final Logger LOG = LoggerFactory.getLogger(CollectionInfo.class); - /* - * Properties - */ - @JsonProperty("id") - private int id; - @JsonProperty("name") - private String name; - @JsonProperty("poster_path") - private String posterPath; - @JsonProperty("backdrop_path") - private String backdropPath; - @JsonProperty("parts") - private List parts = new ArrayList(); - - // - public String getBackdropPath() { - return backdropPath; - } - - public int getId() { - return id; - } - - public String getName() { - return name; - } - - public List getParts() { - return parts; - } - - public String getPosterPath() { - return posterPath; - } - // - - // - public void setBackdropPath(String backdropPath) { - this.backdropPath = backdropPath; - } - - public void setId(int id) { - this.id = id; - } - - public void setName(String name) { - this.name = name; - } - - public void setParts(List parts) { - this.parts = parts; - } - - public void setPosterPath(String posterPath) { - this.posterPath = posterPath; - } - // - - /** - * Handle unknown properties and print a message - * - * @param key - * @param value - */ - @JsonAnySetter - public void handleUnknown(String key, Object value) { - StringBuilder sb = new StringBuilder(); - sb.append("Unknown property: '").append(key); - sb.append("' value: '").append(value).append("'"); - LOG.trace(sb.toString()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("[CollectionInfo="); - sb.append("[id=").append(id); - sb.append("],[name=").append(name); - sb.append("],[posterPath=").append(posterPath); - sb.append("],[backdropPath=").append(backdropPath); - sb.append("],[# of parts=").append(parts.size()); - sb.append("]]"); - return sb.toString(); - } -} +/* + * Copyright (c) 2004-2013 Stuart Boston + * + * This file is part of TheMovieDB API. + * + * TheMovieDB API is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * TheMovieDB API is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with TheMovieDB API. If not, see . + * + */ +package com.omertron.themoviedbapi.model; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * + * @author Stuart + */ +public class CollectionInfo implements Serializable { + + private static final long serialVersionUID = 1L; + /* + * Logger + */ + private static final Logger LOG = LoggerFactory.getLogger(CollectionInfo.class); + /* + * Properties + */ + @JsonProperty("id") + private int id; + @JsonProperty("name") + private String name; + @JsonProperty("overview") + private String overview; + @JsonProperty("poster_path") + private String posterPath; + @JsonProperty("backdrop_path") + private String backdropPath; + @JsonProperty("parts") + private List parts = new ArrayList(); + + // + public String getBackdropPath() { + return backdropPath; + } + + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public String getOverview() { + return overview; + } + + public List getParts() { + return parts; + } + + public String getPosterPath() { + return posterPath; + } + // + + // + public void setBackdropPath(String backdropPath) { + this.backdropPath = backdropPath; + } + + public void setId(int id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setOverview(String overview) { + this.overview = overview; + } + + public void setParts(List parts) { + this.parts = parts; + } + + public void setPosterPath(String posterPath) { + this.posterPath = posterPath; + } + // + + /** + * Handle unknown properties and print a message + * + * @param key + * @param value + */ + @JsonAnySetter + public void handleUnknown(String key, Object value) { + StringBuilder sb = new StringBuilder(); + sb.append("Unknown property: '").append(key); + sb.append("' value: '").append(value).append("'"); + LOG.trace(sb.toString()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("[CollectionInfo="); + sb.append("[id=").append(id); + sb.append("],[name=").append(name); + sb.append("],[overview=").append(overview); + sb.append("],[posterPath=").append(posterPath); + sb.append("],[backdropPath=").append(backdropPath); + sb.append("],[# of parts=").append(parts.size()); + sb.append("]]"); + return sb.toString(); + } +}