Added keyword searches
parent
1e45b87508
commit
f177026261
@ -0,0 +1,145 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2013 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
* TheMovieDB API is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* TheMovieDB API is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.omertron.themoviedbapi.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import java.io.Serializable;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stuart
|
||||
*/
|
||||
public class KeywordMovie implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
private static final Logger logger = Logger.getLogger(KeywordMovie.class);
|
||||
/*
|
||||
* 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;
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Getter methods">
|
||||
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;
|
||||
}
|
||||
// </editor-fold>
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="Setter methods">
|
||||
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;
|
||||
}
|
||||
// </editor-fold>
|
||||
|
||||
/**
|
||||
* Handle unknown properties and print a message
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public void handleUnknown(String key, Object value) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Unknown property: '").append(key);
|
||||
sb.append("' value: '").append(value).append("'");
|
||||
logger.trace(sb.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2013 Stuart Boston
|
||||
*
|
||||
* This file is part of TheMovieDB API.
|
||||
*
|
||||
* TheMovieDB API is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* TheMovieDB API is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.omertron.themoviedbapi.wrapper;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.omertron.themoviedbapi.model.Keyword;
|
||||
import com.omertron.themoviedbapi.model.KeywordMovie;
|
||||
import java.util.List;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author stuart.boston
|
||||
*/
|
||||
public class WrapperKeywordMovies extends WrapperBase {
|
||||
/*
|
||||
* Properties
|
||||
*/
|
||||
@JsonProperty("results")
|
||||
private List<KeywordMovie> results;
|
||||
|
||||
public WrapperKeywordMovies() {
|
||||
super(Logger.getLogger(WrapperKeywordMovies.class));
|
||||
}
|
||||
|
||||
public List<KeywordMovie> getResults() {
|
||||
return results;
|
||||
}
|
||||
|
||||
public void setResults(List<KeywordMovie> results) {
|
||||
this.results = results;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue