Initial commit
[mustard2:mustard2.git] / src / org / mustard2 / microblog / User.java
1 /**
2  * MUSTARD: Android's Client for StatusNet
3  * 
4  * Copyright (C) 2009-2010 macno.org, Michele Azzolari
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  * 
20  */
21
22 package org.mustard2.microblog;
23
24 import java.util.Date;
25
26 public class User {
27
28         private long id;
29         private String screen_name;
30         private String name;
31         private String location;
32         private String description;
33         private String profile_image_url;
34         private String profile_image_url_big;
35         private String url;
36         private int followers_count;
37         private int friends_count;
38         private int favourites_count;
39         private int statuses_count;
40         private Date created_at;
41         private int utc_offset;
42         private String time_zone;
43         private Notice status;
44         private boolean following;
45         
46         public boolean isFollowing() {
47                 return following;
48         }
49         public void setFollowing(boolean following) {
50                 this.following = following;
51         }
52         public long getId() {
53                 return id;
54         }
55         public void setId(long id) {
56                 this.id = id;
57         }
58         public String getScreen_name() {
59                 return screen_name;
60         }
61         public void setScreen_name(String screen_name) {
62                 this.screen_name = screen_name;
63         }
64         public String getName() {
65                 return name;
66         }
67         public void setName(String name) {
68                 this.name = name;
69         }
70         public String getLocation() {
71                 return location;
72         }
73         public void setLocation(String location) {
74                 this.location = location;
75         }
76         public String getDescription() {
77                 return description;
78         }
79         public void setDescription(String description) {
80                 this.description = description;
81         }
82         public String getProfile_image_url() {
83                 return profile_image_url;
84         }
85         public void setProfile_image_url(String profile_image_url) {
86                 this.profile_image_url = profile_image_url;
87         }
88         public String getProfile_image_url_big() {
89                 return profile_image_url_big;
90         }
91         public void setProfile_image_url_big(String profile_image_url_big) {
92                 this.profile_image_url_big = profile_image_url_big;
93         }
94         public String getUrl() {
95                 return url;
96         }
97         public void setUrl(String url) {
98                 this.url = url;
99         }
100         public int getFollowers_count() {
101                 return followers_count;
102         }
103         public void setFollowers_count(int followers_count) {
104                 this.followers_count = followers_count;
105         }
106         public int getFriends_count() {
107                 return friends_count;
108         }
109         public void setFriends_count(int friends_count) {
110                 this.friends_count = friends_count;
111         }
112         public int getFavourites_count() {
113                 return favourites_count;
114         }
115         public void setFavourites_count(int favourites_count) {
116                 this.favourites_count = favourites_count;
117         }
118         public int getStatuses_count() {
119                 return statuses_count;
120         }
121         public void setStatuses_count(int statuses_count) {
122                 this.statuses_count = statuses_count;
123         }
124         public Date getCreated_at() {
125                 return created_at;
126         }
127         public void setCreated_at(Date created_at) {
128                 this.created_at = created_at;
129         }
130         public int getUtc_offset() {
131                 return utc_offset;
132         }
133         public void setUtc_offset(int utc_offset) {
134                 this.utc_offset = utc_offset;
135         }
136         public String getTime_zone() {
137                 return time_zone;
138         }
139         public void setTime_zone(String time_zone) {
140                 this.time_zone = time_zone;
141         }
142         public Notice getStatus() {
143                 return status;
144         }
145         public void setStatus(Notice status) {
146                 this.status = status;
147         }
148         public String toString() {
149                 StringBuilder sb = new StringBuilder();
150                 sb.append(" User id " + id + "\n");
151                 sb.append("\tscreen_name => " + screen_name + "\n");
152                 sb.append("\tname => " + name + "\n");
153                 sb.append("\tlocation => " + location + "\n");
154                 sb.append("\tdescription => " + description + "\n");
155                 sb.append("\tprofile_image_url => " + profile_image_url + "\n");
156                 sb.append("\turl => " + url + "\n");
157                 sb.append("\tfollowers_count => " + followers_count + "\n");
158                 sb.append("\tfriends_count => " + friends_count + "\n");
159                 sb.append("\tfavourites_count => " + favourites_count + "\n");
160                 sb.append("\tstatuses_count => " + statuses_count + "\n");
161                 sb.append("\tcreated_at => " + created_at + "\n");
162                 sb.append("\tutc_offset => " + utc_offset + "\n");
163                 sb.append("\ttime_zone => " + time_zone + "\n");
164                 if(status != null)
165                         sb.append("\fstatus => " + status.toString() + "\n");
166                 sb.append("\tfollowing => " + following + "\n");
167                 return sb.toString();
168         }
169 }