1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.mobility.maps.entity;
17
18 import java.io.Serializable;
19 import java.util.HashSet;
20 import java.util.Set;
21
22 import javax.xml.bind.annotation.XmlElement;
23 import javax.xml.bind.annotation.XmlRootElement;
24
25 import flexjson.JSONSerializer;
26
27 @XmlRootElement( name = "mapGroup")
28 public class MapsGroup implements Serializable {
29
30 private static final long serialVersionUID = -4775149005202188253L;
31
32 private String id;
33
34 private String name;
35
36 private boolean active;
37
38 private Set<Location> mapsLocations;
39
40 private Set<MapsGroup> mapsGroupChildren;
41
42 public MapsGroup() {
43 mapsLocations = new HashSet<Location>();
44 mapsGroupChildren = new HashSet<MapsGroup>();
45 }
46
47 public String toJson() {
48 return new JSONSerializer().exclude("*.class").include("mapsLocations").serialize(this);
49 }
50
51 public String getName() {
52 return name;
53 }
54
55 public void setName(String name) {
56 this.name = name;
57 }
58
59 public boolean isActive() {
60 return active;
61 }
62
63 public void setActive(boolean active) {
64 this.active = active;
65 }
66
67 @XmlElement( name = "locations")
68 public Set<Location> getMapsLocations() {
69 return mapsLocations;
70 }
71
72 public void setMapsLocations(Set<Location> mapsLocations) {
73 this.mapsLocations = mapsLocations;
74 }
75
76 @XmlElement( name = "mapGroupChildren")
77 public Set<MapsGroup> getMapsGroupChildren() {
78 return mapsGroupChildren;
79 }
80
81 public void setMapsGroupChildren(Set<MapsGroup> mapsGroupChildren) {
82 this.mapsGroupChildren = mapsGroupChildren;
83 }
84
85 public String getId() {
86 return id;
87 }
88
89 public void setId(String id) {
90 this.id = id;
91 }
92 }