Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. package pl.edu.agh.iet.miles.master.model;
  2.  
  3. import com.fasterxml.jackson.annotation.JsonProperty;
  4.  
  5. import java.util.List;
  6.  
  7. public class GeoLocation {
  8.  
  9. @JsonProperty("Results")
  10. List<Result> results;
  11. List<Link> links;
  12.  
  13. private class Link {
  14. private String rel;
  15. private String href;
  16. }
  17.  
  18.  
  19. private class PlaceInformation {
  20. private String confidenceFactor;
  21. private float longitude;
  22. private float latitude;
  23. private String name;
  24. private String category;
  25. private String id;
  26. private String city;
  27. private String state;
  28. private String country;
  29.  
  30. public PlaceInformation(String confidenceFactor, float longitude, float latitude, String name,
  31. String category, String id, String city, String state, String country) {
  32. this.confidenceFactor = confidenceFactor;
  33. this.longitude = longitude;
  34. this.latitude = latitude;
  35. this.name = name;
  36. this.category = category;
  37. this.id = id;
  38. this.city = city;
  39. this.state = state;
  40. this.country = country;
  41. }
  42. }
  43.  
  44. private class GeoCodeRS {
  45. private String status;
  46. private List<PlaceInformation> place;
  47.  
  48. public GeoCodeRS(String status, List<PlaceInformation> place) {
  49. this.status = status;
  50. this.place = place;
  51. }
  52. }
  53.  
  54. private class Result {
  55. private GeoCodeRS geoCodeRS;
  56.  
  57. public Result() {
  58. }
  59. }
  60.  
  61.  
  62. // "Results":[
  63. //
  64. // {
  65. // "GeoCodeRS":{
  66. // "status":"ONE_PLACE_FOUND",
  67. // "Place": [{
  68. // "confidenceFactor":"ADDRESS_QUALITY",
  69. // "latitude":32.896111,
  70. // "longitude":-97.041111,
  71. // "Name":"Dallas Fort Worth International",
  72. // "Category":"AIR",
  73. // "Id":"DFW",
  74. // "City":"Dallas",
  75. // "State":"TX",
  76. // "Country":"US"
  77. // }]
  78. // }
  79. // }],
  80. // "Links":[
  81. //
  82. // {
  83. // "rel":"self",
  84. // "href":"https://api.test.sabre.com/v1/lists/utilities/geocode/locations"
  85. // },
  86. //
  87. // {
  88. // "rel":"linkTemplate",
  89. // "href":"https://api.test.sabre.com/v1/lists/utilities/geocode/locations"
  90. // }]
  91.  
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement