Changeset 30500 in osm for applications/editors/josm/plugins/mapdust/src
- Timestamp:
- 2014-06-30T13:17:57+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust
- Files:
-
- 1 added
- 2 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java
r28630 r30500 49 49 /** 50 50 * Defines the JPanel which displays the Help. 51 * 51 * 52 52 * @author Bea 53 53 */ 54 54 public class MapdustHelpPanel extends JPanel implements HyperlinkListener { 55 55 56 56 /** The serial version UID */ 57 57 private static final long serialVersionUID = 8366853437915060878L; 58 58 59 59 /** 60 60 * Builds a <code>MapdustDescriptionPanel</code> object … … 70 70 txtHelp.setText(txt); 71 71 txtHelp.addHyperlinkListener(this); 72 JScrollPane cmpDescription = ComponentUtil.createJScrollPane(txtHelp, 73 null, Color.white, true, true); 72 JScrollPane cmpDescription = 73 ComponentUtil.createJScrollPane(txtHelp, null, Color.white, 74 true, true); 74 75 cmpDescription.setPreferredSize(new Dimension(100, 100)); 75 76 add(cmpDescription, BorderLayout.CENTER); 76 77 } 77 78 78 79 @Override 79 80 public void hyperlinkUpdate(HyperlinkEvent event) { … … 89 90 } 90 91 } 91 92 92 93 /** 93 94 * Builds the text of the Help panel. This text contains general information 94 95 * related to the MapDust plugin. 95 * 96 * 96 97 * @return a string containing the text which will be displayed on the Help 97 98 * tab 98 99 */ 99 100 private String buildText() { 100 Integerversion =Integer.decode(Main.pref.get("mapdust.version"));101 IntegerlocalVersion =Integer.decode(Main.pref.get("mapdust.localVersion"));102 String txt ="<html>";103 txt +="<font style='font-size:10px' face='Times New Roman'>";104 txt +="<b>You are using MapDust version ";105 txt +="<i style='color:red;font-size:10px'>";106 if (version <=localVersion) {107 txt +=version+"</i>.</b><br>";101 String version = Main.pref.get("mapdust.version"); 102 String localVersion = Main.pref.get("mapdust.localVersion"); 103 StringBuilder sb = new StringBuilder("<html>"); 104 sb.append("<font style='font-size:10px' face='Times New Roman'>"); 105 sb.append("<b>You are using MapDust version "); 106 sb.append("<i style='color:red;font-size:10px'>"); 107 if (version.equals(localVersion)) { 108 sb.append(version).append("</i>.</b><br>"); 108 109 } else { 109 txt += localVersion + "</i>. There is an update available. "; 110 txt += "Please update to version "; 111 txt += "<i style='color:red;font-size:10px'>" + version; 112 txt += "</i> to benefit from the latest improvements.</b><br>"; 110 sb.append(localVersion); 111 sb.append("</i>. There is an update available. "); 112 sb.append("Please update to version "); 113 sb.append("<i style='color:red;font-size:10px'>"); 114 sb.append(version); 115 sb.append("</i> to benefit from the latest improvements.</b><br>"); 113 116 } 114 txt +="<b>To add bugs on the map you need to activate ";115 txt +="the MapDust layer in the Layer List Dialog.";116 txt +="Click <a href='' target='_blank'>here</a> for more help.";117 txt +="</b></font></html>";118 return txt;117 sb.append("<b>To add bugs on the map you need to activate "); 118 sb.append("the MapDust layer in the Layer List Dialog."); 119 sb.append("Click <a href='' target='_blank'>here</a> for more help."); 120 sb.append("</b></font></html>"); 121 return sb.toString(); 119 122 } 120 121 123 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/MapdustServiceHandler.java
r25591 r30500 35 35 import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustGetBugsResponse; 36 36 import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustPostResponse; 37 import org.openstreetmap.josm.plugins.mapdust.service.converter.MapdustConverter;38 37 import org.openstreetmap.josm.plugins.mapdust.service.value.BoundingBox; 39 38 import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug; -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/MapdustConnector.java
r25828 r30500 35 35 import java.util.List; 36 36 import java.util.Map; 37 import org.openstreetmap.josm.plugins.mapdust.service.connector.parser.MapdustParser;38 import org.openstreetmap.josm.plugins.mapdust.service.connector.parser.MapdustParserException;39 37 import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustGetBugResponse; 40 38 import org.openstreetmap.josm.plugins.mapdust.service.connector.response.MapdustGetBugsResponse; … … 50 48 import org.openstreetmap.josm.plugins.mapdust.util.http.HttpResponse; 51 49 import org.openstreetmap.josm.plugins.mapdust.util.retry.RetrySetup; 50 import com.google.gson.FieldNamingPolicy; 51 import com.google.gson.Gson; 52 import com.google.gson.GsonBuilder; 53 import com.google.gson.JsonSyntaxException; 52 54 53 55 … … 56 58 * and executes the following Mapdust service methods: getBug, getBugs, addBug, 57 59 * commentBug and changeBugStatus. 58 * 60 * 59 61 * @author Bea 60 62 */ 61 63 public class MapdustConnector { 62 64 63 65 /** The <code>HttpConnector</code> object */ 64 66 private final HttpConnector httpConnector; 65 66 /** The <code>MapdustParser</code> object */ 67 private final MapdustParser parser; 68 67 68 private Gson gson; 69 69 70 /** 70 71 * Builds a <code>MapdustConnector</code> object with the default settings. … … 72 73 public MapdustConnector() { 73 74 httpConnector = new HttpConnector(RetrySetup.DEFAULT); 74 parser = new MapdustParser(); 75 } 76 77 /** 78 * Builds a <code>MapdustConnector</code> object based on the given 79 * arguments. 80 * 81 * @param httpConnector The <code>HttpConnector</code> object. 82 * @param parser The <code>MapdustParser</code> object. 83 */ 84 public MapdustConnector(HttpConnector httpConnector, MapdustParser parser) { 85 this.httpConnector = httpConnector; 86 this.parser = parser; 87 } 88 75 gson = buildGson(); 76 } 77 78 private Gson buildGson() { 79 GsonBuilder builder = new GsonBuilder(); 80 builder.setDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); 81 builder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES); 82 return builder.create(); 83 } 84 89 85 /** 90 86 * Searches for the OSM MapDust bugs in the given bounding box. The method … … 94 90 * if the response code is not 200,201 or 204, a corresponding exception 95 91 * will be thrown. 96 * 92 * 97 93 * @param bBox The bounding box where the bugs are searched. 98 94 * @param filter The MapDust bug filter. The bugs can be filtered based on … … 109 105 try { 110 106 httpResponse = executeGetBugs(bBox, filter); 111 } catch (MalformedURLException e) {112 throw new MapdustConnectorException(e.getMessage(), e);113 } catch (IOException e) {114 throw new MapdustConnectorException(e.getMessage(), e);115 107 } catch (Exception e) { 116 108 throw new MapdustConnectorException(e.getMessage(), e); … … 121 113 /* verify status codes */ 122 114 handleStatusCode(httpResponse); 123 result = (MapdustGetBugsResponse) getParser().parseResponse(124 httpResponse.getContent(),MapdustGetBugsResponse.class);115 result = parseResponse(httpResponse.getContent(), 116 MapdustGetBugsResponse.class); 125 117 } catch (MapdustConnectorException e) { 126 118 throw new MapdustConnectorException(e.getMessage(), e); 127 } catch (MapdustParserException e) {128 throw new MapdustConnectorException(e.getMessage(), e);129 119 } 130 120 return result; 131 121 } 132 133 122 123 134 124 /** 135 125 * Returns the OSM bug with the given id. If the <code>Paging</code> object … … 138 128 * response object and return a <code>MapdustGetBugResponse</code> object. 139 129 * In the case if the response code is not 2 140 * 130 * 141 131 * @param id The id of the object 142 132 * @param paging The <code>Paging</code> object 143 133 * @return A <code>MapdustGetBugResponse</code> object. 144 * 134 * 145 135 * @throws MapdustConnectorException In the case of an error. 146 136 */ … … 150 140 try { 151 141 httpResponse = executeGetBug(id, paging); 152 } catch (MalformedURLException e) {153 throw new MapdustConnectorException(e.getMessage(), e);154 } catch (IOException e) {155 throw new MapdustConnectorException(e.getMessage(), e);156 142 } catch (Exception e) { 157 143 throw new MapdustConnectorException(e.getMessage(), e); … … 161 147 try { 162 148 handleStatusCode(httpResponse); 163 result = (MapdustGetBugResponse) getParser().parseResponse(164 httpResponse.getContent(),MapdustGetBugResponse.class);149 result = parseResponse(httpResponse.getContent(), 150 MapdustGetBugResponse.class); 165 151 } catch (MapdustConnectorException e) { 166 152 throw new MapdustConnectorException(e.getMessage(), e); 167 } catch (MapdustParserException e) {168 throw new MapdustConnectorException(e.getMessage(), e);169 153 } 170 154 return result; 171 155 } 172 156 173 157 /** 174 158 * Creates a new OSM bug with the specified arguments. The method executes … … 177 161 * the created comment. In the case if the response code is not 200,201 or 178 162 * 204, a corresponding exception will be thrown. 179 * 163 * 180 164 * @param bug A <code>MapdustBug</code> object 181 165 * @return A <code>MapdustPostResponse</code> object which contains the id 182 166 * of the created object. 183 * 167 * 184 168 * @throws MapdustConnectorException In the case of an error 185 169 */ … … 189 173 try { 190 174 httpResponse = executeAddBug(bug); 191 } catch (MalformedURLException e) {192 throw new MapdustConnectorException(e.getMessage(), e);193 } catch (IOException e) {194 throw new MapdustConnectorException(e.getMessage(), e);195 175 } catch (Exception e) { 196 176 throw new MapdustConnectorException(e.getMessage(), e); 197 177 } 198 178 199 179 /* parse result */ 200 180 MapdustPostResponse result = null; 201 181 try { 202 182 handleStatusCode(httpResponse); 203 result = (MapdustPostResponse) getParser().parseResponse(204 httpResponse.getContent(),MapdustPostResponse.class);183 result = parseResponse(httpResponse.getContent(), 184 MapdustPostResponse.class); 205 185 } catch (MapdustConnectorException e) { 206 186 throw new MapdustConnectorException(e.getMessage(), e); 207 } catch (MapdustParserException e) {208 throw new MapdustConnectorException(e.getMessage(), e);209 187 } 210 188 return result; 211 189 } 212 190 213 191 /** 214 192 * Creates a new comment for the given bug. The method executes the … … 217 195 * the created comment. In the case if the response code is not 200,201 or 218 196 * 204, a corresponding exception will be thrown. 219 * 197 * 220 198 * @param comment A <code>MapdustComment</code> object 221 199 * @return A <code>MapdustPostResponse</code> object which contains the id … … 228 206 try { 229 207 httpResponse = executeCommentBug(comment); 230 } catch (MalformedURLException e) {231 throw new MapdustConnectorException(e.getMessage(), e);232 } catch (IOException e) {233 throw new MapdustConnectorException(e.getMessage(), e);234 208 } catch (Exception e) { 235 209 throw new MapdustConnectorException(e.getMessage(), e); … … 239 213 try { 240 214 handleStatusCode(httpResponse); 241 result = (MapdustPostResponse) getParser().parseResponse(242 httpResponse.getContent(),MapdustPostResponse.class);215 result = parseResponse(httpResponse.getContent(), 216 MapdustPostResponse.class); 243 217 } catch (MapdustConnectorException e) { 244 218 throw new MapdustConnectorException(e.getMessage(), e); 245 } catch (MapdustParserException e) {246 throw new MapdustConnectorException(e.getMessage(), e);247 219 } 248 220 return result; 249 221 } 250 222 251 223 /** 252 224 * Changes the status of a given bug. The method executes the … … 255 227 * the id of the created comment. In the case if the response code is not 256 228 * 200,201 or 204, a corresponding exception will be thrown. 257 * 229 * 258 230 * @param statusId The new value for the status. Possible values are: 1, 2 259 231 * or 3. … … 268 240 try { 269 241 httpResponse = executeChangeBugStatus(statusId, comment); 270 } catch (MalformedURLException e) {271 throw new MapdustConnectorException(e.getMessage(), e);272 } catch (IOException e) {273 throw new MapdustConnectorException(e.getMessage(), e);274 242 } catch (Exception e) { 275 243 throw new MapdustConnectorException(e.getMessage(), e); … … 279 247 try { 280 248 handleStatusCode(httpResponse); 281 result = (MapdustPostResponse) getParser().parseResponse(282 httpResponse.getContent(),MapdustPostResponse.class);249 result = parseResponse(httpResponse.getContent(), 250 MapdustPostResponse.class); 283 251 } catch (MapdustConnectorException e) { 284 252 throw new MapdustConnectorException(e.getMessage(), e); 285 } catch (MapdustParserException e) {286 throw new MapdustConnectorException(e.getMessage(), e);287 253 } 288 254 return result; 289 255 } 290 256 291 257 /** 292 258 * Executes the 'getBugs' MapDust service method. 293 * 259 * 294 260 * @param bBox The bounding box where the bugs are searched. This parameter 295 261 * it is a required parameter. … … 333 299 } 334 300 if (filter.getMinRelevance() != null) { 335 int min =filter.getMinRelevance().getRange().getLowerValue();301 int min = filter.getMinRelevance().getRange().getLowerValue(); 336 302 urlString += "&minr=" + min; 337 303 } 338 304 if (filter.getMaxRelevance() != null) { 339 int max= filter.getMaxRelevance().getRange().getUpperValue(); 305 int max = filter.getMaxRelevance().getRange().getUpperValue(); 340 306 urlString += "&maxr=" + max; 341 307 } … … 345 311 if (urlString != null) { 346 312 url = new URL(urlString); 347 httpResponse = getHttpConnector().executeGET(url);313 httpResponse = httpConnector.executeGET(url); 348 314 } 349 315 return httpResponse; 350 316 } 351 317 352 318 /** 353 319 * Executes the 'getBug' MapDust service method. 354 * 320 * 355 321 * @param id The id of the object 356 322 * @param paging The <code>Paging</code> object 357 323 * @return A <code>HttpResponse</code> containing the JSON response of the 358 324 * Mapdust method. 359 * 325 * 360 326 * @throws MalformedURLException In the case if the format of the URL is 361 327 * invalid … … 384 350 if (urlString != null) { 385 351 url = new URL(urlString); 386 httpResponse = getHttpConnector().executeGET(url);352 httpResponse = httpConnector.executeGET(url); 387 353 } 388 354 return httpResponse; 389 355 } 390 356 391 357 /** 392 358 * Executes the 'addBug' MapDust service method. 393 * 359 * 394 360 * @param bug A <code>MapdustBug</code> object 395 361 * @return A <code>HttpResponse</code> containing the JSON response of the 396 362 * MapDust method. 397 * 363 * 398 364 * @throws MalformedURLException In the case if the format of the URL is 399 365 * invalid … … 421 387 if (urlString != null) { 422 388 url = new URL(urlString); 423 httpResponse = getHttpConnector().executePOST(url, null,424 requestParameters); 389 httpResponse = 390 httpConnector.executePOST(url, null, requestParameters); 425 391 } 426 392 return httpResponse; 427 393 } 428 394 429 395 /** 430 396 * Executes the 'commentBug' MapDust service method. 431 * 397 * 432 398 * @param comment The <code>MapdustComment</code> object 433 399 * @return A <code>HttpResponse</code> containing the JSON response of the … … 455 421 if (urlString != null) { 456 422 url = new URL(urlString); 457 httpResponse = getHttpConnector().executePOST(url, null,458 requestParameters); 423 httpResponse = 424 httpConnector.executePOST(url, null, requestParameters); 459 425 } 460 426 return httpResponse; 461 427 } 462 428 463 429 /** 464 430 * Executes the 'changeBugStatus' MapDust service method. 465 * 431 * 466 432 * @param statusId The id of the status. 467 433 * @param comment A <code>MapdustComment</code> object. 468 434 * @return A <code>HttpResponse</code> containing the JSON response of the 469 435 * MapDust method. 470 * 436 * 471 437 * @throws MalformedURLException In the case if the format of the URL is 472 438 * invalid … … 492 458 if (urlString != null) { 493 459 url = new URL(urlString); 494 httpResponse = getHttpConnector().executePOST(url, null,495 requestParameters); 460 httpResponse = 461 httpConnector.executePOST(url, null, requestParameters); 496 462 } 497 463 return httpResponse; 498 464 } 499 465 500 466 /** 501 467 * Builds a string containing the elements of the given list. The elements 502 468 * will be separated by a comma. If the list does not contains any element 503 469 * the returned result will be an empty string. 504 * 470 * 505 471 * @param list The list of objects. 506 472 * @return a string … … 515 481 return sb.substring(0, sb.length() - 1); 516 482 } 517 483 518 484 /** 519 485 * Handles the response codes of the given <code>HttpResponse</code> object. … … 521 487 * exception. Otherwise a <code>MapdustConnectorException</code> will be 522 488 * thrown with an appropriate message. 523 * 489 * 524 490 * @param httpResponse The <code>HttpResponse</code> method. 525 491 * @throws MapdustConnectorException In the case if the status code is not … … 578 544 } 579 545 } 580 581 /** 582 * Returns the <code>HttpConnector</code> 583 * 584 * @return the httpConnector 585 */ 586 public HttpConnector getHttpConnector() { 587 return httpConnector; 588 } 589 590 /** 591 * Sets the <code>MapdustParser</code> 592 * 593 * @return the parser 594 */ 595 public MapdustParser getParser() { 596 return parser; 597 } 598 546 547 548 private <T> T parseResponse(String httpResponse, Class<T> responseType) 549 throws MapdustConnectorException { 550 T result; 551 try { 552 result = gson.fromJson(httpResponse, responseType); 553 } catch (JsonSyntaxException e) { 554 throw new MapdustConnectorException(e.getMessage(), e); 555 } 556 return result; 557 } 599 558 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/GeneralContent.java
r24514 r30500 31 31 /** 32 32 * Defines a general content, containing a given id. 33 * 33 * 34 34 * @author Bea 35 * 35 * 36 36 */ 37 37 public class GeneralContent { 38 38 39 39 /** The id */ 40 40 private Long id; 41 41 42 42 /** 43 43 * Builds a <code>GeneralContent</code> object. 44 44 */ 45 45 public GeneralContent() {} 46 46 47 47 /** 48 48 * Builds a <code>GeneralContent</code> object. 49 * 49 * 50 50 * @param id The id of the object 51 51 */ … … 53 53 this.id = id; 54 54 } 55 56 /** 57 * Returns the id 58 * @return the id 59 */ 55 56 60 57 public Long getId() { 61 58 return id; 62 59 } 63 64 /**65 * Sets the id66 *67 * @param id the id to set68 */69 public void setId(Long id) {70 this.id = id;71 }72 73 60 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/Geometry.java
r24514 r30500 31 31 /** 32 32 * Defines the attributes of the geometry object. 33 * 33 * 34 34 * @author Bea 35 * 35 * 36 36 */ 37 37 public class Geometry { 38 38 39 39 /** The array of coordinates */ 40 40 private Double coordinates[]; 41 41 42 42 /** 43 43 * Builds a <code>Geometry</code> object 44 44 */ 45 45 public Geometry() {} 46 46 47 47 /** 48 48 * Builds a <code>Geometry</code> object 49 * 49 * 50 50 * @param coordinates An array of coordinates. 51 51 */ … … 53 53 this.coordinates = coordinates; 54 54 } 55 56 /** 57 * Returns the coordinates 58 * 59 * @return the coordinates 60 */ 55 56 61 57 public Double[] getCoordinates() { 62 58 return coordinates; 63 59 } 64 65 /** 66 * Returns the coordinates 67 * 68 * @param coordinates the coordinates to set 69 */ 70 public void setCoordinates(Double[] coordinates) { 71 this.coordinates = coordinates; 72 } 73 60 74 61 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustBugContent.java
r24514 r30500 31 31 /** 32 32 * Defines the attributes of the <code>MapdustBugContent</code> object. 33 * 33 * 34 34 * @author Bea 35 * 35 * 36 36 */ 37 37 public class MapdustBugContent extends GeneralContent { 38 38 39 39 /** The <code>Geometry</code> object */ 40 40 private Geometry geometry; 41 41 42 42 /** The <code>MapdustBugProperties</code> object */ 43 43 private MapdustBugProperties properties; 44 44 45 45 /** 46 46 * Builds a <code>MapdustBugContent</code> object. 47 * 47 * 48 48 */ 49 49 public MapdustBugContent() {} 50 50 51 51 /** 52 52 * Builds a <code>MapdustBugContent</code> object based on the given 53 53 * arguments. 54 * 54 * 55 55 * @param geometry A <code>Geometry</code> object 56 56 * @param properties A <code>MapdustBugProperties</code> object … … 60 60 this.properties = properties; 61 61 } 62 63 /** 64 * Returns the geometry 65 * 66 * @return the geometry 67 */ 62 63 68 64 public Geometry getGeometry() { 69 65 return geometry; 70 66 } 71 72 /** 73 * Sets the geometry 74 * 75 * @param geometry the geometry to set 76 */ 77 public void setGeometry(Geometry geometry) { 78 this.geometry = geometry; 79 } 80 81 /** 82 * Returns the MapDust bug properties 83 * 84 * @return the properties 85 */ 67 86 68 public MapdustBugProperties getProperties() { 87 69 return properties; 88 70 } 89 90 /**91 * Sets the MapDust bug properties92 *93 * @param properties the properties to set94 */95 public void setProperties(MapdustBugProperties properties) {96 this.properties = properties;97 }98 99 71 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustBugProperties.java
r25828 r30500 35 35 /** 36 36 * Defines the attributes of the <code>MapdustBugProperties</code> object. 37 * 37 * 38 38 * @author Bea 39 * 39 * 40 40 */ 41 41 public class MapdustBugProperties { 42 42 43 43 /** The creation date */ 44 44 private Date dateCreated; 45 45 46 46 /** The update date */ 47 47 private Date dateUpdated; 48 48 49 49 /** The status of the bug */ 50 50 private Integer status; 51 51 52 52 /** The type of the bug */ 53 53 private String type; 54 54 55 55 /** The relevance value */ 56 56 private Integer relevance; 57 57 58 58 /** The description of the bug */ 59 59 private String description; 60 60 61 61 /** Flag indicating if the description is default or not */ 62 private b ooleanisDefaultDescription;63 62 private byte isDefaultDescription; 63 64 64 /** The nickname of the bug */ 65 65 private String nickname; 66 66 67 67 /** The skobbler user id */ 68 68 private String skoUid; 69 69 70 70 /** The external user id */ 71 71 private String extUid; 72 72 73 73 /** The source of the bug */ 74 74 private String source; 75 75 76 76 /** The url of the kml */ 77 77 private String kmlUrl; 78 78 79 79 /** The address of the bug */ 80 80 private Address address; 81 81 82 82 /** The number of comments */ 83 83 private Integer numberOfComments; 84 84 85 85 /** The bug comments */ 86 86 private MapdustCommentProperties[] comments; 87 87 88 88 /** 89 89 * Builds a <code>MapdustBugProperties</code> object. 90 90 */ 91 91 public MapdustBugProperties() {} 92 92 93 93 /** 94 94 * Builds a <code>MapdustBugProperties</code> object. 95 * 95 * 96 96 * @param dateCreated The creation date 97 97 * @param dateUpdated The update date … … 113 113 public MapdustBugProperties(Date dateCreated, Date dateUpdated, 114 114 Integer status, String type, Integer relevance, String description, 115 b ooleanisDefaultDescription, String nickname, String skoUid,115 byte isDefaultDescription, String nickname, String skoUid, 116 116 String extUid, String source, String kmlUrl, Address address, 117 117 Integer numberOfComments, MapdustCommentProperties[] comments) { … … 132 132 this.comments = comments; 133 133 } 134 135 /** 136 * Returns the date created 137 * 138 * @return the dateCreated 139 */ 134 135 140 136 public Date getDateCreated() { 141 137 return dateCreated; 142 138 } 143 144 /** 145 * Sets the date created 146 * 147 * @param dateCreated the dateCreated to set 148 */ 149 public void setDateCreated(Date dateCreated) { 150 this.dateCreated = dateCreated; 151 } 152 153 /** 154 * Returns the date updated 155 * 156 * @return the dateUpdated 157 */ 139 158 140 public Date getDateUpdated() { 159 141 return dateUpdated; 160 142 } 161 162 /** 163 * Sets the date updated 164 * 165 * @param dateUpdated the dateUpdated to set 166 */ 167 public void setDateUpdated(Date dateUpdated) { 168 this.dateUpdated = dateUpdated; 169 } 170 171 /** 172 * Returns the status id 173 * 174 * @return the status 175 */ 143 176 144 public Integer getStatus() { 177 145 return status; 178 146 } 179 180 /** 181 * Sets the status id 182 * 183 * @param status the status to set 184 */ 185 public void setStatus(Integer status) { 186 this.status = status; 187 } 188 189 /** 190 * Returns the type 191 * 192 * @return the type 193 */ 147 194 148 public String getType() { 195 149 return type; 196 150 } 197 198 /** 199 * Sets the type 200 * 201 * @param type the type to set 202 */ 203 public void setType(String type) { 204 this.type = type; 205 } 206 207 /** 208 * Returns the relevance 209 * 210 * @return the relevance 211 */ 151 212 152 public Integer getRelevance() { 213 153 return relevance; 214 154 } 215 216 /** 217 * Sets the relevance 218 * 219 * @param relevance the relevance to set 220 */ 221 public void setRelevance(Integer relevance) { 222 this.relevance = relevance; 223 } 224 225 /** 226 * @param isDefaultDescription the isDefaultDescription to set 227 */ 228 public void setDefaultDescription(boolean isDefaultDescription) { 229 this.isDefaultDescription = isDefaultDescription; 230 } 231 232 /** 233 * Returns the description 234 * 235 * @return the description 236 */ 155 237 156 public String getDescription() { 238 157 return description; 239 158 } 240 241 /** 242 * Sets the description 243 * 244 * @param description the description to set 245 */ 246 public void setDescription(String description) { 247 this.description = description; 248 } 249 250 /** 251 * Returns the isDefaultDescription flag 252 * 253 * @return the isDefaultDescription 254 */ 255 public boolean getIsDefaultDescription() { 159 160 public byte getIsDefaultDescription() { 256 161 return isDefaultDescription; 257 162 } 258 259 /** 260 * Sets the isDefaultDescription flag 261 * 262 * @param isDefaultDescription the isDefaultDescription to set 263 */ 264 public void setIsDefaultDescription(boolean isDefaultDescription) { 265 this.isDefaultDescription = isDefaultDescription; 266 } 267 268 /** 269 * Returns the nickname 270 * 271 * @return the nickname 272 */ 163 273 164 public String getNickname() { 274 165 return nickname; 275 166 } 276 277 /** 278 * Sets the nickname 279 * 280 * @param nickname the nickname to set 281 */ 282 public void setNickname(String nickname) { 283 this.nickname = nickname; 284 } 285 286 /** 287 * Returns the skobbler user id 288 * 289 * @return the skoUid 290 */ 167 291 168 public String getSkoUid() { 292 169 return skoUid; 293 170 } 294 295 /** 296 * Sets the skobbler user id 297 * 298 * @param skoUid the skoUid to set 299 */ 300 public void setSkoUid(String skoUid) { 301 this.skoUid = skoUid; 302 } 303 304 /** 305 * Returns the external user id 306 * 307 * @return the extUid 308 */ 171 309 172 public String getExtUid() { 310 173 return extUid; 311 174 } 312 313 /** 314 * Sets the external user id 315 * 316 * @param extUid the erxtUid to set 317 */ 318 public void setExtUid(String extUid) { 319 this.extUid = extUid; 320 } 321 322 /** 323 * Returns the source 324 * 325 * @return the source 326 */ 175 327 176 public String getSource() { 328 177 return source; 329 178 } 330 331 /** 332 * Sets the source 333 * 334 * @param source the source to set 335 */ 336 public void setSource(String source) { 337 this.source = source; 338 } 339 340 /** 341 * Returns the kml URL 342 * 343 * @return the kmlUrl 344 */ 179 345 180 public String getKmlUrl() { 346 181 return kmlUrl; 347 182 } 348 349 /** 350 * Sets the kml URL 351 * 352 * @param kmlUrl the kmlUrl to set 353 */ 354 public void setKmlUrl(String kmlUrl) { 355 this.kmlUrl = kmlUrl; 356 } 357 358 /** 359 * Returns the address 360 * 361 * @return the address 362 */ 183 363 184 public Address getAddress() { 364 185 return address; 365 186 } 366 367 /** 368 * Sets the address 369 * 370 * @param address the address to set 371 */ 372 public void setAddress(Address address) { 373 this.address = address; 374 } 375 376 /** 377 * Returns the number of the comments 378 * 379 * @return the numberOfComments 380 */ 187 381 188 public Integer getNumberOfComments() { 382 189 return numberOfComments; 383 190 } 384 385 /** 386 * Sets the number of the comments 387 * 388 * @param numberOfComments the numberOfComments to set 389 */ 390 public void setNumberOfComments(Integer numberOfComments) { 391 this.numberOfComments = numberOfComments; 392 } 393 394 /** 395 * Returns the comments 396 * 397 * @return the comments 398 */ 191 399 192 public MapdustCommentProperties[] getComments() { 400 193 return comments; 401 194 } 402 403 /**404 * Sets the comments405 *406 * @param comments the comments to set407 */408 public void setComments(MapdustCommentProperties[] comments) {409 this.comments = comments;410 }411 412 195 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustCommentProperties.java
r25591 r30500 83 83 } 84 84 85 /** 86 * Returns the date created 87 * 88 * @return the dateCreated 89 */ 85 90 86 public Date getDateCreated() { 91 87 return dateCreated; 92 88 } 93 94 /** 95 * Sets the date created 96 * 97 * @param dateCreated the dateCreated to set 98 */ 99 public void setDateCreated(Date dateCreated) { 100 this.dateCreated = dateCreated; 101 } 102 103 /** 104 * Returns the comment text 105 * 106 * @return the comment 107 */ 89 108 90 public String getComment() { 109 91 return comment; 110 92 } 111 93 112 /**113 * Sets the comment text114 *115 * @param comment the comment to set116 */117 public void setComment(String comment) {118 this.comment = comment;119 }120 94 121 /**122 * Returns the nickname123 *124 * @return the nickname125 */126 95 public String getNickname() { 127 96 return nickname; 128 97 } 129 98 130 /**131 * Sets the nickname132 *133 * @param nickname the nickname to set134 */135 public void setNickname(String nickname) {136 this.nickname = nickname;137 }138 139 /**140 * Returns the skobbler user id141 *142 * @return the skoUid143 */144 99 public String getSkoUid() { 145 100 return skoUid; 146 101 } 147 102 148 /**149 * Sets the skobbler user id150 *151 * @param skoUid the skoUid to set152 */153 public void setSkoUid(String skoUid) {154 this.skoUid = skoUid;155 }156 157 /**158 * Returns the external user id159 *160 * @return the extUid161 */162 103 public String getExtUid() { 163 104 return extUid; 164 105 } 165 106 166 /**167 * Sets the external user id168 *169 * @param extUid the extUid to set170 */171 public void setExtUid(String extUid) {172 this.extUid = extUid;173 }174 175 /**176 * Returns the source177 *178 * @return the source179 */180 107 public String getSource() { 181 108 return source; 182 109 } 183 184 /**185 * Sets the source186 *187 * @param source the source to set188 */189 public void setSource(String source) {190 this.source = source;191 }192 193 110 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetBugResponse.java
r24514 r30500 66 66 } 67 67 68 /** 69 * Returns the <code>Geometry</code> object 70 * 71 * @return the geometry 72 */ 68 73 69 public Geometry getGeometry() { 74 70 return geometry; 75 71 } 76 77 /** 78 * Sets the <code>Geometry</code> object 79 * 80 * @param geometry the geometry to set 81 */ 82 public void setGeometry(Geometry geometry) { 83 this.geometry = geometry; 84 } 85 86 /** 87 * Returns the id 88 * 89 * @return the id 90 */ 72 91 73 public Long getId() { 92 74 return id; 93 75 } 94 76 95 /**96 * Sets the id97 *98 * @param id the id to set99 */100 public void setId(Long id) {101 this.id = id;102 }103 104 /**105 * Returns the <code>MapdustBugProperties</code> properties106 *107 * @return the properties108 */109 77 public MapdustBugProperties getProperties() { 110 78 return properties; 111 79 } 112 113 /**114 * Sets the <code>MapdustBugProperties</code> object115 *116 * @param properties the properties to set117 */118 public void setProperties(MapdustBugProperties properties) {119 this.properties = properties;120 }121 122 80 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetBugsResponse.java
r25591 r30500 55 55 } 56 56 57 /** 58 * Returns the array of <code>MapdustBugContent</code> objects 59 * 60 * @return the features 61 */ 57 62 58 public MapdustBugContent[] getFeatures() { 63 59 return features; 64 60 } 65 61 66 /**67 * Sets the array of <code>MapdustBugContent</code> objects68 *69 * @param features the features to set70 */71 public void setFeatures(MapdustBugContent[] features) {72 this.features = features;73 }74 75 62 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustGetResponse.java
r25591 r30500 59 59 } 60 60 61 /** 62 * Returns the <code>Paging</code> object 63 * 64 * @return the paging 65 */ 61 66 62 public Paging getPaging() { 67 63 return paging; 68 64 } 69 65 70 /**71 * Sets the <code>Paging</code> object72 *73 * @param paging the paging to set74 */75 public void setPaging(Paging paging) {76 this.paging = paging;77 }78 79 66 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/service/connector/response/MapdustPostResponse.java
r25591 r30500 56 56 } 57 57 58 /** 59 * Returns the id 60 * 61 * @return the id 62 */ 58 63 59 public Long getId() { 64 60 return id; 65 61 } 66 67 /**68 * Sets the id69 *70 * @param id the id to set71 */72 public void setId(Long id) {73 this.id = id;74 }75 76 62 }
Note:
See TracChangeset
for help on using the changeset viewer.