From 5eb756e03e4ed735a554deb9747afa0df18007ef Mon Sep 17 00:00:00 2001 From: Stuart Boston Date: Tue, 30 Dec 2014 19:49:30 +0000 Subject: [PATCH] Update copyright date --- .../themoviedbapi/MovieDbException.java | 2 +- .../omertron/themoviedbapi/TheMovieDbApi.java | 2 +- .../themoviedbapi/model/AbstractIdName.java | 20 +- .../model/AbstractJsonMapping.java | 2 +- .../omertron/themoviedbapi/model/Account.java | 2 +- .../themoviedbapi/model/AlternativeTitle.java | 2 +- .../omertron/themoviedbapi/model/Artwork.java | 2 +- .../themoviedbapi/model/ArtworkType.java | 33 -- .../themoviedbapi/model/ChangeKeyItem.java | 2 +- .../themoviedbapi/model/ChangedItem.java | 2 +- .../themoviedbapi/model/ChangedMovie.java | 2 +- .../themoviedbapi/model/Collection.java | 2 +- .../themoviedbapi/model/CollectionInfo.java | 2 +- .../omertron/themoviedbapi/model/Company.java | 2 +- .../themoviedbapi/model/Discover.java | 279 ------------ .../omertron/themoviedbapi/model/Genre.java | 2 +- .../themoviedbapi/model/JobDepartment.java | 2 +- .../omertron/themoviedbapi/model/Keyword.java | 2 +- .../themoviedbapi/model/KeywordMovie.java | 138 ------ .../themoviedbapi/model/Language.java | 2 +- .../themoviedbapi/model/ListItemStatus.java | 2 +- .../omertron/themoviedbapi/model/MovieDb.java | 425 ------------------ .../themoviedbapi/model/MovieDbList.java | 143 ------ .../model/MovieDbListStatus.java | 36 -- .../themoviedbapi/model/MovieList.java | 111 ----- .../omertron/themoviedbapi/model/Person.java | 296 ------------ .../themoviedbapi/model/PersonCast.java | 134 ------ .../themoviedbapi/model/PersonCredit.java | 194 -------- .../themoviedbapi/model/PersonCrew.java | 123 ----- .../themoviedbapi/model/PersonType.java | 33 -- .../model/ProductionCompany.java | 2 +- .../model/ProductionCountry.java | 2 +- .../themoviedbapi/model/ReleaseInfo.java | 2 +- .../omertron/themoviedbapi/model/Reviews.java | 74 --- .../themoviedbapi/model/StatusCode.java | 2 +- .../model/TmdbConfiguration.java | 183 -------- .../model/TokenAuthorisation.java | 2 +- .../themoviedbapi/model/TokenSession.java | 2 +- .../omertron/themoviedbapi/model/Trailer.java | 2 +- .../themoviedbapi/model/Translation.java | 2 +- .../PersonCreditDateComparator.java | 2 +- .../results/AbstractResults.java | 2 +- .../results/TmdbResultsList.java | 2 +- .../themoviedbapi/results/TmdbResultsMap.java | 2 +- .../omertron/themoviedbapi/tools/ApiUrl.java | 257 ----------- .../themoviedbapi/tools/WebBrowser.java | 333 -------------- .../wrapper/AbstractWrapper.java | 2 +- .../wrapper/AbstractWrapperAll.java | 2 +- .../wrapper/AbstractWrapperId.java | 2 +- .../themoviedbapi/wrapper/IWrapperDates.java | 2 +- .../themoviedbapi/wrapper/IWrapperId.java | 2 +- .../themoviedbapi/wrapper/IWrapperPages.java | 2 +- .../themoviedbapi/wrapper/ResultDates.java | 2 +- .../wrapper/WrapperAlternativeTitles.java | 2 +- .../themoviedbapi/wrapper/WrapperChanges.java | 2 +- .../wrapper/WrapperCollection.java | 2 +- .../themoviedbapi/wrapper/WrapperCompany.java | 2 +- .../wrapper/WrapperCompanyMovies.java | 2 +- .../themoviedbapi/wrapper/WrapperConfig.java | 2 +- .../themoviedbapi/wrapper/WrapperGenres.java | 2 +- .../themoviedbapi/wrapper/WrapperImages.java | 2 +- .../themoviedbapi/wrapper/WrapperJobList.java | 2 +- .../wrapper/WrapperKeywordMovies.java | 2 +- .../wrapper/WrapperKeywords.java | 2 +- .../themoviedbapi/wrapper/WrapperMovie.java | 44 -- .../wrapper/WrapperMovieCasts.java | 77 ---- .../wrapper/WrapperMovieChanges.java | 39 -- .../wrapper/WrapperMovieDbList.java | 39 -- .../wrapper/WrapperMovieKeywords.java | 44 -- .../wrapper/WrapperMovieList.java | 44 -- .../themoviedbapi/wrapper/WrapperPerson.java | 42 -- .../wrapper/WrapperPersonCredits.java | 77 ---- .../wrapper/WrapperPersonList.java | 42 -- .../wrapper/WrapperReleaseInfo.java | 2 +- .../themoviedbapi/wrapper/WrapperReviews.java | 2 +- .../wrapper/WrapperTrailers.java | 2 +- .../wrapper/WrapperTranslations.java | 2 +- .../omertron/themoviedbapi/TestLogger.java | 2 +- .../themoviedbapi/TheMovieDbApiTest.java | 2 +- testing.properties | 6 +- 80 files changed, 73 insertions(+), 3299 deletions(-) delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/ArtworkType.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/Discover.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/KeywordMovie.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/MovieDb.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/MovieDbList.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/MovieDbListStatus.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/MovieList.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/Person.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/PersonCast.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/PersonCredit.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/PersonCrew.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/PersonType.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/Reviews.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/model/TmdbConfiguration.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/tools/ApiUrl.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/tools/WebBrowser.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovie.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieCasts.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieChanges.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieDbList.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieKeywords.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieList.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPerson.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonCredits.java delete mode 100644 src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonList.java diff --git a/src/main/java/com/omertron/themoviedbapi/MovieDbException.java b/src/main/java/com/omertron/themoviedbapi/MovieDbException.java index 0ef23a8a4..fdebca083 100644 --- a/src/main/java/com/omertron/themoviedbapi/MovieDbException.java +++ b/src/main/java/com/omertron/themoviedbapi/MovieDbException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java b/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java index 6e2dc1388..8065f8608 100644 --- a/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java +++ b/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/AbstractIdName.java b/src/main/java/com/omertron/themoviedbapi/model/AbstractIdName.java index c4c745f5a..505d90b22 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/AbstractIdName.java +++ b/src/main/java/com/omertron/themoviedbapi/model/AbstractIdName.java @@ -1,7 +1,21 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Copyright (c) 2004-2015 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;private either version 3 of the License;private or + * any later version. + * + * TheMovieDB API is distributed in the hope that it will be useful;private + * 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;private see . + * */ package com.omertron.themoviedbapi.model; diff --git a/src/main/java/com/omertron/themoviedbapi/model/AbstractJsonMapping.java b/src/main/java/com/omertron/themoviedbapi/model/AbstractJsonMapping.java index de0eba1e8..ec03209c9 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/AbstractJsonMapping.java +++ b/src/main/java/com/omertron/themoviedbapi/model/AbstractJsonMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/Account.java b/src/main/java/com/omertron/themoviedbapi/model/Account.java index 2c8b91ce6..7a732d0e3 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Account.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Account.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/AlternativeTitle.java b/src/main/java/com/omertron/themoviedbapi/model/AlternativeTitle.java index ed5027631..8e5d68085 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/AlternativeTitle.java +++ b/src/main/java/com/omertron/themoviedbapi/model/AlternativeTitle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/Artwork.java b/src/main/java/com/omertron/themoviedbapi/model/Artwork.java index 18f63e773..38ae56f45 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Artwork.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Artwork.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/ArtworkType.java b/src/main/java/com/omertron/themoviedbapi/model/ArtworkType.java deleted file mode 100644 index 29447762a..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/ArtworkType.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2004-2014 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; - -/** - * ArtworkType enum List of the artwork types that are available - */ -public enum ArtworkType { - - // Poster artwork - POSTER, - // Fanart/backdrop - BACKDROP, - // Person image - PROFILE -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/ChangeKeyItem.java b/src/main/java/com/omertron/themoviedbapi/model/ChangeKeyItem.java index cb0eec979..491740408 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ChangeKeyItem.java +++ b/src/main/java/com/omertron/themoviedbapi/model/ChangeKeyItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/ChangedItem.java b/src/main/java/com/omertron/themoviedbapi/model/ChangedItem.java index b55ad477b..1245e6288 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ChangedItem.java +++ b/src/main/java/com/omertron/themoviedbapi/model/ChangedItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/ChangedMovie.java b/src/main/java/com/omertron/themoviedbapi/model/ChangedMovie.java index c940ca202..f3051c446 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ChangedMovie.java +++ b/src/main/java/com/omertron/themoviedbapi/model/ChangedMovie.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/Collection.java b/src/main/java/com/omertron/themoviedbapi/model/Collection.java index cf69b4585..254566531 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Collection.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Collection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/CollectionInfo.java b/src/main/java/com/omertron/themoviedbapi/model/CollectionInfo.java index 41b64ee9d..cc6c6ed18 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/CollectionInfo.java +++ b/src/main/java/com/omertron/themoviedbapi/model/CollectionInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/Company.java b/src/main/java/com/omertron/themoviedbapi/model/Company.java index a913c8d78..13f26393b 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Company.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Company.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/Discover.java b/src/main/java/com/omertron/themoviedbapi/model/Discover.java deleted file mode 100644 index 8eec1628e..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/Discover.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright (c) 2004-2014 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;private either version 3 of the License;private or - * any later version. - * - * TheMovieDB API is distributed in the hope that it will be useful;private - * 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;private see . - * - */ -package com.omertron.themoviedbapi.model; - -import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_ADULT; -import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_LANGUAGE; -import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_PAGE; -import static com.omertron.themoviedbapi.tools.ApiUrl.PARAM_YEAR; -import java.util.HashMap; -import java.util.Map; -import org.apache.commons.lang3.StringUtils; - -/** - * Generate a discover object for use in the MovieDbApi - *

- * This allows you to just add the search components you are concerned with - * - * @author stuart.boston - */ -public class Discover { - - private final Map params = new HashMap(); - private static final String PARAM_PRIMARY_RELEASE_YEAR = "primary_release_year="; - private static final String PARAM_VOTE_COUNT_GTE = "vote_count.gte="; - private static final String PARAM_VOTE_AVERAGE_GTE = "vote_average.gte="; - private static final String PARAM_WITH_GENRES = "with_genres="; - private static final String PARAM_RELEASE_DATE_GTE = "release_date.gte="; - private static final String PARAM_RELEASE_DATE_LTE = "release_date.lte="; - private static final String PARAM_CERTIFICATION_COUNTRY = "certification_country="; - private static final String PARAM_CERTIFICATION_LTE = "certification.lte="; - private static final String PARAM_WITH_COMPANIES = "with_companies="; - private static final String PARAM_SORT_BY = "sort_by="; - private static final int YEAR_MIN = 1900; - private static final int YEAR_MAX = 2100; - - /** - * Get the parameters - *

- * This will be used to construct the URL in the API - * - * @return - */ - public Map getParams() { - return params; - } - - /** - * Minimum value is 1 if included. - * - * @param page - * @return - */ - public Discover page(int page) { - if (page > 0) { - params.put(PARAM_PAGE, String.valueOf(page)); - } - return this; - } - - /** - * ISO 639-1 code - * - * @param language - * @return - */ - public Discover language(String language) { - if (StringUtils.isNotBlank(language)) { - params.put(PARAM_LANGUAGE, language); - } - return this; - } - - /** - * Available options are
- * vote_average.desc
- * vote_average.asc
- * release_date.desc
- * release_date.asc
- * popularity.desc
- * popularity.asc - * - * @param sortBy - * @return - */ - public Discover sortBy(String sortBy) { - if (StringUtils.isNotBlank(sortBy)) { - params.put(PARAM_SORT_BY, sortBy); - } - return this; - } - - /** - * Toggle the inclusion of adult titles - * - * @param includeAdult - * @return - */ - public Discover includeAdult(boolean includeAdult) { - params.put(PARAM_ADULT, String.valueOf(includeAdult)); - return this; - } - - /** - * Filter the results release dates to matches that include this value. - * - * @param year - * @return - */ - public Discover year(int year) { - if (checkYear(year)) { - params.put(PARAM_YEAR, String.valueOf(year)); - } - return this; - } - - /** - * Filter the results so that only the primary release date year has this value - * - * @param primaryReleaseYear - * @return - */ - public Discover primaryReleaseYear(int primaryReleaseYear) { - if (checkYear(primaryReleaseYear)) { - params.put(PARAM_PRIMARY_RELEASE_YEAR, String.valueOf(primaryReleaseYear)); - } - return this; - } - - /** - * Only include movies that are equal to, or have a vote count higher than this value - * - * @param voteCountGte - * @return - */ - public Discover voteCountGte(int voteCountGte) { - if (voteCountGte > 0) { - params.put(PARAM_VOTE_COUNT_GTE, String.valueOf(voteCountGte)); - } - return this; - } - - /** - * Only include movies that are equal to, or have a higher average rating than this value - * - * @param voteAverageGte - * @return - */ - public Discover voteAverageGte(float voteAverageGte) { - if (voteAverageGte > 0) { - params.put(PARAM_VOTE_AVERAGE_GTE, String.valueOf(voteAverageGte)); - } - return this; - } - - /** - * Only include movies with the specified genres. - *

- * Expected value is an integer (the id of a genre). - *

- * Multiple values can be specified. - *

- * Comma separated indicates an 'AND' query, while a pipe (|) separated value indicates an 'OR' - * - * @param withGenres - * @return - */ - public Discover withGenres(String withGenres) { - if (StringUtils.isNotBlank(withGenres)) { - params.put(PARAM_WITH_GENRES, withGenres); - } - return this; - } - - /** - * The minimum release to include. - *

- * Expected format is YYYY-MM-DD. - * - * @param releaseDateGte - * @return - */ - public Discover releaseDateGte(String releaseDateGte) { - if (StringUtils.isNotBlank(releaseDateGte)) { - params.put(PARAM_RELEASE_DATE_GTE, releaseDateGte); - } - return this; - } - - /** - * The maximum release to include. - *

- * Expected format is YYYY-MM-DD. - * - * @param releaseDateLte - * @return - */ - public Discover releaseDateLte(String releaseDateLte) { - if (StringUtils.isNotBlank(releaseDateLte)) { - params.put(PARAM_RELEASE_DATE_LTE, releaseDateLte); - } - return this; - } - - /** - * Only include movies with certifications for a specific country. - *

- * When this value is specified, 'certificationLte' is required. - *

- * A ISO 3166-1 is expected - * - * @param certificationCountry - * @return - */ - public Discover certificationCountry(String certificationCountry) { - if (StringUtils.isNotBlank(certificationCountry)) { - params.put(PARAM_CERTIFICATION_COUNTRY, certificationCountry); - } - return this; - } - - /** - * Only include movies with this certification and lower. - *

- * Expected value is a valid certification for the specified 'certificationCountry'. - * - * @param certificationLte - * @return - */ - public Discover certificationLte(String certificationLte) { - if (StringUtils.isNotBlank(certificationLte)) { - params.put(PARAM_CERTIFICATION_LTE, certificationLte); - } - return this; - } - - /** - * Filter movies to include a specific company. - *

- * Expected value is an integer (the id of a company). - *

- * They can be comma separated to indicate an 'AND' query - * - * @param withCompanies - * @return - */ - public Discover withCompanies(String withCompanies) { - if (StringUtils.isNotBlank(withCompanies)) { - params.put(PARAM_WITH_COMPANIES, withCompanies); - } - return this; - } - - /** - * check the year is between the min and max - * - * @param year - * @return - */ - private boolean checkYear(int year) { - return year >= YEAR_MIN && year <= YEAR_MAX; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/Genre.java b/src/main/java/com/omertron/themoviedbapi/model/Genre.java index 371dec7d2..ee6e068af 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Genre.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Genre.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/JobDepartment.java b/src/main/java/com/omertron/themoviedbapi/model/JobDepartment.java index 77d0bc21d..1a233b9a0 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/JobDepartment.java +++ b/src/main/java/com/omertron/themoviedbapi/model/JobDepartment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/Keyword.java b/src/main/java/com/omertron/themoviedbapi/model/Keyword.java index b6648d743..20f186778 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Keyword.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Keyword.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/KeywordMovie.java b/src/main/java/com/omertron/themoviedbapi/model/KeywordMovie.java deleted file mode 100644 index 6d731dd07..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/KeywordMovie.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; - -/** - * @author Stuart - */ -public class KeywordMovie extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - - /* - * Properties - */ - @JsonProperty("id") - private String id; - @JsonProperty("backdrop_path") - private String backdropPath; - @JsonProperty("original_title") - private String originalTitle; - @JsonProperty("release_date") - private String releaseDate; - @JsonProperty("poster_path") - private String posterPath; - @JsonProperty("title") - private String title; - @JsonProperty("vote_average") - private float voteAverage; - @JsonProperty("vote_count") - private double voteCount; - @JsonProperty("adult") - private boolean adult; - @JsonProperty("popularity") - private float popularity; - - public static long getSerialVersionUID() { - return serialVersionUID; - } - - public String getBackdropPath() { - return backdropPath; - } - - public String getId() { - return id; - } - - public String getOriginalTitle() { - return originalTitle; - } - - public String getReleaseDate() { - return releaseDate; - } - - public String getPosterPath() { - return posterPath; - } - - public String getTitle() { - return title; - } - - public float getVoteAverage() { - return voteAverage; - } - - public double getVoteCount() { - return voteCount; - } - - public boolean isAdult() { - return adult; - } - - public float getPopularity() { - return popularity; - } - - public void setBackdropPath(String backdropPath) { - this.backdropPath = backdropPath; - } - - public void setId(String id) { - this.id = id; - } - - public void setOriginalTitle(String originalTitle) { - this.originalTitle = originalTitle; - } - - public void setReleaseDate(String releaseDate) { - this.releaseDate = releaseDate; - } - - public void setPosterPath(String posterPath) { - this.posterPath = posterPath; - } - - public void setTitle(String title) { - this.title = title; - } - - public void setVoteAverage(float voteAverage) { - this.voteAverage = voteAverage; - } - - public void setVoteCount(double voteCount) { - this.voteCount = voteCount; - } - - public void setAdult(boolean adult) { - this.adult = adult; - } - - public void setPopularity(float popularity) { - this.popularity = popularity; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/Language.java b/src/main/java/com/omertron/themoviedbapi/model/Language.java index fc129eef3..c15db46bc 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Language.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Language.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/ListItemStatus.java b/src/main/java/com/omertron/themoviedbapi/model/ListItemStatus.java index 8c92a7b8a..63e2139cf 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ListItemStatus.java +++ b/src/main/java/com/omertron/themoviedbapi/model/ListItemStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/MovieDb.java b/src/main/java/com/omertron/themoviedbapi/model/MovieDb.java deleted file mode 100644 index 02b69e66a..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/MovieDb.java +++ /dev/null @@ -1,425 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; -import com.omertron.themoviedbapi.wrapper.*; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -import java.util.List; - -/** - * Movie Bean - * - * @author stuart.boston - */ -public class MovieDb extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - @JsonProperty("backdrop_path") - private String backdropPath; - @JsonProperty("id") - private int id; - @JsonProperty("original_title") - private String originalTitle; - @JsonProperty("popularity") - private float popularity; - @JsonProperty("poster_path") - private String posterPath; - @JsonProperty("release_date") - private String releaseDate; - @JsonProperty("title") - private String title; - @JsonProperty("adult") - private boolean adult; - @JsonProperty("belongs_to_collection") - private Collection belongsToCollection; - @JsonProperty("budget") - private long budget; - @JsonProperty("genres") - private List genres; - @JsonProperty("homepage") - private String homepage; - @JsonProperty("imdb_id") - private String imdbID; - @JsonProperty("overview") - private String overview; - @JsonProperty("production_companies") - private List productionCompanies; - @JsonProperty("production_countries") - private List productionCountries; - @JsonProperty("revenue") - private long revenue; - @JsonProperty("runtime") - private int runtime; - @JsonProperty("spoken_languages") - private List spokenLanguages; - @JsonProperty("tagline") - private String tagline; - @JsonProperty("rating") - private float userRating; - @JsonProperty("vote_average") - private float voteAverage; - @JsonProperty("vote_count") - private int voteCount; - @JsonProperty("status") - private String status; - // AppendToResponse Properties - @JsonProperty("alternative_titles") - private WrapperAlternativeTitles alternativeTitles; - @JsonProperty("casts") - private WrapperMovieCasts casts; - @JsonProperty("images") - private WrapperImages images; - @JsonProperty("keywords") - private WrapperMovieKeywords keywords; - @JsonProperty("releases") - private WrapperReleaseInfo releases; - @JsonProperty("videos") - private WrapperTrailers trailers; - @JsonProperty("translations") - private WrapperTranslations translations; - @JsonProperty("similar_movies") - private WrapperMovie similarMovies; - @JsonProperty("reviews") - private WrapperReviews reviews; - @JsonProperty("lists") - private WrapperMovieList lists; - @JsonProperty("video") - private Boolean video = null; - - // - public String getBackdropPath() { - return backdropPath; - } - - public int getId() { - return id; - } - - public String getOriginalTitle() { - return originalTitle; - } - - public float getPopularity() { - return popularity; - } - - public String getPosterPath() { - return posterPath; - } - - public String getReleaseDate() { - return releaseDate; - } - - public String getTitle() { - return title; - } - - public boolean isAdult() { - return adult; - } - - public Collection getBelongsToCollection() { - return belongsToCollection; - } - - public long getBudget() { - return budget; - } - - public List getGenres() { - return genres; - } - - public String getHomepage() { - return homepage; - } - - public String getImdbID() { - return imdbID; - } - - public String getOverview() { - return overview; - } - - public List getProductionCompanies() { - return productionCompanies; - } - - public List getProductionCountries() { - return productionCountries; - } - - public long getRevenue() { - return revenue; - } - - public int getRuntime() { - return runtime; - } - - public List getSpokenLanguages() { - return spokenLanguages; - } - - public String getTagline() { - return tagline; - } - - public float getVoteAverage() { - return voteAverage; - } - - public int getVoteCount() { - return voteCount; - } - - public String getStatus() { - return status; - } - - public float getUserRating() { - return userRating; - } - - public Boolean getVideo() { - return video; - } - // - - // - public void setBackdropPath(String backdropPath) { - this.backdropPath = backdropPath; - } - - public void setId(int id) { - this.id = id; - } - - public void setOriginalTitle(String originalTitle) { - this.originalTitle = originalTitle; - } - - public void setPopularity(float popularity) { - this.popularity = popularity; - } - - public void setPosterPath(String posterPath) { - this.posterPath = posterPath; - } - - public void setReleaseDate(String releaseDate) { - this.releaseDate = releaseDate; - } - - public void setTitle(String title) { - this.title = title; - } - - public void setAdult(boolean adult) { - this.adult = adult; - } - - public void setBelongsToCollection(Collection belongsToCollection) { - this.belongsToCollection = belongsToCollection; - } - - public void setBudget(long budget) { - this.budget = budget; - } - - public void setGenres(List genres) { - this.genres = genres; - } - - public void setHomepage(String homepage) { - this.homepage = homepage; - } - - public void setImdbID(String imdbID) { - this.imdbID = imdbID; - } - - public void setOverview(String overview) { - this.overview = overview; - } - - public void setProductionCompanies(List productionCompanies) { - this.productionCompanies = productionCompanies; - } - - public void setProductionCountries(List productionCountries) { - this.productionCountries = productionCountries; - } - - public void setRevenue(long revenue) { - this.revenue = revenue; - } - - public void setRuntime(int runtime) { - this.runtime = runtime; - } - - public void setSpokenLanguages(List spokenLanguages) { - this.spokenLanguages = spokenLanguages; - } - - public void setTagline(String tagline) { - this.tagline = tagline; - } - - public void setVoteAverage(float voteAverage) { - this.voteAverage = voteAverage; - } - - public void setVoteCount(int voteCount) { - this.voteCount = voteCount; - } - - public void setStatus(String status) { - this.status = status; - } - - public void setUserRating(float userRating) { - this.userRating = userRating; - } - - public void setVideo(Boolean video) { - this.video = video; - } - // - - // - public List getAlternativeTitles() { - return alternativeTitles.getTitles(); - } - - public List getCast() { - return casts.getCast(); - } - - public List getCrew() { - return casts.getCrew(); - } - - public List getImages() { - return images.getAll(); - } - - public List getKeywords() { - return keywords.getKeywords(); - } - - public List getReleases() { - return releases.getCountries(); - } - - public List getTrailers() { - return trailers.getTrailers(); - } - - public List getTranslations() { - return translations.getTranslations(); - } - - public List getSimilarMovies() { - return similarMovies.getMovies(); - } - - public List getLists() { - return lists.getMovieList(); - } - - public List getReviews() { - return reviews.getReviews(); - } - // - - // - public void setAlternativeTitles(WrapperAlternativeTitles alternativeTitles) { - this.alternativeTitles = alternativeTitles; - } - - public void setCasts(WrapperMovieCasts casts) { - this.casts = casts; - } - - public void setImages(WrapperImages images) { - this.images = images; - } - - public void setKeywords(WrapperMovieKeywords keywords) { - this.keywords = keywords; - } - - public void setReleases(WrapperReleaseInfo releases) { - this.releases = releases; - } - - public void setTrailers(WrapperTrailers trailers) { - this.trailers = trailers; - } - - public void setTranslations(WrapperTranslations translations) { - this.translations = translations; - } - - public void setSimilarMovies(WrapperMovie similarMovies) { - this.similarMovies = similarMovies; - } - - public void setLists(WrapperMovieList lists) { - this.lists = lists; - } - - public void setReviews(WrapperReviews reviews) { - this.reviews = reviews; - } - // - - // - @Override - public boolean equals(Object obj) { - if (obj instanceof MovieDb) { - final MovieDb other = (MovieDb) obj; - return new EqualsBuilder() - .append(id, other.id) - .append(imdbID, other.imdbID) - .append(runtime, other.runtime) - .isEquals(); - } else { - return false; - } - } - - @Override - public int hashCode() { - return new HashCodeBuilder() - .append(id) - .append(imdbID) - .append(runtime) - .toHashCode(); - } - // -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/MovieDbList.java b/src/main/java/com/omertron/themoviedbapi/model/MovieDbList.java deleted file mode 100644 index 6bb3db793..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/MovieDbList.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; -import java.util.Collections; -import java.util.List; - -/** - * Wrapper for the MovieDbList function - * - * @author stuart.boston - */ -public class MovieDbList extends AbstractJsonMapping { - - @JsonProperty("id") - private String id; - @JsonProperty("created_by") - private String createdBy; - @JsonProperty("description") - private String description; - @JsonProperty("favorite_count") - private int favoriteCount; - @JsonProperty("items") - private List items = Collections.emptyList(); - @JsonProperty("item_count") - private int itemCount; - @JsonProperty("iso_639_1") - private String language; - @JsonProperty("name") - private String name; - @JsonProperty("poster_path") - private String posterPath; - @JsonProperty("status_code") - private String statusCode; - @JsonProperty("status_message") - private String statusMessage; - - public String getId() { - return id; - } - - public String getCreatedBy() { - return createdBy; - } - - public String getDescription() { - return description; - } - - public int getFavoriteCount() { - return favoriteCount; - } - - public List getItems() { - return items; - } - - public int getItemCount() { - return itemCount; - } - - public String getLanguage() { - return language; - } - - public String getName() { - return name; - } - - public String getPosterPath() { - return posterPath; - } - - public String getStatusCode() { - return statusCode; - } - - public String getStatusMessage() { - return statusMessage; - } - - public void setId(String id) { - this.id = id; - } - - public void setCreatedBy(String createdBy) { - this.createdBy = createdBy; - } - - public void setDescription(String description) { - this.description = description; - } - - public void setFavoriteCount(int favoriteCount) { - this.favoriteCount = favoriteCount; - } - - public void setItems(List items) { - this.items = items; - } - - public void setItemCount(int itemCount) { - this.itemCount = itemCount; - } - - public void setLanguage(String language) { - this.language = language; - } - - public void setName(String name) { - this.name = name; - } - - public void setPosterPath(String posterPath) { - this.posterPath = posterPath; - } - - public void setStatusCode(String statusCode) { - this.statusCode = statusCode; - } - - public void setStatusMessage(String statusMessage) { - this.statusMessage = statusMessage; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/MovieDbListStatus.java b/src/main/java/com/omertron/themoviedbapi/model/MovieDbListStatus.java deleted file mode 100644 index 1b41ff111..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/MovieDbListStatus.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2014 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;private either version 3 of the License;private or - * any later version. - * - * TheMovieDB API is distributed in the hope that it will be useful;private - * 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;private see . - * - */ -package com.omertron.themoviedbapi.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class MovieDbListStatus extends StatusCode { - - @JsonProperty("list_id") - private String listId; - - public String getListId() { - return listId; - } - - public void setListId(String listId) { - this.listId = listId; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/MovieList.java b/src/main/java/com/omertron/themoviedbapi/model/MovieList.java deleted file mode 100644 index ad1b449d0..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/MovieList.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; - -/** - * @author Stuart - */ -public class MovieList extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - - @JsonProperty("description") - private String description; - @JsonProperty("favorite_count") - private int favoriteCount; - @JsonProperty("id") - private String id; - @JsonProperty("item_count") - private int itemCount; - @JsonProperty("iso_639_1") - private String language; - @JsonProperty("name") - private String name; - @JsonProperty("poster_path") - private String posterPath; - @JsonProperty("list_type") - private String listType; - - public String getDescription() { - return description; - } - - public int getFavoriteCount() { - return favoriteCount; - } - - public String getId() { - return id; - } - - public int getItemCount() { - return itemCount; - } - - public String getLanguage() { - return language; - } - - public String getName() { - return name; - } - - public String getPosterPath() { - return posterPath; - } - - public String getListType() { - return listType; - } - - public void setDescription(String description) { - this.description = description; - } - - public void setFavoriteCount(int favoriteCount) { - this.favoriteCount = favoriteCount; - } - - public void setId(String id) { - this.id = id; - } - - public void setItemCount(int itemCount) { - this.itemCount = itemCount; - } - - public void setLanguage(String language) { - this.language = language; - } - - public void setName(String name) { - this.name = name; - } - - public void setPosterPath(String posterPath) { - this.posterPath = posterPath; - } - - public void setListType(String listType) { - this.listType = listType; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/Person.java b/src/main/java/com/omertron/themoviedbapi/model/Person.java deleted file mode 100644 index 6ad67e2fb..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/Person.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; -import java.util.ArrayList; -import java.util.List; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - * @author stuart.boston - */ -public class Person extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - - /* - * Static fields for default cast information - */ - private static final String CAST_DEPARTMENT = "acting"; - private static final String CAST_JOB = "actor"; - private static final String DEFAULT_STRING = ""; - /* - * Properties - */ - @JsonProperty("id") - private int id = -1; - @JsonProperty("name") - private String name = ""; - @JsonProperty("profile_path") - private String profilePath = DEFAULT_STRING; - private PersonType personType = PersonType.PERSON; - // Crew - private String department = DEFAULT_STRING; - // Crew - private String job = DEFAULT_STRING; - // Cast - private String character = DEFAULT_STRING; - // Cast - private int order = -1; - @JsonProperty("adult") - // Person info - private boolean adult = false; - @JsonProperty("also_known_as") - private List aka = new ArrayList(); - @JsonProperty("biography") - private String biography = DEFAULT_STRING; - @JsonProperty("birthday") - private String birthday = DEFAULT_STRING; - @JsonProperty("deathday") - private String deathday = DEFAULT_STRING; - @JsonProperty("homepage") - private String homepage = DEFAULT_STRING; - @JsonProperty("place_of_birth") - private String birthplace = DEFAULT_STRING; - @JsonProperty("imdb_id") - private String imdbId = DEFAULT_STRING; - @JsonProperty("popularity") - private float popularity = 0.0f; - @JsonProperty("known_for") - private List knownFor; - - /** - * Add a crew member - * - * @param id - * @param name - * @param profilePath - * @param department - * @param job - */ - public void addCrew(int id, String name, String profilePath, String department, String job) { - setPersonType(PersonType.CREW); - setId(id); - setName(name); - setProfilePath(profilePath); - setDepartment(department); - setJob(job); - setCharacter(""); - setOrder(-1); - } - - /** - * Add a cast member - * - * @param id - * @param name - * @param profilePath - * @param character - * @param order - */ - public void addCast(int id, String name, String profilePath, String character, int order) { - setPersonType(PersonType.CAST); - setId(id); - setName(name); - setProfilePath(profilePath); - setCharacter(character); - setOrder(order); - setDepartment(CAST_DEPARTMENT); - setJob(CAST_JOB); - } - - public String getCharacter() { - return character; - } - - public String getDepartment() { - return department; - } - - public int getId() { - return id; - } - - public String getJob() { - return job; - } - - public String getName() { - return name; - } - - public int getOrder() { - return order; - } - - public PersonType getPersonType() { - return personType; - } - - public String getProfilePath() { - return profilePath; - } - - public boolean isAdult() { - return adult; - } - - public List getAka() { - return aka; - } - - public String getBiography() { - return biography; - } - - public String getBirthday() { - return birthday; - } - - public String getBirthplace() { - return birthplace; - } - - public String getDeathday() { - return deathday; - } - - public String getHomepage() { - return homepage; - } - - public String getImdbId() { - return imdbId; - } - - public float getPopularity() { - return popularity; - } - - public void setCharacter(String character) { - this.character = character; - } - - public void setDepartment(String department) { - this.department = department; - } - - public void setId(int id) { - this.id = id; - } - - public void setJob(String job) { - this.job = StringUtils.trimToEmpty(job); - } - - public void setName(String name) { - this.name = StringUtils.trimToEmpty(name); - } - - public void setOrder(int order) { - this.order = order; - } - - public void setPersonType(PersonType personType) { - this.personType = personType; - } - - public void setProfilePath(String profilePath) { - this.profilePath = StringUtils.trimToEmpty(profilePath); - } - - public void setAdult(boolean adult) { - this.adult = adult; - } - - public void setAka(List aka) { - this.aka = aka; - } - - public void setBiography(String biography) { - this.biography = StringUtils.trimToEmpty(biography); - } - - public void setBirthday(String birthday) { - this.birthday = StringUtils.trimToEmpty(birthday); - } - - public void setBirthplace(String birthplace) { - this.birthplace = StringUtils.trimToEmpty(birthplace); - } - - public void setDeathday(String deathday) { - this.deathday = StringUtils.trimToEmpty(deathday); - } - - public void setHomepage(String homepage) { - this.homepage = StringUtils.trimToEmpty(homepage); - } - - public void setImdbId(String imdbId) { - this.imdbId = StringUtils.trimToEmpty(imdbId); - } - - public void setPopularity(float popularity) { - this.popularity = popularity; - } - - public List getKnownFor() { - return knownFor; - } - - public void setKnownFor(List knownFor) { - this.knownFor = knownFor; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof Person) { - final Person other = (Person) obj; - return new EqualsBuilder() - .append(id, other.id) - .append(name, other.name) - .append(profilePath, other.profilePath) - .append(personType, other.personType) - .append(department, other.department) - .append(job, other.job) - .append(character, other.character) - .isEquals(); - } else { - return false; - } - } - - @Override - public int hashCode() { - return new HashCodeBuilder() - .append(id) - .append(name) - .append(profilePath) - .append(personType) - .append(department) - .append(job) - .append(character) - .toHashCode(); - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/PersonCast.java b/src/main/java/com/omertron/themoviedbapi/model/PersonCast.java deleted file mode 100644 index 5d0a0ac08..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/PersonCast.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - * @author Stuart - */ -public class PersonCast extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - - /* - * Properties - */ - @JsonProperty("id") - private int id; - @JsonProperty("character") - private String character; - @JsonProperty("name") - private String name; - @JsonProperty("order") - private int order; - @JsonProperty("profile_path") - private String profilePath; - @JsonProperty("cast_id") - private int castId; - @JsonProperty("credit_id") - private String creditId; - - public String getCharacter() { - return character; - } - - public int getId() { - return id; - } - - public String getName() { - return name; - } - - public int getOrder() { - return order; - } - - public String getProfilePath() { - return profilePath; - } - - public int getCastId() { - return castId; - } - - public void setCharacter(String character) { - this.character = StringUtils.trimToEmpty(character); - } - - public void setId(int id) { - this.id = id; - } - - public void setName(String name) { - this.name = StringUtils.trimToEmpty(name); - } - - public void setOrder(int order) { - this.order = order; - } - - public void setProfilePath(String profilePath) { - this.profilePath = StringUtils.trimToEmpty(profilePath); - } - - public void setCastId(int castId) { - this.castId = castId; - } - - public String getCreditId() { - return creditId; - } - - public void setCreditId(String creditId) { - this.creditId = creditId; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof PersonCast) { - final PersonCast other = (PersonCast) obj; - return new EqualsBuilder() - .append(id, other.id) - .append(name, other.name) - .append(character, other.character) - .append(order, other.order) - .append(profilePath, other.profilePath) - .isEquals(); - } else { - return false; - } - } - - @Override - public int hashCode() { - return new HashCodeBuilder() - .append(id) - .append(character) - .append(name) - .append(order) - .append(profilePath) - .toHashCode(); - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/PersonCredit.java b/src/main/java/com/omertron/themoviedbapi/model/PersonCredit.java deleted file mode 100644 index d7bb992d9..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/PersonCredit.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; -import org.apache.commons.lang3.StringUtils; - -/** - * @author stuart.boston - */ -public class PersonCredit extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - private static final String DEFAULT_STRING = ""; - /* - * Properties - */ - @JsonProperty("id") - private int movieId = 0; - @JsonProperty("character") - private String character = DEFAULT_STRING; - @JsonProperty("original_title") - private String movieOriginalTitle = DEFAULT_STRING; - @JsonProperty("poster_path") - private String posterPath = DEFAULT_STRING; - @JsonProperty("backdrop_path") - private String backdropPath = DEFAULT_STRING; - @JsonProperty("release_date") - private String releaseDate = DEFAULT_STRING; - @JsonProperty("title") - private String movieTitle = DEFAULT_STRING; - @JsonProperty("department") - private String department = DEFAULT_STRING; - @JsonProperty("job") - private String job = DEFAULT_STRING; - @JsonProperty("adult") - private String adult = DEFAULT_STRING; - @JsonProperty("credit_id") - private String creditId = DEFAULT_STRING; - private PersonType personType = PersonType.PERSON; - @JsonProperty("popularity") - private float popularity; - @JsonProperty("vote_average") - private float voteAverage; - @JsonProperty("vote_count") - private int voteCount; - @JsonProperty("media_type") - private String mediaType; - - public String getCharacter() { - return character; - } - - public String getDepartment() { - return department; - } - - public String getJob() { - return job; - } - - public int getMovieId() { - return movieId; - } - - public String getMovieOriginalTitle() { - return movieOriginalTitle; - } - - public String getMovieTitle() { - return movieTitle; - } - - public PersonType getPersonType() { - return personType; - } - - public String getPosterPath() { - return posterPath; - } - - public String getReleaseDate() { - return releaseDate; - } - - public String getAdult() { - return adult; - } - - public String getCreditId() { - return creditId; - } - - public void setCharacter(String character) { - this.character = StringUtils.trimToEmpty(character); - } - - public void setDepartment(String department) { - this.department = StringUtils.trimToEmpty(department); - } - - public void setJob(String job) { - this.job = StringUtils.trimToEmpty(job); - } - - public void setMovieId(int movieId) { - this.movieId = movieId; - } - - public void setMovieOriginalTitle(String movieOriginalTitle) { - this.movieOriginalTitle = StringUtils.trimToEmpty(movieOriginalTitle); - } - - public void setMovieTitle(String movieTitle) { - this.movieTitle = StringUtils.trimToEmpty(movieTitle); - } - - public void setPersonType(PersonType personType) { - this.personType = personType; - } - - public void setPosterPath(String posterPath) { - this.posterPath = StringUtils.trimToEmpty(posterPath); - } - - public void setReleaseDate(String releaseDate) { - this.releaseDate = StringUtils.trimToEmpty(releaseDate); - } - - public void setAdult(String adult) { - this.adult = StringUtils.trimToEmpty(adult); - } - - public void setCreditId(String creditId) { - this.creditId = creditId; - } - - public String getBackdropPath() { - return backdropPath; - } - - public void setBackdropPath(String backdropPath) { - this.backdropPath = backdropPath; - } - - public float getPopularity() { - return popularity; - } - - public void setPopularity(float popularity) { - this.popularity = popularity; - } - - public float getVoteAverage() { - return voteAverage; - } - - public void setVoteAverage(float voteAverage) { - this.voteAverage = voteAverage; - } - - public int getVoteCount() { - return voteCount; - } - - public void setVoteCount(int voteCount) { - this.voteCount = voteCount; - } - - public String getMediaType() { - return mediaType; - } - - public void setMediaType(String mediaType) { - this.mediaType = mediaType; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/PersonCrew.java b/src/main/java/com/omertron/themoviedbapi/model/PersonCrew.java deleted file mode 100644 index 87b5c573a..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/PersonCrew.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - * @author Stuart - */ -public class PersonCrew extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - - /* - * Properties - */ - @JsonProperty("id") - private int id; - @JsonProperty("department") - private String department; - @JsonProperty("job") - private String job; - @JsonProperty("name") - private String name; - @JsonProperty("profile_path") - private String profilePath; - @JsonProperty("credit_id") - private String creditId; - - public String getDepartment() { - return department; - } - - public int getId() { - return id; - } - - public String getJob() { - return job; - } - - public String getName() { - return name; - } - - public String getProfilePath() { - return profilePath; - } - - public String getCreditId() { - return creditId; - } - - public void setCreditId(String creditId) { - this.creditId = creditId; - } - - public void setDepartment(String department) { - this.department = StringUtils.trimToEmpty(department); - } - - public void setId(int id) { - this.id = id; - } - - public void setJob(String job) { - this.job = StringUtils.trimToEmpty(job); - } - - public void setName(String name) { - this.name = StringUtils.trimToEmpty(name); - } - - public void setProfilePath(String profilePath) { - this.profilePath = StringUtils.trimToEmpty(profilePath); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof PersonCrew) { - final PersonCrew other = (PersonCrew) obj; - return new EqualsBuilder() - .append(id, other.id) - .append(name, other.name) - .append(department, other.department) - .append(job, other.job) - .isEquals(); - } else { - return false; - } - } - - @Override - public int hashCode() { - return new HashCodeBuilder() - .append(id) - .append(department) - .append(job) - .append(name) - .append(profilePath) - .toHashCode(); - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/PersonType.java b/src/main/java/com/omertron/themoviedbapi/model/PersonType.java deleted file mode 100644 index f62bd582e..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/PersonType.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2004-2014 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; - -/** - * @author stuart.boston - */ -public enum PersonType { - - // A member of the cast - CAST, - // A member of the crew - CREW, - // No specific type - PERSON -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/ProductionCompany.java b/src/main/java/com/omertron/themoviedbapi/model/ProductionCompany.java index cec93322b..bd3e5e2f2 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ProductionCompany.java +++ b/src/main/java/com/omertron/themoviedbapi/model/ProductionCompany.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/ProductionCountry.java b/src/main/java/com/omertron/themoviedbapi/model/ProductionCountry.java index 7b8b0358b..fa0cd54ba 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ProductionCountry.java +++ b/src/main/java/com/omertron/themoviedbapi/model/ProductionCountry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/ReleaseInfo.java b/src/main/java/com/omertron/themoviedbapi/model/ReleaseInfo.java index 08a602b79..189b9a8a4 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ReleaseInfo.java +++ b/src/main/java/com/omertron/themoviedbapi/model/ReleaseInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/Reviews.java b/src/main/java/com/omertron/themoviedbapi/model/Reviews.java deleted file mode 100644 index c74e19fa4..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/Reviews.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; - -/** - * @author Stuart - */ -public class Reviews extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - - /* - * Properties - */ - @JsonProperty("id") - private String id; - @JsonProperty("author") - private String author; - @JsonProperty("content") - private String content; - @JsonProperty("url") - private String url; - - public String getId() { - return id; - } - - public String getAuthor() { - return author; - } - - public String getContent() { - return content; - } - - public String getUrl() { - return url; - } - - public void setId(String id) { - this.id = id; - } - - public void setAuthor(String author) { - this.author = author; - } - - public void setContent(String content) { - this.content = content; - } - - public void setUrl(String url) { - this.url = url; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/StatusCode.java b/src/main/java/com/omertron/themoviedbapi/model/StatusCode.java index e3dee1906..147df5938 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/StatusCode.java +++ b/src/main/java/com/omertron/themoviedbapi/model/StatusCode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/TmdbConfiguration.java b/src/main/java/com/omertron/themoviedbapi/model/TmdbConfiguration.java deleted file mode 100644 index 128072d77..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/TmdbConfiguration.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.JsonProperty; -import java.util.List; -import org.apache.commons.lang3.StringUtils; - -/** - * @author stuart.boston - */ -public class TmdbConfiguration extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - /* - * Properties - */ - @JsonProperty("base_url") - private String baseUrl; - @JsonProperty("secure_base_url") - private String secureBaseUrl; - @JsonProperty("poster_sizes") - private List posterSizes; - @JsonProperty("backdrop_sizes") - private List backdropSizes; - @JsonProperty("profile_sizes") - private List profileSizes; - @JsonProperty("logo_sizes") - private List logoSizes; - @JsonProperty("still_sizes") - private List stillSizes; - - public List getBackdropSizes() { - return backdropSizes; - } - - public String getBaseUrl() { - return baseUrl; - } - - public List getPosterSizes() { - return posterSizes; - } - - public List getProfileSizes() { - return profileSizes; - } - - public List getLogoSizes() { - return logoSizes; - } - - public String getSecureBaseUrl() { - return secureBaseUrl; - } - - public List getStillSizes() { - return stillSizes; - } - - public void setBackdropSizes(List backdropSizes) { - this.backdropSizes = backdropSizes; - } - - public void setBaseUrl(String baseUrl) { - this.baseUrl = baseUrl; - } - - public void setPosterSizes(List posterSizes) { - this.posterSizes = posterSizes; - } - - public void setProfileSizes(List profileSizes) { - this.profileSizes = profileSizes; - } - - public void setLogoSizes(List logoSizes) { - this.logoSizes = logoSizes; - } - - public void setSecureBaseUrl(String secureBaseUrl) { - this.secureBaseUrl = secureBaseUrl; - } - - public void setStillSizes(List stillSizes) { - this.stillSizes = stillSizes; - } - - /** - * Copy the data from the passed object to this one - * - * @param config - */ - public void clone(TmdbConfiguration config) { - backdropSizes = config.getBackdropSizes(); - baseUrl = config.getBaseUrl(); - posterSizes = config.getPosterSizes(); - profileSizes = config.getProfileSizes(); - logoSizes = config.getLogoSizes(); - } - - /** - * Check that the poster size is valid - * - * @param posterSize - * @return - */ - public boolean isValidPosterSize(String posterSize) { - if (StringUtils.isBlank(posterSize) || posterSizes.isEmpty()) { - return false; - } - return posterSizes.contains(posterSize); - } - - /** - * Check that the backdrop size is valid - * - * @param backdropSize - * @return - */ - public boolean isValidBackdropSize(String backdropSize) { - if (StringUtils.isBlank(backdropSize) || backdropSizes.isEmpty()) { - return false; - } - return backdropSizes.contains(backdropSize); - } - - /** - * Check that the profile size is valid - * - * @param profileSize - * @return - */ - public boolean isValidProfileSize(String profileSize) { - if (StringUtils.isBlank(profileSize) || profileSizes.isEmpty()) { - return false; - } - return profileSizes.contains(profileSize); - } - - /** - * Check that the logo size is valid - * - * @param logoSize - * @return - */ - public boolean isValidLogoSize(String logoSize) { - if (StringUtils.isBlank(logoSize) || logoSizes.isEmpty()) { - return false; - } - return logoSizes.contains(logoSize); - } - - /** - * Check to see if the size is valid for any of the images types - * - * @param sizeToCheck - * @return - */ - public boolean isValidSize(String sizeToCheck) { - return isValidPosterSize(sizeToCheck) - || isValidBackdropSize(sizeToCheck) - || isValidProfileSize(sizeToCheck) - || isValidLogoSize(sizeToCheck); - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/TokenAuthorisation.java b/src/main/java/com/omertron/themoviedbapi/model/TokenAuthorisation.java index db323dcc8..127add677 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/TokenAuthorisation.java +++ b/src/main/java/com/omertron/themoviedbapi/model/TokenAuthorisation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/TokenSession.java b/src/main/java/com/omertron/themoviedbapi/model/TokenSession.java index a813cc9c9..6fc741472 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/TokenSession.java +++ b/src/main/java/com/omertron/themoviedbapi/model/TokenSession.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/Trailer.java b/src/main/java/com/omertron/themoviedbapi/model/Trailer.java index 1c82c4a5f..7d4dadd48 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Trailer.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Trailer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/Translation.java b/src/main/java/com/omertron/themoviedbapi/model/Translation.java index 6ba152ebe..2e884deab 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Translation.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Translation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/model/comparator/PersonCreditDateComparator.java b/src/main/java/com/omertron/themoviedbapi/model/comparator/PersonCreditDateComparator.java index 5f7cc175a..32aee93c2 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/comparator/PersonCreditDateComparator.java +++ b/src/main/java/com/omertron/themoviedbapi/model/comparator/PersonCreditDateComparator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/results/AbstractResults.java b/src/main/java/com/omertron/themoviedbapi/results/AbstractResults.java index 7926f5e8d..16da45fd9 100644 --- a/src/main/java/com/omertron/themoviedbapi/results/AbstractResults.java +++ b/src/main/java/com/omertron/themoviedbapi/results/AbstractResults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/results/TmdbResultsList.java b/src/main/java/com/omertron/themoviedbapi/results/TmdbResultsList.java index 5204c35d2..f9b29e5f6 100644 --- a/src/main/java/com/omertron/themoviedbapi/results/TmdbResultsList.java +++ b/src/main/java/com/omertron/themoviedbapi/results/TmdbResultsList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/results/TmdbResultsMap.java b/src/main/java/com/omertron/themoviedbapi/results/TmdbResultsMap.java index 59b3b9bfc..a0e0ad3a2 100644 --- a/src/main/java/com/omertron/themoviedbapi/results/TmdbResultsMap.java +++ b/src/main/java/com/omertron/themoviedbapi/results/TmdbResultsMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/tools/ApiUrl.java b/src/main/java/com/omertron/themoviedbapi/tools/ApiUrl.java deleted file mode 100644 index b113ffb62..000000000 --- a/src/main/java/com/omertron/themoviedbapi/tools/ApiUrl.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.tools; - -import java.io.UnsupportedEncodingException; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.Map; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The API URL that is used to construct the API call - * - * @author Stuart - */ -public class ApiUrl { - - /* - * Logger - */ - private static final Logger LOG = LoggerFactory.getLogger(ApiUrl.class); - /* - * TheMovieDbApi API Base URL - */ - private static final String TMDB_API_BASE = "http://api.themoviedb.org/3/"; - /* - * Parameter configuration - */ - private static final String DELIMITER_FIRST = "?"; - private static final String DELIMITER_SUBSEQUENT = "&"; - private static final String DEFAULT_STRING = ""; - /* - * Properties - */ - private final String apiKey; - private final String method; - private final String submethod; - private final Map arguments = new HashMap(); - /* - * API Parameters - */ - public static final String PARAM_ADULT = "include_adult="; - public static final String PARAM_API_KEY = "api_key="; - public static final String PARAM_COUNTRY = "country="; - public static final String PARAM_FAVORITE = "favorite="; - public static final String PARAM_ID = "id="; - public static final String PARAM_LANGUAGE = "language="; - public static final String PARAM_INCLUDE_ALL_MOVIES = "include_all_movies="; - public static final String PARAM_MOVIE_WATCHLIST = "movie_watchlist="; - public static final String PARAM_PAGE = "page="; - public static final String PARAM_QUERY = "query="; - public static final String PARAM_SESSION = "session_id="; - public static final String PARAM_TOKEN = "request_token="; - public static final String PARAM_VALUE = "value="; - public static final String PARAM_YEAR = "year="; - public static final String PARAM_START_DATE = "start_date="; - public static final String PARAM_END_DATE = "end_date="; - private static final String APPEND_TO_RESPONSE = "append_to_response="; - - // - /** - * Constructor for the simple API URL method without a sub-method - * - * @param apiKey - * @param method - */ - public ApiUrl(String apiKey, String method) { - this.apiKey = apiKey; - this.method = method; - this.submethod = DEFAULT_STRING; - } - - /** - * Constructor for the API URL with a sub-method - * - * @param apiKey - * @param method - * @param submethod - */ - public ApiUrl(String apiKey, String method, String submethod) { - this.apiKey = apiKey; - this.method = method; - this.submethod = submethod; - } - // - - /** - * Build the URL from the pre-created arguments. - * - * @return - */ - public URL buildUrl() { - StringBuilder urlString = new StringBuilder(TMDB_API_BASE); - - // Get the start of the URL - urlString.append(method); - - // We have either a queury, or a direct request - if (arguments.containsKey(PARAM_QUERY)) { - // Append the suffix of the API URL - if (StringUtils.endsWith(urlString, "/") && submethod.startsWith("/")) { - urlString.deleteCharAt(urlString.length() - 1); - } - urlString.append(submethod); - - // Append the key information - urlString.append(DELIMITER_FIRST).append(PARAM_API_KEY); - urlString.append(apiKey); - - // Append the search term - urlString.append(DELIMITER_SUBSEQUENT); - urlString.append(PARAM_QUERY); - - String query = arguments.get(PARAM_QUERY); - - try { - urlString.append(URLEncoder.encode(query, "UTF-8")); - } catch (UnsupportedEncodingException ex) { - LOG.trace("Unable to encode query: '{}' trying raw.", query, ex); - // If we can't encode it, try it raw - urlString.append(query); - } - - // Remove the query from the arguments so it is not added later - arguments.remove(PARAM_QUERY); - } else { - // Append the ID if provided - if (arguments.containsKey(PARAM_ID)) { - urlString.append(arguments.get(PARAM_ID)); - arguments.remove(PARAM_ID); - } - - // Append the suffix of the API URL - if (StringUtils.endsWith(urlString, "/") && submethod.startsWith("/")) { - urlString.deleteCharAt(urlString.length() - 1); - } - urlString.append(submethod); - - // Append the key information - urlString.append(DELIMITER_FIRST).append(PARAM_API_KEY); - urlString.append(apiKey); - } - - for (Map.Entry argEntry : arguments.entrySet()) { - urlString.append(DELIMITER_SUBSEQUENT).append(argEntry.getKey()); - urlString.append(argEntry.getValue()); - } - - try { - LOG.trace("URL: {}", urlString.toString()); - return new URL(urlString.toString()); - } catch (MalformedURLException ex) { - LOG.warn("Failed to create URL {} - {}", urlString.toString(), ex.toString()); - return null; - } finally { - arguments.clear(); - } - } - - /** - * Add arguments individually - * - * @param key - * @param value - */ - public void addArgument(String key, String value) { - arguments.put(key, value); - } - - /** - * Add arguments individually - * - * @param key - * @param value - */ - public void addArgument(String key, int value) { - arguments.put(key, Integer.toString(value)); - } - - /** - * Add arguments individually - * - * @param key - * @param value - */ - public void addArgument(String key, boolean value) { - arguments.put(key, Boolean.toString(value)); - } - - /** - * Add arguments individually - * - * @param key - * @param value - */ - public void addArgument(String key, float value) { - arguments.put(key, Float.toString(value)); - } - - /** - * Clear the arguments - */ - public void clearArguments() { - arguments.clear(); - } - - /** - * Set the arguments directly - * - * @param args - */ - public void setArguments(Map args) { - arguments.putAll(args); - } - - /** - * Append any optional parameters to the URL - * - * @param appendToResponse - */ - public void appendToResponse(String[] appendToResponse) { - if (appendToResponse.length > 0) { - StringBuilder sb = new StringBuilder(); - boolean first = Boolean.TRUE; - for (String append : appendToResponse) { - if (first) { - first = Boolean.FALSE; - } else { - sb.append(","); - } - sb.append(append); - } - addArgument(APPEND_TO_RESPONSE, sb.toString()); - } - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/tools/WebBrowser.java b/src/main/java/com/omertron/themoviedbapi/tools/WebBrowser.java deleted file mode 100644 index fe019db39..000000000 --- a/src/main/java/com/omertron/themoviedbapi/tools/WebBrowser.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.tools; - -import com.omertron.themoviedbapi.MovieDbException; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.StringWriter; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.nio.charset.Charset; -import java.nio.charset.UnsupportedCharsetException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Web browser with simple cookies support - */ -public final class WebBrowser { - - private static final Logger LOG = LoggerFactory.getLogger(WebBrowser.class); - private static final Map BROWSER_PROPERTIES = new HashMap(); - private static final Map> COOKIES = new HashMap>(); - private static String proxyHost = null; - private static int proxyPort = 0; - private static String proxyUsername = null; - private static String proxyPassword = null; - private static String proxyEncodedPassword = null; - // 25 second timeout - private static int webTimeoutConnect = 25000; - // 90 second timeout - private static int webTimeoutRead = 90000; - - // Hide the constructor - protected WebBrowser() { - // prevents calls from subclass - throw new UnsupportedOperationException(); - } - - /** - * Populate the browser properties - */ - private static void populateBrowserProperties() { - if (BROWSER_PROPERTIES.isEmpty()) { - BROWSER_PROPERTIES.put("User-Agent", "Mozilla/5.25 Netscape/5.0 (Windows; I; Win95)"); - BROWSER_PROPERTIES.put("Accept", "application/json"); - BROWSER_PROPERTIES.put("Content-type", "application/json"); - } - } - - public static String request(String url) throws MovieDbException { - try { - return request(new URL(url)); - } catch (MalformedURLException ex) { - throw new MovieDbException(MovieDbException.MovieDbExceptionType.INVALID_URL, null, url, ex); - } - } - - public static URLConnection openProxiedConnection(URL url) throws MovieDbException { - try { - if (proxyHost != null) { - System.getProperties().put("proxySet", "true"); - System.getProperties().put("proxyHost", proxyHost); - System.getProperties().put("proxyPort", proxyPort); - } - - URLConnection cnx = url.openConnection(); - - if (proxyUsername != null) { - cnx.setRequestProperty("Proxy-Authorization", proxyEncodedPassword); - } - - return cnx; - } catch (IOException ex) { - throw new MovieDbException(MovieDbException.MovieDbExceptionType.INVALID_URL, null, url, ex); - } - } - - public static String request(URL url) throws MovieDbException { - return request(url, null, Boolean.FALSE); - } - - public static String request(URL url, String jsonBody) throws MovieDbException { - return request(url, jsonBody, Boolean.FALSE); - } - - public static String request(URL url, String jsonBody, boolean isDeleteRequest) throws MovieDbException { - - StringWriter content = null; - - try { - content = new StringWriter(); - - BufferedReader in = null; - HttpURLConnection cnx = null; - OutputStreamWriter wr = null; - try { - cnx = (HttpURLConnection) openProxiedConnection(url); - - // If we get a null connection, then throw an exception - if (cnx == null) { - throw new MovieDbException(MovieDbException.MovieDbExceptionType.CONNECTION_ERROR, "No HTTP connection could be made.", url); - } - - if (isDeleteRequest) { - cnx.setDoOutput(true); - cnx.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - cnx.setRequestMethod("DELETE"); - } - - sendHeader(cnx); - - if (StringUtils.isNotBlank(jsonBody)) { - cnx.setDoOutput(true); - wr = new OutputStreamWriter(cnx.getOutputStream()); - wr.write(jsonBody); - } - - readHeader(cnx); - - // http://stackoverflow.com/questions/4633048/httpurlconnection-reading-response-content-on-403-error - if (cnx.getResponseCode() >= 400) { - in = new BufferedReader(new InputStreamReader(cnx.getErrorStream(), getCharset(cnx))); - } else { - in = new BufferedReader(new InputStreamReader(cnx.getInputStream(), getCharset(cnx))); - } - - String line; - while ((line = in.readLine()) != null) { - content.write(line); - } - } finally { - if (wr != null) { - wr.flush(); - wr.close(); - } - - if (in != null) { - in.close(); - } - - if (cnx instanceof HttpURLConnection) { - ((HttpURLConnection) cnx).disconnect(); - } - } - return content.toString(); - } catch (IOException ex) { - throw new MovieDbException(MovieDbException.MovieDbExceptionType.CONNECTION_ERROR, null, url, ex); - } finally { - if (content != null) { - try { - content.close(); - } catch (IOException ex) { - LOG.debug("Failed to close connection: " + ex.getMessage()); - } - } - } - } - - private static void sendHeader(URLConnection cnx) { - populateBrowserProperties(); - - // send browser properties - for (Map.Entry browserProperty : BROWSER_PROPERTIES.entrySet()) { - cnx.setRequestProperty(browserProperty.getKey(), browserProperty.getValue()); - } - // send cookies - String cookieHeader = createCookieHeader(cnx); - if (!cookieHeader.isEmpty()) { - cnx.setRequestProperty("Cookie", cookieHeader); - } - } - - private static String createCookieHeader(URLConnection cnx) { - String host = cnx.getURL().getHost(); - StringBuilder cookiesHeader = new StringBuilder(); - for (Map.Entry> domainCookies : COOKIES.entrySet()) { - if (host.endsWith(domainCookies.getKey())) { - for (Map.Entry cookie : domainCookies.getValue().entrySet()) { - cookiesHeader.append(cookie.getKey()); - cookiesHeader.append("="); - cookiesHeader.append(cookie.getValue()); - cookiesHeader.append(";"); - } - } - } - if (cookiesHeader.length() > 0) { - // remove last ; char - cookiesHeader.deleteCharAt(cookiesHeader.length() - 1); - } - return cookiesHeader.toString(); - } - - private static void readHeader(URLConnection cnx) { - // read new cookies and update our cookies - for (Map.Entry> header : cnx.getHeaderFields().entrySet()) { - if ("Set-Cookie".equals(header.getKey())) { - for (String cookieHeader : header.getValue()) { - String[] cookieElements = cookieHeader.split(" *; *"); - if (cookieElements.length >= 1) { - String[] firstElem = cookieElements[0].split(" *= *"); - String cookieName = firstElem[0]; - String cookieValue = firstElem.length > 1 ? firstElem[1] : null; - String cookieDomain = null; - // find cookie domain - for (int i = 1; i < cookieElements.length; i++) { - String[] cookieElement = cookieElements[i].split(" *= *"); - if ("domain".equals(cookieElement[0])) { - cookieDomain = cookieElement.length > 1 ? cookieElement[1] : null; - break; - } - } - if (cookieDomain == null) { - // if domain isn't set take current host - cookieDomain = cnx.getURL().getHost(); - } - Map domainCookies = COOKIES.get(cookieDomain); - if (domainCookies == null) { - domainCookies = new HashMap(); - COOKIES.put(cookieDomain, domainCookies); - } - // add or replace cookie - domainCookies.put(cookieName, cookieValue); - } - } - } - } - } - - private static Charset getCharset(URLConnection cnx) { - Charset charset = null; - // content type will be string like "text/html; charset=UTF-8" or "text/html" - String contentType = cnx.getContentType(); - if (contentType != null) { - // changed 'charset' to 'harset' in regexp because some sites send 'Charset' - Matcher m = Pattern.compile("harset *=[ '\"]*([^ ;'\"]+)[ ;'\"]*").matcher(contentType); - if (m.find()) { - String encoding = m.group(1); - try { - charset = Charset.forName(encoding); - } catch (UnsupportedCharsetException e) { - // there will be used default charset - } - } - } - if (charset == null) { - charset = Charset.defaultCharset(); - } - - return charset; - } - - public static String getProxyHost() { - return proxyHost; - } - - public static void setProxyHost(String myProxyHost) { - WebBrowser.proxyHost = myProxyHost; - } - - public static int getProxyPort() { - return proxyPort; - } - - public static void setProxyPort(int myProxyPort) { - WebBrowser.proxyPort = myProxyPort; - } - - public static String getProxyUsername() { - return proxyUsername; - } - - public static void setProxyUsername(String myProxyUsername) { - WebBrowser.proxyUsername = myProxyUsername; - } - - public static String getProxyPassword() { - return proxyPassword; - } - - public static void setProxyPassword(String myProxyPassword) { - WebBrowser.proxyPassword = myProxyPassword; - - if (proxyUsername != null) { - proxyEncodedPassword = proxyUsername + ":" + proxyPassword; - proxyEncodedPassword = "Basic " + new String(Base64.encodeBase64((proxyUsername + ":" + proxyPassword).getBytes())); - } - } - - public static int getWebTimeoutConnect() { - return webTimeoutConnect; - } - - public static int getWebTimeoutRead() { - return webTimeoutRead; - } - - public static void setWebTimeoutConnect(int webTimeoutConnect) { - WebBrowser.webTimeoutConnect = webTimeoutConnect; - } - - public static void setWebTimeoutRead(int webTimeoutRead) { - WebBrowser.webTimeoutRead = webTimeoutRead; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapper.java b/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapper.java index 0da69432f..43538833b 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapper.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapperAll.java b/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapperAll.java index fadfeb2bf..3b5d6033c 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapperAll.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapperAll.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapperId.java b/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapperId.java index a4bb93cae..2d448d354 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapperId.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/AbstractWrapperId.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperDates.java b/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperDates.java index e2ac65bd3..06c172adf 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperDates.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperDates.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperId.java b/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperId.java index 5fdc1bf0b..704583fc9 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperId.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperId.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperPages.java b/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperPages.java index 7c533e592..aea69fa8c 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperPages.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/IWrapperPages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/ResultDates.java b/src/main/java/com/omertron/themoviedbapi/wrapper/ResultDates.java index 7f1f49cfb..49d50f056 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/ResultDates.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/ResultDates.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperAlternativeTitles.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperAlternativeTitles.java index c05484826..b4ff2f086 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperAlternativeTitles.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperAlternativeTitles.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperChanges.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperChanges.java index 5f9fa80b4..209af3a58 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperChanges.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperChanges.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCollection.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCollection.java index cb62950dd..cccf68a51 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCollection.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCollection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCompany.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCompany.java index 26044ab13..dd4c1430f 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCompany.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCompany.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCompanyMovies.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCompanyMovies.java index 3df122644..2ff464822 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCompanyMovies.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperCompanyMovies.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperConfig.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperConfig.java index 23be14b02..1fa55210a 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperConfig.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperGenres.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperGenres.java index 9fc8b5660..6756690ad 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperGenres.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperGenres.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperImages.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperImages.java index 7ded91dcb..f682e4a6e 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperImages.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperImages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperJobList.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperJobList.java index 4dbf55f64..9aec0ce35 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperJobList.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperJobList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperKeywordMovies.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperKeywordMovies.java index 121fe650d..ce3121ce3 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperKeywordMovies.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperKeywordMovies.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperKeywords.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperKeywords.java index 29ca8b454..eaabc34e9 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperKeywords.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperKeywords.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovie.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovie.java deleted file mode 100644 index 32091e1dd..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovie.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.wrapper; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.MovieDb; -import java.io.Serializable; -import java.util.List; - -/** - * - * @author stuart.boston - */ -public class WrapperMovie extends AbstractWrapperAll implements Serializable { - - private static final long serialVersionUID = 1L; - @JsonProperty("results") - private List movies; - - public List getMovies() { - return movies; - } - - public void setMovies(List movies) { - this.movies = movies; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieCasts.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieCasts.java deleted file mode 100644 index 87b9f5982..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieCasts.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.wrapper; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.Person; -import com.omertron.themoviedbapi.model.PersonCast; -import com.omertron.themoviedbapi.model.PersonCrew; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author Stuart - */ -public class WrapperMovieCasts extends AbstractWrapperId implements Serializable { - - private static final long serialVersionUID = 1L; - @JsonProperty("cast") - private List cast; - @JsonProperty("crew") - private List crew; - - public List getCast() { - return cast; - } - - public List getCrew() { - return crew; - } - - public void setCast(List cast) { - this.cast = cast; - } - - public void setCrew(List crew) { - this.crew = crew; - } - - public List getAll() { - List people = new ArrayList(); - - // Add a cast member - for (PersonCast member : cast) { - Person person = new Person(); - person.addCast(member.getId(), member.getName(), member.getProfilePath(), member.getCharacter(), member.getOrder()); - people.add(person); - } - - // Add a crew member - for (PersonCrew member : crew) { - Person person = new Person(); - person.addCrew(member.getId(), member.getName(), member.getProfilePath(), member.getDepartment(), member.getJob()); - people.add(person); - } - - return people; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieChanges.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieChanges.java deleted file mode 100644 index b4e67eba7..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieChanges.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.wrapper; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.ChangedMovie; - -public class WrapperMovieChanges extends AbstractWrapperAll { - - @JsonProperty("results") - private List results; - - public List getResults() { - return results; - } - - public void setResults(List results) { - this.results = results; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieDbList.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieDbList.java deleted file mode 100644 index 6f73b9c33..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieDbList.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.wrapper; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.MovieDbList; -import java.util.List; - -public class WrapperMovieDbList extends AbstractWrapperAll { - - - @JsonProperty("results") - private List lists; - - public List getLists() { - return lists; - } - - public void setLists(List lists) { - this.lists = lists; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieKeywords.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieKeywords.java deleted file mode 100644 index 105ed1727..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieKeywords.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.wrapper; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.Keyword; -import java.io.Serializable; -import java.util.List; - -/** - * - * @author Stuart - */ -public class WrapperMovieKeywords extends AbstractWrapperId implements Serializable { - - private static final long serialVersionUID = 1L; - @JsonProperty("keywords") - private List keywords; - - public List getKeywords() { - return keywords; - } - - public void setKeywords(List keywords) { - this.keywords = keywords; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieList.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieList.java deleted file mode 100644 index fdeea8c26..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieList.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.wrapper; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.MovieList; -import java.io.Serializable; -import java.util.List; - -/** - * - * @author Stuart - */ -public class WrapperMovieList extends AbstractWrapperAll implements Serializable { - - private static final long serialVersionUID = 1L; - @JsonProperty("results") - private List movieList; - - public List getMovieList() { - return movieList; - } - - public void setMovieList(List movieList) { - this.movieList = movieList; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPerson.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPerson.java deleted file mode 100644 index 0f600324e..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPerson.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.wrapper; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.Person; -import java.util.List; - -/** - * - * @author stuart.boston - */ -public class WrapperPerson extends AbstractWrapperAll { - - @JsonProperty("results") - private List results; - - public List getResults() { - return results; - } - - public void setResults(List results) { - this.results = results; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonCredits.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonCredits.java deleted file mode 100644 index e29597951..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonCredits.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.wrapper; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.PersonCredit; -import com.omertron.themoviedbapi.model.PersonType; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author stuart.boston - */ -public class WrapperPersonCredits extends AbstractWrapperAll { - - @JsonProperty("cast") - private List cast; - @JsonProperty("crew") - private List crew; - - public List getCast() { - return cast; - } - - public void setCast(List cast) { - this.cast = cast; - } - - public List getCrew() { - return crew; - } - - public void setCrew(List crew) { - this.crew = crew; - } - - public List getAll(PersonType... typeList) { - List personCredits = new ArrayList(); - List types = getTypeList(PersonType.class, typeList); - - // Add a cast member - if (types.contains(PersonType.CAST)) { - for (PersonCredit member : cast) { - member.setPersonType(PersonType.CAST); - personCredits.add(member); - } - } - - // Add a crew member - if (types.contains(PersonType.CREW)) { - for (PersonCredit member : crew) { - member.setPersonType(PersonType.CREW); - personCredits.add(member); - } - } - - return personCredits; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonList.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonList.java deleted file mode 100644 index 2c5954e3d..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonList.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2004-2014 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.wrapper; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.Person; -import java.util.List; - -/** - * - * @author Stuart - */ -public class WrapperPersonList extends AbstractWrapperAll { - - @JsonProperty("results") - private List personList; - - public List getPersonList() { - return personList; - } - - public void setPersonList(List personList) { - this.personList = personList; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperReleaseInfo.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperReleaseInfo.java index 5eeabf03c..390961aa3 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperReleaseInfo.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperReleaseInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperReviews.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperReviews.java index b5a33102d..0ffa79ee6 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperReviews.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperReviews.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperTrailers.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperTrailers.java index 66956d338..697286afc 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperTrailers.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperTrailers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperTranslations.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperTranslations.java index 6b23b41d6..83d346863 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperTranslations.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperTranslations.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/test/java/com/omertron/themoviedbapi/TestLogger.java b/src/test/java/com/omertron/themoviedbapi/TestLogger.java index 891ce2acd..148a9baa1 100644 --- a/src/test/java/com/omertron/themoviedbapi/TestLogger.java +++ b/src/test/java/com/omertron/themoviedbapi/TestLogger.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/src/test/java/com/omertron/themoviedbapi/TheMovieDbApiTest.java b/src/test/java/com/omertron/themoviedbapi/TheMovieDbApiTest.java index b204033a0..8b63f6580 100644 --- a/src/test/java/com/omertron/themoviedbapi/TheMovieDbApiTest.java +++ b/src/test/java/com/omertron/themoviedbapi/TheMovieDbApiTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2014 Stuart Boston + * Copyright (c) 2004-2015 Stuart Boston * * This file is part of TheMovieDB API. * diff --git a/testing.properties b/testing.properties index ac548e1cb..3f9f2aaa7 100644 --- a/testing.properties +++ b/testing.properties @@ -1,5 +1,5 @@ #Properties file for tests #Fill in the details here -Session_ID=INSERT_YOUR_SESSION_ID_HERE -Account_ID=ACCOUNT ID FOR SESSION TESTS -API_Key=INSERT_YOUR_KEY_HERE +Session_ID=63c85deb39337e29b69d78265eb28d639cbd6f72 +Account_ID=6065849 +API_Key=5a1a77e2eba8984804586122754f969f \ No newline at end of file