package it.acxent.cc; import org.json.JSONObject; public class GoogleReview { public static String P_GOOGLE_REVIEW_DATE = "GOOGLE_REVIEW_DATE"; public static String P_GOOGLE_REVIEW_RATING = "GOOGLE_REVIEW_RATING"; public static String P_GOOGLE_REVIEW_USER_RATING_TOTALS = "GOOGLE_REVIEW_USER_RATING_TOTALS"; private String author_name; private String author_url; private String profile_photo_url; private String relative_time_description; private String text; private long rating; public GoogleReview(JSONObject jo) { setAuthor_name(jo.getString("author_name")); setAuthor_url(jo.getString("author_url")); setProfile_photo_url(jo.getString("profile_photo_url")); setRelative_time_description(jo.getString("relative_time_description")); setRating(jo.getLong("rating")); setText(jo.getString("text")); } public GoogleReview() {} public String getAuthor_name() { return (this.author_name == null) ? "" : this.author_name.trim(); } public void setAuthor_name(String author_name) { this.author_name = author_name; } public String getAuthor_url() { return (this.author_url == null) ? "" : this.author_url.trim(); } public void setAuthor_url(String author_url) { this.author_url = author_url; } public String getProfile_photo_url() { return (this.profile_photo_url == null) ? "" : this.profile_photo_url.trim(); } public void setProfile_photo_url(String profile_photo_url) { this.profile_photo_url = profile_photo_url; } public String getRelative_time_description() { return (this.relative_time_description == null) ? "" : this.relative_time_description.trim(); } public void setRelative_time_description(String relative_time_description) { this.relative_time_description = relative_time_description; } public String getText() { return (this.text == null) ? "" : this.text.trim(); } public void setText(String text) { this.text = text; } public long getRating() { return this.rating; } public void setRating(long rating) { this.rating = rating; } }