// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_ADULT = "adult";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_BACKDROP_PATH = "backdrop_path";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_GENRES = "genres";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_GENRE_ID = "id";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_ID = "id";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_IMDB_ID = "imdb_id";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_ORIGINAL_TITLE = "original_title";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_OVERVIEW = "overview";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_POPULARITY = "popularity";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_POSTER_PATH = "poster_path";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_RELEASE_DATE = "release_date";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_VIDEO = "video";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_VOTE_AVERAGE = "vote_average";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_VOTE_COUNT = "vote_count";


import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
import static com.proxima.Wubble.Constants.TMDB_ADULT;
import static com.proxima.Wubble.Constants.TMDB_BACKDROP_PATH;
import static com.proxima.Wubble.Constants.TMDB_GENRES;
import static com.proxima.Wubble.Constants.TMDB_GENRE_ID;
import static com.proxima.Wubble.Constants.TMDB_ID;
import static com.proxima.Wubble.Constants.TMDB_IMDB_ID;
import static com.proxima.Wubble.Constants.TMDB_ORIGINAL_TITLE;
import static com.proxima.Wubble.Constants.TMDB_OVERVIEW;
import static com.proxima.Wubble.Constants.TMDB_POPULARITY;
import static com.proxima.Wubble.Constants.TMDB_POSTER_PATH;
import static com.proxima.Wubble.Constants.TMDB_RELEASE_DATE;
import static com.proxima.Wubble.Constants.TMDB_VIDEO;
import static com.proxima.Wubble.Constants.TMDB_VOTE_AVERAGE;
import static com.proxima.Wubble.Constants.TMDB_VOTE_COUNT;
package com.proxima.Wubble.movie;




/**
 * Created by Epokhe on 09.03.2015.
 */
public class MovieInformation implements Comparable<MovieInformation> {

    public boolean adult;
    public String backdrop_path;
    public int id;
    public String original_title;
    public String release_date;
    public String poster_path;
    public String overview;
    public List<Integer> genres;
    public int popularity;
    public String title;
    public boolean video;
    public float vote_average;
    public int vote_count;
    public String imdbId;


    public MovieInformation(JSONObject movieObject, int constructType) throws JSONException {

        adult = movieObject.getBoolean(TMDB_ADULT);
        backdrop_path = movieObject.getString(TMDB_BACKDROP_PATH);
        id = movieObject.getInt(TMDB_ID);
        original_title = movieObject.getString(TMDB_ORIGINAL_TITLE);
        release_date = movieObject.getString(TMDB_RELEASE_DATE);
        poster_path = movieObject.getString(TMDB_POSTER_PATH);
        popularity = movieObject.getInt(TMDB_POPULARITY);
        video = movieObject.getBoolean(TMDB_VIDEO);
        vote_average = movieObject.getInt(TMDB_VOTE_AVERAGE);
        vote_count = movieObject.getInt(TMDB_VOTE_COUNT);


// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_ADULT = "adult";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_BACKDROP_PATH = "backdrop_path";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_GENRES = "genres";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_GENRE_ID = "id";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_ID = "id";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_IMDB_ID = "imdb_id";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_ORIGINAL_TITLE = "original_title";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_OVERVIEW = "overview";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_POPULARITY = "popularity";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_POSTER_PATH = "poster_path";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_RELEASE_DATE = "release_date";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_VIDEO = "video";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_VOTE_AVERAGE = "vote_average";
// 
// Path: app/src/main/java/com/proxima/Wubble/Constants.java
// public static final String TMDB_VOTE_COUNT = "vote_count";


// Path: app/src/main/java/com/proxima/Wubble/movie/MovieInformation.java
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
import static com.proxima.Wubble.Constants.TMDB_ADULT;
import static com.proxima.Wubble.Constants.TMDB_BACKDROP_PATH;
import static com.proxima.Wubble.Constants.TMDB_GENRES;
import static com.proxima.Wubble.Constants.TMDB_GENRE_ID;
import static com.proxima.Wubble.Constants.TMDB_ID;
import static com.proxima.Wubble.Constants.TMDB_IMDB_ID;
import static com.proxima.Wubble.Constants.TMDB_ORIGINAL_TITLE;
import static com.proxima.Wubble.Constants.TMDB_OVERVIEW;
import static com.proxima.Wubble.Constants.TMDB_POPULARITY;
import static com.proxima.Wubble.Constants.TMDB_POSTER_PATH;
import static com.proxima.Wubble.Constants.TMDB_RELEASE_DATE;
import static com.proxima.Wubble.Constants.TMDB_VIDEO;
import static com.proxima.Wubble.Constants.TMDB_VOTE_AVERAGE;
import static com.proxima.Wubble.Constants.TMDB_VOTE_COUNT;

package com.proxima.Wubble.movie;




/**
 * Created by Epokhe on 09.03.2015.
 */
public class MovieInformation implements Comparable<MovieInformation> {

    public boolean adult;
    public String backdrop_path;
    public int id;
    public String original_title;
    public String release_date;
    public String poster_path;
    public String overview;
    public List<Integer> genres;
    public int popularity;
    public String title;
    public boolean video;
    public float vote_average;
    public int vote_count;
    public String imdbId;


    public MovieInformation(JSONObject movieObject, int constructType) throws JSONException {

        adult = movieObject.getBoolean(TMDB_ADULT);
        backdrop_path = movieObject.getString(TMDB_BACKDROP_PATH);
        id = movieObject.getInt(TMDB_ID);
        original_title = movieObject.getString(TMDB_ORIGINAL_TITLE);
        release_date = movieObject.getString(TMDB_RELEASE_DATE);
        poster_path = movieObject.getString(TMDB_POSTER_PATH);
        popularity = movieObject.getInt(TMDB_POPULARITY);
        video = movieObject.getBoolean(TMDB_VIDEO);
        vote_average = movieObject.getInt(TMDB_VOTE_AVERAGE);
        vote_count = movieObject.getInt(TMDB_VOTE_COUNT);


        switch (constructType) {