View Javadoc

1   package org.inigma.utopia;
2   
3   import java.util.Calendar;
4   import java.util.UUID;
5   
6   import org.inigma.utopia.utils.CalendarUtils;
7   
8   public class Survey {
9       private String id;
10      private Province province;
11      private int barren;
12      private int homes;
13      private int farms;
14      private int mills;
15      private int banks;
16      private int trainingGrounds;
17      private int armories;
18      private int barracks;
19      private int forts;
20      private int guardStations;
21      private int hospitals;
22      private int guilds;
23      private int towers;
24      private int thievesDens;
25      private int watchtowers;
26      private int libraries;
27      private int schools;
28      private int stables;
29      private int dungeons;
30      private Calendar lastUpdate;
31      private float efficiency;
32  
33      public Survey() {
34          this.id = UUID.randomUUID().toString();
35          this.lastUpdate = CalendarUtils.getCalendar();
36          this.lastUpdate.setTimeInMillis(0);
37      }
38  
39      public Survey(Province province) {
40          this();
41          this.province = province;
42      }
43  
44      public void copy(Survey survey) {
45          this.armories = survey.armories;
46          this.banks = survey.banks;
47          this.barracks = survey.barracks;
48          this.barren = survey.barren;
49          this.dungeons = survey.dungeons;
50          this.efficiency = survey.efficiency;
51          this.farms = survey.farms;
52          this.forts = survey.forts;
53          this.guardStations = survey.guardStations;
54          this.guilds = survey.guilds;
55          this.homes = survey.homes;
56          this.hospitals = survey.hospitals;
57          this.lastUpdate = survey.lastUpdate;
58          this.libraries = survey.libraries;
59          this.mills = survey.mills;
60          this.schools = survey.schools;
61          this.stables = survey.stables;
62          this.thievesDens = survey.thievesDens;
63          this.towers = survey.towers;
64          this.trainingGrounds = survey.trainingGrounds;
65          this.watchtowers = survey.watchtowers;
66      }
67  
68      public int getArmories() {
69          return armories;
70      }
71  
72      public int getBanks() {
73          return banks;
74      }
75  
76      public int getBarracks() {
77          return barracks;
78      }
79  
80      public int getBarren() {
81          return barren;
82      }
83  
84      public int getDungeons() {
85          return dungeons;
86      }
87  
88      public float getEfficiency() {
89          return efficiency;
90      }
91  
92      public int getFarms() {
93          return farms;
94      }
95  
96      public int getForts() {
97          return forts;
98      }
99  
100     public int getGuardStations() {
101         return guardStations;
102     }
103 
104     public int getGuilds() {
105         return guilds;
106     }
107 
108     public int getHomes() {
109         return homes;
110     }
111 
112     public int getHospitals() {
113         return hospitals;
114     }
115 
116     public String getId() {
117         return id;
118     }
119 
120     public Calendar getLastUpdate() {
121         return lastUpdate;
122     }
123 
124     public int getLibraries() {
125         return libraries;
126     }
127 
128     public int getMills() {
129         return mills;
130     }
131 
132     public Province getProvince() {
133         return province;
134     }
135 
136     public int getSchools() {
137         return schools;
138     }
139 
140     public int getStables() {
141         return stables;
142     }
143 
144     public int getThievesDens() {
145         return thievesDens;
146     }
147 
148     public int getTotalAcres() {
149         return barren + homes + farms + mills + banks + trainingGrounds + barracks + armories + forts + guardStations
150                 + hospitals + guilds + towers + thievesDens + watchtowers + libraries + schools + stables + dungeons;
151     }
152 
153     public int getTowers() {
154         return towers;
155     }
156 
157     public int getTrainingGrounds() {
158         return trainingGrounds;
159     }
160 
161     public int getWatchtowers() {
162         return watchtowers;
163     }
164 
165     public void setArmories(int armories) {
166         this.armories = armories;
167     }
168 
169     public void setBanks(int banks) {
170         this.banks = banks;
171     }
172 
173     public void setBarracks(int barracks) {
174         this.barracks = barracks;
175     }
176 
177     public void setBarren(int barren) {
178         this.barren = barren;
179     }
180 
181     public void setDungeons(int dungeons) {
182         this.dungeons = dungeons;
183     }
184 
185     public void setEfficiency(float efficiency) {
186         this.efficiency = efficiency;
187     }
188 
189     public void setFarms(int farms) {
190         this.farms = farms;
191     }
192 
193     public void setForts(int forts) {
194         this.forts = forts;
195     }
196 
197     public void setGuardStations(int guardStations) {
198         this.guardStations = guardStations;
199     }
200 
201     public void setGuilds(int guilds) {
202         this.guilds = guilds;
203     }
204 
205     public void setHomes(int homes) {
206         this.homes = homes;
207     }
208 
209     public void setHospitals(int hospitals) {
210         this.hospitals = hospitals;
211     }
212 
213     public void setId(String id) {
214         this.id = id;
215     }
216 
217     public void setLastUpdate(Calendar lastUpdate) {
218         this.lastUpdate = CalendarUtils.getCalendar(lastUpdate);
219     }
220 
221     public void setLibraries(int libraries) {
222         this.libraries = libraries;
223     }
224 
225     public void setMills(int mills) {
226         this.mills = mills;
227     }
228 
229     public void setProvince(Province province) {
230         this.province = province;
231     }
232 
233     public void setSchools(int schools) {
234         this.schools = schools;
235     }
236 
237     public void setStables(int stables) {
238         this.stables = stables;
239     }
240 
241     public void setThievesDens(int thievesDens) {
242         this.thievesDens = thievesDens;
243     }
244 
245     public void setTowers(int towers) {
246         this.towers = towers;
247     }
248 
249     public void setTrainingGrounds(int trainingGrounds) {
250         this.trainingGrounds = trainingGrounds;
251     }
252 
253     public void setWatchtowers(int watchtowers) {
254         this.watchtowers = watchtowers;
255     }
256 }