UdgerIpResult.java
1/*
2 Udger-update - Data updater for udger local and cloud parser
3
4 author The Udger.com Team (info@udger.com)
5 copyright Copyright (c) Udger s.r.o.
6 license GNU Lesser General Public License
7 link https://udger.com/products
8*/
9package org.udger.parser;
10
11import java.io.Serializable;
12
13public class UdgerIpResult implements Serializable {
14
15 private static final long serialVersionUID = 1L;
16
17 // IP
18 private final String ip;
19 private int ipVer = 0;
20 private String ipClassification = "";
21 private String ipClassificationCode = "";
22 private String ipLastSeen = "";
23 private String ipHostname = "";
24 private String ipCountry = "";
25 private String ipCountryCode = "";
26 private String ipCity = "";
27 private String crawlerName = "";
28 private String crawlerVer = "";
29 private String crawlerVerMajor = "";
30 private String crawlerFamily = "";
31 private String crawlerFamilyCode = "";
32 private String crawlerFamilyHomepage = "";
33 private String crawlerFamilyVendor = "";
34 private String crawlerFamilyVendorCode = "";
35 private String crawlerFamilyVendorHomepage = "";
36 private String crawlerFamilyIcon = "";
37 private String crawlerFamilyInfoUrl = "";
38 private String crawlerLastSeen = "";
39 private String crawlerCategory = "";
40 private String crawlerCategoryCode = "";
41 private String crawlerRespectRobotstxt = "";
42
43 // DATACENTER
44 private String dataCenterName = "";
45 private String dataCenterNameCode = "";
46 private String dataCenterHomePage = "";
47
48 public UdgerIpResult(String ipString) {
49 this.ip = ipString;
50 }
51
52 public String getIp() {
53 return ip;
54 }
55
56 public int getIpVer() {
57 return ipVer;
58 }
59 public void setIpVer(int ipVer) {
60 this.ipVer = ipVer;
61 }
62 public String getIpClassification() {
63 return ipClassification;
64 }
65 public void setIpClassification(String ipClassification) {
66 this.ipClassification = ipClassification;
67 }
68 public String getIpClassificationCode() {
69 return ipClassificationCode;
70 }
71 public void setIpClassificationCode(String ipClassificationCode) {
72 this.ipClassificationCode = ipClassificationCode;
73 }
74 public String getIpLastSeen() {
75 return ipLastSeen;
76 }
77 public void setIpLastSeen(String ipLastSeen) {
78 this.ipLastSeen = ipLastSeen;
79 }
80 public String getIpHostname() {
81 return ipHostname;
82 }
83 public void setIpHostname(String ipHostname) {
84 this.ipHostname = ipHostname;
85 }
86 public String getIpCountry() {
87 return ipCountry;
88 }
89 public void setIpCountry(String ipCountry) {
90 this.ipCountry = ipCountry;
91 }
92 public String getIpCountryCode() {
93 return ipCountryCode;
94 }
95 public void setIpCountryCode(String ipCountryCode) {
96 this.ipCountryCode = ipCountryCode;
97 }
98 public String getIpCity() {
99 return ipCity;
100 }
101 public void setIpCity(String ipCity) {
102 this.ipCity = ipCity;
103 }
104 public String getCrawlerName() {
105 return crawlerName;
106 }
107 public void setCrawlerName(String crawlerName) {
108 this.crawlerName = crawlerName;
109 }
110 public String getCrawlerVer() {
111 return crawlerVer;
112 }
113 public void setCrawlerVer(String crawlerVer) {
114 this.crawlerVer = crawlerVer;
115 }
116 public String getCrawlerVerMajor() {
117 return crawlerVerMajor;
118 }
119 public void setCrawlerVerMajor(String crawlerVerMajor) {
120 this.crawlerVerMajor = crawlerVerMajor;
121 }
122 public String getCrawlerFamily() {
123 return crawlerFamily;
124 }
125 public void setCrawlerFamily(String crawlerFamily) {
126 this.crawlerFamily = crawlerFamily;
127 }
128 public String getCrawlerFamilyCode() {
129 return crawlerFamilyCode;
130 }
131 public void setCrawlerFamilyCode(String crawlerFamilyCode) {
132 this.crawlerFamilyCode = crawlerFamilyCode;
133 }
134 public String getCrawlerFamilyHomepage() {
135 return crawlerFamilyHomepage;
136 }
137 public void setCrawlerFamilyHomepage(String crawlerFamilyHomepage) {
138 this.crawlerFamilyHomepage = crawlerFamilyHomepage;
139 }
140 public String getCrawlerFamilyVendor() {
141 return crawlerFamilyVendor;
142 }
143 public void setCrawlerFamilyVendor(String crawlerFamilyVendor) {
144 this.crawlerFamilyVendor = crawlerFamilyVendor;
145 }
146 public String getCrawlerFamilyVendorCode() {
147 return crawlerFamilyVendorCode;
148 }
149 public void setCrawlerFamilyVendorCode(String crawlerFamilyVendorCode) {
150 this.crawlerFamilyVendorCode = crawlerFamilyVendorCode;
151 }
152 public String getCrawlerFamilyVendorHomepage() {
153 return crawlerFamilyVendorHomepage;
154 }
155 public void setCrawlerFamilyVendorHomepage(String crawlerFamilyVendorHomepage) {
156 this.crawlerFamilyVendorHomepage = crawlerFamilyVendorHomepage;
157 }
158 public String getCrawlerFamilyIcon() {
159 return crawlerFamilyIcon;
160 }
161 public void setCrawlerFamilyIcon(String crawlerFamilyIcon) {
162 this.crawlerFamilyIcon = crawlerFamilyIcon;
163 }
164 public String getCrawlerFamilyInfoUrl() {
165 return crawlerFamilyInfoUrl;
166 }
167 public void setCrawlerFamilyInfoUrl(String crawlerFamilyInfoUrl) {
168 this.crawlerFamilyInfoUrl = crawlerFamilyInfoUrl;
169 }
170 public String getCrawlerLastSeen() {
171 return crawlerLastSeen;
172 }
173 public void setCrawlerLastSeen(String crawlerLastSeen) {
174 this.crawlerLastSeen = crawlerLastSeen;
175 }
176 public String getCrawlerCategory() {
177 return crawlerCategory;
178 }
179 public void setCrawlerCategory(String crawlerCategory) {
180 this.crawlerCategory = crawlerCategory;
181 }
182 public String getCrawlerCategoryCode() {
183 return crawlerCategoryCode;
184 }
185 public void setCrawlerCategoryCode(String crawlerCategoryCode) {
186 this.crawlerCategoryCode = crawlerCategoryCode;
187 }
188 public String getCrawlerRespectRobotstxt() {
189 return crawlerRespectRobotstxt;
190 }
191 public void setCrawlerRespectRobotstxt(String crawlerRespectRobotstxt) {
192 this.crawlerRespectRobotstxt = crawlerRespectRobotstxt;
193 }
194 public String getDataCenterName() {
195 return dataCenterName;
196 }
197 public void setDataCenterName(String dataCenterName) {
198 this.dataCenterName = dataCenterName;
199 }
200 public String getDataCenterNameCode() {
201 return dataCenterNameCode;
202 }
203 public void setDataCenterNameCode(String dataCenterNameCode) {
204 this.dataCenterNameCode = dataCenterNameCode;
205 }
206 public String getDataCenterHomePage() {
207 return dataCenterHomePage;
208 }
209 public void setDataCenterHomePage(String dataCenterHomePage) {
210 this.dataCenterHomePage = dataCenterHomePage;
211 }
212
213 @Override
214 public int hashCode() {
215 final int prime = 31;
216 int result = 1;
217 result = prime * result + ((crawlerCategory == null) ? 0 : crawlerCategory.hashCode());
218 result = prime * result + ((crawlerCategoryCode == null) ? 0 : crawlerCategoryCode.hashCode());
219 result = prime * result + ((crawlerFamily == null) ? 0 : crawlerFamily.hashCode());
220 result = prime * result + ((crawlerFamilyCode == null) ? 0 : crawlerFamilyCode.hashCode());
221 result = prime * result + ((crawlerFamilyHomepage == null) ? 0 : crawlerFamilyHomepage.hashCode());
222 result = prime * result + ((crawlerFamilyIcon == null) ? 0 : crawlerFamilyIcon.hashCode());
223 result = prime * result + ((crawlerFamilyInfoUrl == null) ? 0 : crawlerFamilyInfoUrl.hashCode());
224 result = prime * result + ((crawlerFamilyVendor == null) ? 0 : crawlerFamilyVendor.hashCode());
225 result = prime * result + ((crawlerFamilyVendorCode == null) ? 0 : crawlerFamilyVendorCode.hashCode());
226 result = prime * result + ((crawlerFamilyVendorHomepage == null) ? 0 : crawlerFamilyVendorHomepage.hashCode());
227 result = prime * result + ((crawlerLastSeen == null) ? 0 : crawlerLastSeen.hashCode());
228 result = prime * result + ((crawlerName == null) ? 0 : crawlerName.hashCode());
229 result = prime * result + ((crawlerRespectRobotstxt == null) ? 0 : crawlerRespectRobotstxt.hashCode());
230 result = prime * result + ((crawlerVer == null) ? 0 : crawlerVer.hashCode());
231 result = prime * result + ((crawlerVerMajor == null) ? 0 : crawlerVerMajor.hashCode());
232 result = prime * result + ((dataCenterHomePage == null) ? 0 : dataCenterHomePage.hashCode());
233 result = prime * result + ((dataCenterName == null) ? 0 : dataCenterName.hashCode());
234 result = prime * result + ((dataCenterNameCode == null) ? 0 : dataCenterNameCode.hashCode());
235 result = prime * result + ((ip == null) ? 0 : ip.hashCode());
236 result = prime * result + ((ipCity == null) ? 0 : ipCity.hashCode());
237 result = prime * result + ((ipClassification == null) ? 0 : ipClassification.hashCode());
238 result = prime * result + ((ipClassificationCode == null) ? 0 : ipClassificationCode.hashCode());
239 result = prime * result + ((ipCountry == null) ? 0 : ipCountry.hashCode());
240 result = prime * result + ((ipCountryCode == null) ? 0 : ipCountryCode.hashCode());
241 result = prime * result + ((ipHostname == null) ? 0 : ipHostname.hashCode());
242 result = prime * result + ((ipLastSeen == null) ? 0 : ipLastSeen.hashCode());
243 result = prime * result + ipVer;
244 return result;
245 }
246
247 @Override
248 public boolean equals(Object obj) {
249 if (this == obj)
250 return true;
251 if (obj == null)
252 return false;
253 if (getClass() != obj.getClass())
254 return false;
255 UdgerIpResult other = (UdgerIpResult) obj;
256 if (crawlerCategory == null) {
257 if (other.crawlerCategory != null)
258 return false;
259 } else if (!crawlerCategory.equals(other.crawlerCategory))
260 return false;
261 if (crawlerCategoryCode == null) {
262 if (other.crawlerCategoryCode != null)
263 return false;
264 } else if (!crawlerCategoryCode.equals(other.crawlerCategoryCode))
265 return false;
266 if (crawlerFamily == null) {
267 if (other.crawlerFamily != null)
268 return false;
269 } else if (!crawlerFamily.equals(other.crawlerFamily))
270 return false;
271 if (crawlerFamilyCode == null) {
272 if (other.crawlerFamilyCode != null)
273 return false;
274 } else if (!crawlerFamilyCode.equals(other.crawlerFamilyCode))
275 return false;
276 if (crawlerFamilyHomepage == null) {
277 if (other.crawlerFamilyHomepage != null)
278 return false;
279 } else if (!crawlerFamilyHomepage.equals(other.crawlerFamilyHomepage))
280 return false;
281 if (crawlerFamilyIcon == null) {
282 if (other.crawlerFamilyIcon != null)
283 return false;
284 } else if (!crawlerFamilyIcon.equals(other.crawlerFamilyIcon))
285 return false;
286 if (crawlerFamilyInfoUrl == null) {
287 if (other.crawlerFamilyInfoUrl != null)
288 return false;
289 } else if (!crawlerFamilyInfoUrl.equals(other.crawlerFamilyInfoUrl))
290 return false;
291 if (crawlerFamilyVendor == null) {
292 if (other.crawlerFamilyVendor != null)
293 return false;
294 } else if (!crawlerFamilyVendor.equals(other.crawlerFamilyVendor))
295 return false;
296 if (crawlerFamilyVendorCode == null) {
297 if (other.crawlerFamilyVendorCode != null)
298 return false;
299 } else if (!crawlerFamilyVendorCode.equals(other.crawlerFamilyVendorCode))
300 return false;
301 if (crawlerFamilyVendorHomepage == null) {
302 if (other.crawlerFamilyVendorHomepage != null)
303 return false;
304 } else if (!crawlerFamilyVendorHomepage.equals(other.crawlerFamilyVendorHomepage))
305 return false;
306 if (crawlerLastSeen == null) {
307 if (other.crawlerLastSeen != null)
308 return false;
309 } else if (!crawlerLastSeen.equals(other.crawlerLastSeen))
310 return false;
311 if (crawlerName == null) {
312 if (other.crawlerName != null)
313 return false;
314 } else if (!crawlerName.equals(other.crawlerName))
315 return false;
316 if (crawlerRespectRobotstxt == null) {
317 if (other.crawlerRespectRobotstxt != null)
318 return false;
319 } else if (!crawlerRespectRobotstxt.equals(other.crawlerRespectRobotstxt))
320 return false;
321 if (crawlerVer == null) {
322 if (other.crawlerVer != null)
323 return false;
324 } else if (!crawlerVer.equals(other.crawlerVer))
325 return false;
326 if (crawlerVerMajor == null) {
327 if (other.crawlerVerMajor != null)
328 return false;
329 } else if (!crawlerVerMajor.equals(other.crawlerVerMajor))
330 return false;
331 if (dataCenterHomePage == null) {
332 if (other.dataCenterHomePage != null)
333 return false;
334 } else if (!dataCenterHomePage.equals(other.dataCenterHomePage))
335 return false;
336 if (dataCenterName == null) {
337 if (other.dataCenterName != null)
338 return false;
339 } else if (!dataCenterName.equals(other.dataCenterName))
340 return false;
341 if (dataCenterNameCode == null) {
342 if (other.dataCenterNameCode != null)
343 return false;
344 } else if (!dataCenterNameCode.equals(other.dataCenterNameCode))
345 return false;
346 if (ip == null) {
347 if (other.ip != null)
348 return false;
349 } else if (!ip.equals(other.ip))
350 return false;
351 if (ipCity == null) {
352 if (other.ipCity != null)
353 return false;
354 } else if (!ipCity.equals(other.ipCity))
355 return false;
356 if (ipClassification == null) {
357 if (other.ipClassification != null)
358 return false;
359 } else if (!ipClassification.equals(other.ipClassification))
360 return false;
361 if (ipClassificationCode == null) {
362 if (other.ipClassificationCode != null)
363 return false;
364 } else if (!ipClassificationCode.equals(other.ipClassificationCode))
365 return false;
366 if (ipCountry == null) {
367 if (other.ipCountry != null)
368 return false;
369 } else if (!ipCountry.equals(other.ipCountry))
370 return false;
371 if (ipCountryCode == null) {
372 if (other.ipCountryCode != null)
373 return false;
374 } else if (!ipCountryCode.equals(other.ipCountryCode))
375 return false;
376 if (ipHostname == null) {
377 if (other.ipHostname != null)
378 return false;
379 } else if (!ipHostname.equals(other.ipHostname))
380 return false;
381 if (ipLastSeen == null) {
382 if (other.ipLastSeen != null)
383 return false;
384 } else if (!ipLastSeen.equals(other.ipLastSeen))
385 return false;
386 if (ipVer != other.ipVer)
387 return false;
388 return true;
389 }
390
391 @Override
392 public String toString() {
393 return "UdgerIpResult [" +
394 "ip=" + ip +
395 ", ipVer=" + ipVer +
396 ", ipClassification=" + ipClassification +
397 ", ipClassificationCode=" + ipClassificationCode +
398 ", ipLastSeen=" + ipLastSeen +
399 ", ipHostname=" + ipHostname +
400 ", ipCountry=" + ipCountry +
401 ", ipCountryCode=" + ipCountryCode +
402 ", ipCity=" + ipCity +
403 ", crawlerName=" + crawlerName +
404 ", crawlerVer=" + crawlerVer +
405 ", crawlerVerMajor=" + crawlerVerMajor +
406 ", crawlerFamily=" + crawlerFamily +
407 ", crawlerFamilyCode=" + crawlerFamilyCode +
408 ", crawlerFamilyHomepage=" + crawlerFamilyHomepage +
409 ", crawlerFamilyVendor=" + crawlerFamilyVendor +
410 ", crawlerFamilyVendorCode=" + crawlerFamilyVendorCode +
411 ", crawlerFamilyVendorHomepage=" + crawlerFamilyVendorHomepage +
412 ", crawlerFamilyIcon=" + crawlerFamilyIcon +
413 ", crawlerFamilyInfoUrl=" + crawlerFamilyInfoUrl +
414 ", crawlerLastSeen=" + crawlerLastSeen +
415 ", crawlerCategory=" + crawlerCategory +
416 ", crawlerCategoryCode=" + crawlerCategoryCode +
417 ", crawlerRespectRobotstxt=" + crawlerRespectRobotstxt +
418 ", dataCenterName=" + dataCenterName +
419 ", dataCenterNameCode=" + dataCenterNameCode +
420 ", dataCenterHomePage=" + dataCenterHomePage +
421 "]";
422 }
423
424}