KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > data > FlickrPerson


1 package example.data;
2
3 import javax.xml.bind.annotation.*;
4
5 @XmlRootElement(name="person")
6 public class FlickrPerson implements FlickrPayload {
7   @XmlAttribute public String JavaDoc nsid;
8   @XmlAttribute public int isadmin;
9   @XmlAttribute public int ispro;
10   @XmlAttribute public int iconserver;
11
12   @XmlElement public String JavaDoc username;
13   @XmlElement public String JavaDoc realname;
14   @XmlElement public String JavaDoc mbox_sha1sum;
15   @XmlElement public String JavaDoc location;
16   @XmlElement public String JavaDoc photosurl;
17   @XmlElement public String JavaDoc profileurl;
18   @XmlElement public Photos photos;
19
20   public static class Photos {
21     @XmlElement public long firstdate;
22     @XmlElement public String JavaDoc firstdatetaken;
23     @XmlElement public int count;
24
25     public String JavaDoc toString()
26     {
27       return "Photos[firstdate=" + firstdate + ", " +
28                     "firstdatetaken=" + firstdatetaken + ", " +
29                     "count=" + count + "]";
30     }
31   }
32
33   public String JavaDoc toString()
34   {
35     return "FlickrPerson[nsid=" + nsid + ", " +
36                         "isadmin=" + isadmin + ", " +
37                         "ispro=" + ispro + ", " +
38                         "iconserver=" + iconserver + ", " +
39                         "username=" + username + ", " +
40                         "realname=" + realname + ", " +
41                         "mbox_sha1sum=" + mbox_sha1sum + ", " +
42                         "location=" + location + ", " +
43                         "photosurl=" + photosurl + ", " +
44                         "profileurl=" + profileurl + ", " +
45                         "photos=" + photos + "]";
46   }
47 }
48
Popular Tags