KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > data > FlickrGroups


1 package example.data;
2
3 import java.util.*;
4 import javax.xml.bind.annotation.*;
5
6 @XmlRootElement(name="groups")
7 public class FlickrGroups implements FlickrPayload {
8   @XmlElement(name="group") public List<Group> groups = new ArrayList<Group>();
9
10   public static class Group {
11     @XmlAttribute public String JavaDoc nsid;
12     @XmlAttribute public String JavaDoc name;
13     @XmlAttribute public int admin;
14     @XmlAttribute public int eighteenplus;
15
16     public String JavaDoc toString()
17     {
18       return "Group[nsid=" + nsid + ", " +
19                    "name=" + name + ", " +
20                    "admin=" + admin + ", " +
21                    "eighteenplus=" + eighteenplus + "]";
22     }
23   }
24
25   public String JavaDoc toString()
26   {
27     StringBuilder JavaDoc sb = new StringBuilder JavaDoc();
28     sb.append("FlickrGroups[groups=(");
29
30     for (Group group : groups) {
31       sb.append(group.toString());
32       sb.append(' ');
33     }
34
35     sb.append(")]");
36
37     return sb.toString();
38   }
39 }
40
Popular Tags