Formatting and many fields removed from Movie class
This commit is contained in:
parent
283a02a9c5
commit
1c8e8a2e0c
|
@ -5,195 +5,33 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "movie", propOrder = { "actors", "awards", "country", "director", "genre", "imdbId", "imdbRating", "imdbVotes", "language", "metascore", "plot", "poster", "rated", "released", "response", "runtime", "title", "type", "writer", "year" })
|
||||
@XmlType(name = "movie", propOrder = { "imdbId", "title" })
|
||||
public class Movie {
|
||||
|
||||
protected String actors;
|
||||
protected String awards;
|
||||
protected String country;
|
||||
protected String director;
|
||||
protected String genre;
|
||||
protected String imdbId;
|
||||
protected String imdbRating;
|
||||
protected String imdbVotes;
|
||||
protected String language;
|
||||
protected String metascore;
|
||||
protected String plot;
|
||||
protected String poster;
|
||||
protected String rated;
|
||||
protected String released;
|
||||
protected String response;
|
||||
protected String runtime;
|
||||
protected String title;
|
||||
protected String type;
|
||||
protected String writer;
|
||||
protected String year;
|
||||
|
||||
public String getActors() {
|
||||
return actors;
|
||||
public Movie(String imdbId, String title) {
|
||||
this.imdbId = imdbId;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public void setActors(String value) {
|
||||
this.actors = value;
|
||||
}
|
||||
|
||||
public String getAwards() {
|
||||
return awards;
|
||||
}
|
||||
|
||||
public void setAwards(String value) {
|
||||
this.awards = value;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String value) {
|
||||
this.country = value;
|
||||
}
|
||||
|
||||
public String getDirector() {
|
||||
return director;
|
||||
}
|
||||
|
||||
public void setDirector(String value) {
|
||||
this.director = value;
|
||||
}
|
||||
|
||||
public String getGenre() {
|
||||
return genre;
|
||||
}
|
||||
|
||||
public void setGenre(String value) {
|
||||
this.genre = value;
|
||||
}
|
||||
public Movie() {}
|
||||
|
||||
public String getImdbId() {
|
||||
return imdbId;
|
||||
}
|
||||
|
||||
public void setImdbId(String value) {
|
||||
this.imdbId = value;
|
||||
}
|
||||
|
||||
public String getImdbRating() {
|
||||
return imdbRating;
|
||||
}
|
||||
|
||||
public void setImdbRating(String value) {
|
||||
this.imdbRating = value;
|
||||
}
|
||||
|
||||
public String getImdbVotes() {
|
||||
return imdbVotes;
|
||||
}
|
||||
|
||||
public void setImdbVotes(String value) {
|
||||
this.imdbVotes = value;
|
||||
}
|
||||
|
||||
public String getLanguage() {
|
||||
return language;
|
||||
}
|
||||
|
||||
public void setLanguage(String value) {
|
||||
this.language = value;
|
||||
}
|
||||
|
||||
public String getMetascore() {
|
||||
return metascore;
|
||||
}
|
||||
|
||||
public void setMetascore(String value) {
|
||||
this.metascore = value;
|
||||
}
|
||||
|
||||
public String getPlot() {
|
||||
return plot;
|
||||
}
|
||||
|
||||
public void setPlot(String value) {
|
||||
this.plot = value;
|
||||
}
|
||||
|
||||
public String getPoster() {
|
||||
return poster;
|
||||
}
|
||||
|
||||
public void setPoster(String value) {
|
||||
this.poster = value;
|
||||
}
|
||||
|
||||
public String getRated() {
|
||||
return rated;
|
||||
}
|
||||
|
||||
public void setRated(String value) {
|
||||
this.rated = value;
|
||||
}
|
||||
|
||||
public String getReleased() {
|
||||
return released;
|
||||
}
|
||||
|
||||
public void setReleased(String value) {
|
||||
this.released = value;
|
||||
}
|
||||
|
||||
public String getResponse() {
|
||||
return response;
|
||||
}
|
||||
|
||||
public void setResponse(String value) {
|
||||
this.response = value;
|
||||
}
|
||||
|
||||
public String getRuntime() {
|
||||
return runtime;
|
||||
}
|
||||
|
||||
public void setRuntime(String value) {
|
||||
this.runtime = value;
|
||||
public void setImdbId(String imdbId) {
|
||||
this.imdbId = imdbId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String value) {
|
||||
this.title = value;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String value) {
|
||||
this.type = value;
|
||||
}
|
||||
|
||||
public String getWriter() {
|
||||
return writer;
|
||||
}
|
||||
|
||||
public void setWriter(String value) {
|
||||
this.writer = value;
|
||||
}
|
||||
|
||||
public String getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
public void setYear(String value) {
|
||||
this.year = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Movie{" + "actors='" + actors + '\'' + ", awards='" + awards + '\'' + ", country='" + country + '\'' + ", director='" + director + '\'' + ", genre='" + genre + '\'' + ", imdbId='" + imdbId + '\'' + ", imdbRating='" + imdbRating + '\''
|
||||
+ ", imdbVotes='" + imdbVotes + '\'' + ", language='" + language + '\'' + ", metascore='" + metascore + '\'' + ", poster='" + poster + '\'' + ", rated='" + rated + '\'' + ", released='" + released + '\'' + ", response='" + response + '\''
|
||||
+ ", runtime='" + runtime + '\'' + ", title='" + title + '\'' + ", type='" + type + '\'' + ", writer='" + writer + '\'' + ", year='" + year + '\'' + '}';
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -217,4 +55,12 @@ public class Movie {
|
|||
result = 31 * result + (title != null ? title.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Movie{" +
|
||||
"imdbId='" + imdbId + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,14 +3,11 @@
|
|||
<exclude-subsystems>
|
||||
<subsystem name="resteasy" />
|
||||
</exclude-subsystems>
|
||||
|
||||
<exclusions>
|
||||
<module name="javaee.api" />
|
||||
<module name="javax.ws.rs.api" />
|
||||
<module name="org.jboss.resteasy.resteasy-jaxrs" />
|
||||
</exclusions>
|
||||
|
||||
<local-last value="true" />
|
||||
</deployment>
|
||||
|
||||
</jboss-deployment-structure>
|
|
@ -130,7 +130,7 @@ public class RestEasyClientTest {
|
|||
|
||||
Response moviesResponse = simple.addMovie(batmanMovie);
|
||||
moviesResponse.close();
|
||||
batmanMovie.setImdbVotes("300,000");
|
||||
batmanMovie.setTitle("Batman Begins");
|
||||
moviesResponse = simple.updateMovie(batmanMovie);
|
||||
|
||||
if (moviesResponse.getStatus() != Response.Status.OK.getStatusCode()) {
|
||||
|
|
|
@ -1,22 +1,4 @@
|
|||
{
|
||||
"title": "Batman",
|
||||
"year": "1989",
|
||||
"rated": "PG-13",
|
||||
"released": "23 Jun 1989",
|
||||
"runtime": "126 min",
|
||||
"genre": "Action, Adventure",
|
||||
"director": "Tim Burton",
|
||||
"writer": "Bob Kane (Batman characters), Sam Hamm (story), Sam Hamm (screenplay), Warren Skaaren (screenplay)",
|
||||
"actors": "Michael Keaton, Jack Nicholson, Kim Basinger, Robert Wuhl",
|
||||
"plot": "The Dark Knight of Gotham City begins his war on crime with his first major enemy being the clownishly homicidal Joker.",
|
||||
"language": "English, French",
|
||||
"country": "USA, UK",
|
||||
"awards": "Won 1 Oscar. Another 9 wins & 22 nominations.",
|
||||
"poster": "http://ia.media-imdb.com/images/M/MV5BMTYwNjAyODIyMF5BMl5BanBnXkFtZTYwNDMwMDk2._V1_SX300.jpg",
|
||||
"metascore": "66",
|
||||
"imdbRating": "7.6",
|
||||
"imdbVotes": "256,000",
|
||||
"imdbId": "tt0096895",
|
||||
"type": "movie",
|
||||
"response": "True"
|
||||
"imdbId": "tt0096895"
|
||||
}
|
|
@ -1,22 +1,4 @@
|
|||
{
|
||||
"title": "Transformers",
|
||||
"year": "2007",
|
||||
"rated": "PG-13",
|
||||
"released": "03 Jul 2007",
|
||||
"runtime": "144 min",
|
||||
"genre": "Action, Adventure, Sci-Fi",
|
||||
"director": "Michael Bay",
|
||||
"writer": "Roberto Orci (screenplay), Alex Kurtzman (screenplay), John Rogers (story), Roberto Orci (story), Alex Kurtzman (story)",
|
||||
"actors": "Shia LaBeouf, Megan Fox, Josh Duhamel, Tyrese Gibson",
|
||||
"plot": "A long time ago, far away on the planet of Cybertron, a war is being waged between the noble Autobots (led by the wise Optimus Prime) and the devious Decepticons (commanded by the dreaded Megatron) for control over the Allspark, a mystical talisman that would grant unlimited power to whoever possesses it. The Autobots managed to smuggle the Allspark off the planet, but Megatron blasts off in search of it. He eventually tracks it to the planet of Earth (circa 1850), but his reckless desire for power sends him right into the Arctic Ocean, and the sheer cold forces him into a paralyzed state. His body is later found by Captain Archibald Witwicky, but before going into a comatose state Megatron uses the last of his energy to engrave into the Captain's glasses a map showing the location of the Allspark, and to send a transmission to Cybertron. Megatron is then carried away aboard the Captain's ship. A century later, Captain Witwicky's grandson Sam Witwicky (nicknamed Spike by his friends) buys his first car. To his shock, he discovers it to be Bumblebee, an Autobot in disguise who is to protect Spike, who possesses the Captain's glasses and the map engraved on them. But Bumblebee is not the only Transformer to have arrived on Earth - in the desert of Qatar, the Decepticons Blackout and Scorponok attack a U.S. military base, causing the Pentagon to send their special Sector Seven agents to capture all \"specimens of this alien race.\" Spike and his girlfriend Mikaela find themselves in the midst of a grand battle between the Autobots and the Decepticons, stretching from Hoover Dam all the way to Los Angeles. Meanwhile, deep inside Hoover Dam, the cryogenically stored body of Megatron awakens.",
|
||||
"language": "English, Spanish",
|
||||
"country": "USA",
|
||||
"awards": "Nominated for 3 Oscars. Another 18 wins & 40 nominations.",
|
||||
"poster": "http://ia.media-imdb.com/images/M/MV5BMTQwNjU5MzUzNl5BMl5BanBnXkFtZTYwMzc1MTI3._V1_SX300.jpg",
|
||||
"metascore": "61",
|
||||
"imdbRating": "7.1",
|
||||
"imdbVotes": "492,225",
|
||||
"imdbId": "tt0418279",
|
||||
"type": "movie",
|
||||
"response": "True"
|
||||
"imdbId": "tt0418279"
|
||||
}
|
Loading…
Reference in New Issue