diff --git a/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java b/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java index 6d92418e8..31c626e4f 100644 --- a/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java +++ b/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java @@ -42,7 +42,7 @@ import com.omertron.themoviedbapi.methods.TmdbPeople; import com.omertron.themoviedbapi.methods.TmdbReviews; import com.omertron.themoviedbapi.methods.TmdbSearch; import com.omertron.themoviedbapi.methods.TmdbTV; -import com.omertron.themoviedbapi.model.Genre; +import com.omertron.themoviedbapi.model2.Genre; import com.omertron.themoviedbapi.model.keyword.KeywordMovie; import com.omertron.themoviedbapi.model2.Certification; import com.omertron.themoviedbapi.model2.FindResults; diff --git a/src/main/java/com/omertron/themoviedbapi/methods/TmdbFind.java b/src/main/java/com/omertron/themoviedbapi/methods/TmdbFind.java index 43ea08827..c7ea95a78 100644 --- a/src/main/java/com/omertron/themoviedbapi/methods/TmdbFind.java +++ b/src/main/java/com/omertron/themoviedbapi/methods/TmdbFind.java @@ -46,7 +46,6 @@ public class TmdbFind extends AbstractMethod { */ public TmdbFind(String apiKey, HttpTools httpTools) { super(apiKey, httpTools); -// MAPPER.addMixIn(MediaBasic.class, MediaTypeMixIn.class); } /** diff --git a/src/main/java/com/omertron/themoviedbapi/methods/TmdbGenres.java b/src/main/java/com/omertron/themoviedbapi/methods/TmdbGenres.java index d3bdacd90..3f817f763 100644 --- a/src/main/java/com/omertron/themoviedbapi/methods/TmdbGenres.java +++ b/src/main/java/com/omertron/themoviedbapi/methods/TmdbGenres.java @@ -20,7 +20,7 @@ package com.omertron.themoviedbapi.methods; import com.omertron.themoviedbapi.MovieDbException; -import com.omertron.themoviedbapi.model.Genre; +import com.omertron.themoviedbapi.model2.Genre; import com.omertron.themoviedbapi.model2.movie.MovieBasic; import com.omertron.themoviedbapi.results.TmdbResultsList; import com.omertron.themoviedbapi.tools.ApiUrl; diff --git a/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java b/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java index a087317a0..7e0b717ce 100644 --- a/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java +++ b/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java @@ -21,11 +21,11 @@ package com.omertron.themoviedbapi.methods; import com.fasterxml.jackson.core.type.TypeReference; import com.omertron.themoviedbapi.MovieDbException; -import com.omertron.themoviedbapi.model.ListItemStatus; -import com.omertron.themoviedbapi.model2.movie.MovieDb; import com.omertron.themoviedbapi.model.MovieDbListStatus; import com.omertron.themoviedbapi.model2.StatusCode; import com.omertron.themoviedbapi.model2.list.ListItem; +import com.omertron.themoviedbapi.model2.list.ListItemStatus; +import com.omertron.themoviedbapi.model2.movie.MovieDb; import com.omertron.themoviedbapi.tools.ApiUrl; import com.omertron.themoviedbapi.tools.HttpTools; import com.omertron.themoviedbapi.tools.MethodBase; 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 f3d620ae2..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/MovieList.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * 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, 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.omertron.themoviedbapi.model2.AbstractJsonMapping; -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/TmdbConfiguration.java b/src/main/java/com/omertron/themoviedbapi/model/TmdbConfiguration.java deleted file mode 100644 index 6a722959e..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/TmdbConfiguration.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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, 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.omertron.themoviedbapi.model2.AbstractJsonMapping; -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/change/ChangeKeyItem.java b/src/main/java/com/omertron/themoviedbapi/model/change/ChangeKeyItem.java deleted file mode 100644 index 32ac5632f..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/change/ChangeKeyItem.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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, 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.change; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ChangeKeyItem { - - private static final long serialVersionUID = 1L; - @JsonProperty("key") - private String key; - @JsonProperty("items") - private List changedItems = new ArrayList(); - private final Map newItems = new HashMap(); - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public List getChangedItems() { - return changedItems; - } - - public void setChangedItems(List changes) { - this.changedItems = changes; - } - - @JsonAnyGetter - public Map getNewItems() { - return this.newItems; - } - - @JsonAnySetter - public void setNewItems(String name, Object value) { - this.newItems.put(name, value); - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/change/ChangedItem.java b/src/main/java/com/omertron/themoviedbapi/model/change/ChangedItem.java deleted file mode 100644 index fc135bf27..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/change/ChangedItem.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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, 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.change; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model2.AbstractJsonMapping; -import java.util.HashMap; -import java.util.Map; - -public class ChangedItem extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - @JsonProperty("id") - private String id; - @JsonProperty("action") - private String action; - @JsonProperty("time") - private String time; - @JsonProperty("iso_639_1") - private String language; - @JsonProperty("value") - private Object value; - private final Map newItems = new HashMap(); - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getAction() { - return action; - } - - public void setAction(String action) { - this.action = action; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language; - } - - public Object getValue() { - return value; - } - - public void setValue(Object value) { - this.value = value; - } - - @JsonAnyGetter - public Map getNewItems() { - return this.newItems; - } - - @JsonAnySetter - public void setNewItems(String name, Object value) { - this.newItems.put(name, value); - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/change/ChangedMedia.java b/src/main/java/com/omertron/themoviedbapi/model/change/ChangedMedia.java deleted file mode 100644 index 1e003f345..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/change/ChangedMedia.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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, 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.change; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model2.AbstractJsonMapping; - -public class ChangedMedia extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - - @JsonProperty("id") - private String id; - @JsonProperty("adult") - private boolean adult; - - public String getId() { - return id; - } - - public boolean isAdult() { - return adult; - } - - public void setId(String id) { - this.id = id; - } - - public void setAdult(boolean adult) { - this.adult = adult; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/change/ChangedMovie.java b/src/main/java/com/omertron/themoviedbapi/model/change/ChangedMovie.java deleted file mode 100644 index bfd0ce731..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/change/ChangedMovie.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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, 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.change; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model2.AbstractJsonMapping; - -public class ChangedMovie extends AbstractJsonMapping { - - private static final long serialVersionUID = 1L; - - @JsonProperty("id") - private String id; - @JsonProperty("adult") - private boolean adult; - - public String getId() { - return id; - } - - public boolean isAdult() { - return adult; - } - - public void setId(String id) { - this.id = id; - } - - public void setAdult(boolean adult) { - this.adult = adult; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/comparator/PersonCreditDateComparator.java b/src/main/java/com/omertron/themoviedbapi/model/comparator/PersonCreditDateComparator.java deleted file mode 100644 index 4b57b31e4..000000000 --- a/src/main/java/com/omertron/themoviedbapi/model/comparator/PersonCreditDateComparator.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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.comparator; - -import com.omertron.themoviedbapi.model.person.PersonCredit; -import java.io.Serializable; -import java.util.Comparator; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.apache.commons.lang3.StringUtils; - -/** - * Compare two PersonCredits by date - * - * @author stuart.boston - */ -public class PersonCreditDateComparator implements Comparator, Serializable { - - private static final long serialVersionUID = 1L; - private static final Pattern YEAR_PATTERN = Pattern.compile("(?:.*?)(\\d{4})(?:.*?)"); - private final boolean ascending; - - public PersonCreditDateComparator() { - this.ascending = Boolean.FALSE; - } - - public PersonCreditDateComparator(boolean ascending) { - this.ascending = ascending; - } - - @Override - public int compare(PersonCredit pc1, PersonCredit pc2) { - return compare(pc1, pc2, ascending); - } - - /** - * Compare two PersonCredits based on the respective years - * - * @param pc1 - * @param pc2 - * @param ascending - * @return - */ - public int compare(PersonCredit pc1, PersonCredit pc2, boolean ascending) { - boolean valid1 = StringUtils.isNotBlank(pc1.getReleaseDate()); - boolean valid2 = StringUtils.isNotBlank(pc2.getReleaseDate()); - - if (!valid1 && !valid2) { - return 0; - } - - if (!valid1) { - return ascending ? -1 : 1; - } - - if (!valid2) { - return ascending ? 1 : -1; - } - - int year1 = extractYear(pc1.getReleaseDate()); - int year2 = extractYear(pc2.getReleaseDate()); - return ascending ? year1 - year2 : year2 - year1; - } - - /** - * locate a 4 digit year in a date string - * - * @param date - * @return - */ - private static int extractYear(String date) { - int year = 0; - Matcher m = YEAR_PATTERN.matcher(date); - if (m.find()) { - year = Integer.parseInt(m.group(1)); - } - - // Give up and return 0 - return year; - } -} diff --git a/src/main/java/com/omertron/themoviedbapi/model/tv/TvSeries.java b/src/main/java/com/omertron/themoviedbapi/model/tv/TvSeries.java index e557639e9..3cce0d8bb 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/tv/TvSeries.java +++ b/src/main/java/com/omertron/themoviedbapi/model/tv/TvSeries.java @@ -1,7 +1,7 @@ package com.omertron.themoviedbapi.model.tv; import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.Genre; +import com.omertron.themoviedbapi.model2.Genre; import com.omertron.themoviedbapi.model.person.Person; import java.util.List; diff --git a/src/main/java/com/omertron/themoviedbapi/model/Genre.java b/src/main/java/com/omertron/themoviedbapi/model2/Genre.java similarity index 90% rename from src/main/java/com/omertron/themoviedbapi/model/Genre.java rename to src/main/java/com/omertron/themoviedbapi/model2/Genre.java index ee6e068af..31b75e854 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Genre.java +++ b/src/main/java/com/omertron/themoviedbapi/model2/Genre.java @@ -17,9 +17,10 @@ * along with TheMovieDB API. If not, see . * */ -package com.omertron.themoviedbapi.model; +package com.omertron.themoviedbapi.model2; import com.fasterxml.jackson.annotation.JsonRootName; +import com.omertron.themoviedbapi.model.AbstractIdName; /** * @author stuart.boston diff --git a/src/main/java/com/omertron/themoviedbapi/model/Language.java b/src/main/java/com/omertron/themoviedbapi/model2/Language.java similarity index 98% rename from src/main/java/com/omertron/themoviedbapi/model/Language.java rename to src/main/java/com/omertron/themoviedbapi/model2/Language.java index 7f93cd410..a37b5384d 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Language.java +++ b/src/main/java/com/omertron/themoviedbapi/model2/Language.java @@ -17,7 +17,7 @@ * along with TheMovieDB API. If not, see . * */ -package com.omertron.themoviedbapi.model; +package com.omertron.themoviedbapi.model2; import com.omertron.themoviedbapi.model2.AbstractJsonMapping; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/omertron/themoviedbapi/model/ListItemStatus.java b/src/main/java/com/omertron/themoviedbapi/model2/list/ListItemStatus.java similarity index 96% rename from src/main/java/com/omertron/themoviedbapi/model/ListItemStatus.java rename to src/main/java/com/omertron/themoviedbapi/model2/list/ListItemStatus.java index 3581533e9..2d44e68e0 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ListItemStatus.java +++ b/src/main/java/com/omertron/themoviedbapi/model2/list/ListItemStatus.java @@ -17,7 +17,7 @@ * along with TheMovieDB API. If not, see . * */ -package com.omertron.themoviedbapi.model; +package com.omertron.themoviedbapi.model2.list; import com.omertron.themoviedbapi.model2.AbstractJsonMapping; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/omertron/themoviedbapi/model2/movie/MovieDb.java b/src/main/java/com/omertron/themoviedbapi/model2/movie/MovieDb.java index ca44b1bc2..445c2a09b 100644 --- a/src/main/java/com/omertron/themoviedbapi/model2/movie/MovieDb.java +++ b/src/main/java/com/omertron/themoviedbapi/model2/movie/MovieDb.java @@ -19,6 +19,8 @@ */ package com.omertron.themoviedbapi.model2.movie; +import com.omertron.themoviedbapi.model2.Language; +import com.omertron.themoviedbapi.model2.Genre; import com.omertron.themoviedbapi.model.*; import com.fasterxml.jackson.annotation.JsonProperty; import com.omertron.themoviedbapi.model.person.PersonCast; diff --git a/src/main/java/com/omertron/themoviedbapi/model/ProductionCompany.java b/src/main/java/com/omertron/themoviedbapi/model2/movie/ProductionCompany.java similarity index 90% rename from src/main/java/com/omertron/themoviedbapi/model/ProductionCompany.java rename to src/main/java/com/omertron/themoviedbapi/model2/movie/ProductionCompany.java index bd3e5e2f2..9e287d045 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ProductionCompany.java +++ b/src/main/java/com/omertron/themoviedbapi/model2/movie/ProductionCompany.java @@ -17,9 +17,10 @@ * along with TheMovieDB API. If not, see . * */ -package com.omertron.themoviedbapi.model; +package com.omertron.themoviedbapi.model2.movie; import com.fasterxml.jackson.annotation.JsonRootName; +import com.omertron.themoviedbapi.model.AbstractIdName; /** * @author stuart.boston diff --git a/src/main/java/com/omertron/themoviedbapi/model/ProductionCountry.java b/src/main/java/com/omertron/themoviedbapi/model2/movie/ProductionCountry.java similarity index 97% rename from src/main/java/com/omertron/themoviedbapi/model/ProductionCountry.java rename to src/main/java/com/omertron/themoviedbapi/model2/movie/ProductionCountry.java index c5d5b6608..da13d26cd 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/ProductionCountry.java +++ b/src/main/java/com/omertron/themoviedbapi/model2/movie/ProductionCountry.java @@ -17,7 +17,7 @@ * along with TheMovieDB API. If not, see . * */ -package com.omertron.themoviedbapi.model; +package com.omertron.themoviedbapi.model2.movie; import com.omertron.themoviedbapi.model2.AbstractJsonMapping; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/omertron/themoviedbapi/model/Trailer.java b/src/main/java/com/omertron/themoviedbapi/model2/movie/Trailer.java similarity index 98% rename from src/main/java/com/omertron/themoviedbapi/model/Trailer.java rename to src/main/java/com/omertron/themoviedbapi/model2/movie/Trailer.java index ac991532a..ff1fa9ab8 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Trailer.java +++ b/src/main/java/com/omertron/themoviedbapi/model2/movie/Trailer.java @@ -17,7 +17,7 @@ * along with TheMovieDB API. If not, see . * */ -package com.omertron.themoviedbapi.model; +package com.omertron.themoviedbapi.model2.movie; import com.omertron.themoviedbapi.model2.AbstractJsonMapping; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperGenres.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperGenres.java index 6756690ad..9d9391d36 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperGenres.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperGenres.java @@ -20,7 +20,7 @@ package com.omertron.themoviedbapi.wrapper; import com.fasterxml.jackson.annotation.JsonProperty; -import com.omertron.themoviedbapi.model.Genre; +import com.omertron.themoviedbapi.model2.Genre; import java.util.List; /** diff --git a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMediaChanges.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMediaChanges.java deleted file mode 100644 index b1862245b..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMediaChanges.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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, 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.change.ChangedMedia; - -public class WrapperMediaChanges 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/WrapperMovieChanges.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieChanges.java deleted file mode 100644 index 7a72dd9d7..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperMovieChanges.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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, 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.change.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/WrapperPersonList.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonList.java deleted file mode 100644 index 8c2d495ff..000000000 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperPersonList.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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, 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.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/WrapperVideos.java b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperVideos.java index f6f5640bf..f04df1a54 100644 --- a/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperVideos.java +++ b/src/main/java/com/omertron/themoviedbapi/wrapper/WrapperVideos.java @@ -20,7 +20,7 @@ package com.omertron.themoviedbapi.wrapper; import com.fasterxml.jackson.annotation.JsonSetter; -import com.omertron.themoviedbapi.model.Trailer; +import com.omertron.themoviedbapi.model2.movie.Trailer; import com.omertron.themoviedbapi.model2.movie.Video; import java.io.Serializable; import java.util.ArrayList; diff --git a/src/test/java/com/omertron/themoviedbapi/methods/TmdbGenresTest.java b/src/test/java/com/omertron/themoviedbapi/methods/TmdbGenresTest.java index 1e3c25634..a8afe08dc 100644 --- a/src/test/java/com/omertron/themoviedbapi/methods/TmdbGenresTest.java +++ b/src/test/java/com/omertron/themoviedbapi/methods/TmdbGenresTest.java @@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.methods; import com.omertron.themoviedbapi.AbstractTests; import com.omertron.themoviedbapi.MovieDbException; -import com.omertron.themoviedbapi.model.Genre; +import com.omertron.themoviedbapi.model2.Genre; import com.omertron.themoviedbapi.model2.movie.MovieBasic; import com.omertron.themoviedbapi.results.TmdbResultsList; import java.util.List;