01: package example.data;
02:
03: import java.util.*;
04: import javax.xml.bind.annotation.*;
05:
06: @XmlRootElement(name="groups")
07: public class FlickrGroups implements FlickrPayload {
08: @XmlElement(name="group")
09: public List<Group> groups = new ArrayList<Group>();
10:
11: public static class Group {
12: @XmlAttribute
13: public String nsid;
14: @XmlAttribute
15: public String name;
16: @XmlAttribute
17: public int admin;
18: @XmlAttribute
19: public int eighteenplus;
20:
21: public String toString() {
22: return "Group[nsid=" + nsid + ", " + "name=" + name + ", "
23: + "admin=" + admin + ", " + "eighteenplus="
24: + eighteenplus + "]";
25: }
26: }
27:
28: public String toString() {
29: StringBuilder sb = new StringBuilder();
30: sb.append("FlickrGroups[groups=(");
31:
32: for (Group group : groups) {
33: sb.append(group.toString());
34: sb.append(' ');
35: }
36:
37: sb.append(")]");
38:
39: return sb.toString();
40: }
41: }
|