Changeset 10194 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2016-05-11T22:29:43+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java
r9509 r10194 237 237 public final int limit; 238 238 239 /** 240 * Constructs a {@code MoreNotesException}. 241 * @param notes downloaded notes 242 * @param limit download limit sent to the server 243 */ 239 244 public MoreNotesException(List<Note> notes, int limit) { 240 245 this.notes = notes; … … 242 247 } 243 248 } 244 245 249 } -
trunk/src/org/openstreetmap/josm/io/CachedFile.java
r10181 r10194 176 176 } 177 177 178 /** 179 * Returns maximum age of cache file. Only applies to URLs. 180 * When this time has passed after the last download of the file, the 181 * cache is considered stale and a new download will be attempted. 182 * @return the maximum cache age in seconds 183 */ 178 184 public long getMaxAge() { 179 185 return maxAge; -
trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
r10006 r10194 28 28 * Maximum number of changesets returned by the OSM API call "/changesets?" 29 29 */ 30 public static int MAX_CHANGESETS_NUMBER = 100; 31 32 /** 33 * Replies a changeset query object from the query part of a OSM API URL for querying changesets. 34 * 35 * @param query the query part 36 * @return the query object 37 * @throws ChangesetQueryUrlException if query doesn't consist of valid query parameters 38 */ 39 public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException { 40 return new ChangesetQueryUrlParser().parse(query); 41 } 30 public static final int MAX_CHANGESETS_NUMBER = 100; 42 31 43 32 /** the user id this query is restricted to. null, if no restriction to a user id applies */ … … 56 45 /** a collection of changeset ids to query for */ 57 46 private Collection<Long> changesetIds; 47 48 /** 49 * Replies a changeset query object from the query part of a OSM API URL for querying changesets. 50 * 51 * @param query the query part 52 * @return the query object 53 * @throws ChangesetQueryUrlException if query doesn't consist of valid query parameters 54 */ 55 public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException { 56 return new ChangesetQueryUrlParser().parse(query); 57 } 58 58 59 59 /** … … 305 305 } 306 306 307 /** 308 * Exception thrown for invalid changeset queries. 309 */ 307 310 public static class ChangesetQueryUrlException extends Exception { 308 311 … … 339 342 } 340 343 344 /** 345 * Changeset query URL parser. 346 */ 341 347 public static class ChangesetQueryUrlParser { 342 348 protected int parseUid(String value) throws ChangesetQueryUrlException { … … 486 492 * </pre> 487 493 * 488 * @param query the query string. If null, an empty query (identical to a query for all changesets) is 489 * assumed 494 * @param query the query string. If null, an empty query (identical to a query for all changesets) is assumed 490 495 * @return the changeset query 491 496 * @throws ChangesetQueryUrlException if the query string doesn't represent a legal query for changesets … … 494 499 if (query == null) 495 500 return new ChangesetQuery(); 496 query = query.trim();497 if ( query.isEmpty())501 String apiQuery = query.trim(); 502 if (apiQuery.isEmpty()) 498 503 return new ChangesetQuery(); 499 Map<String, String> queryParams = createMapFromQueryString(query); 500 return createFromMap(queryParams); 504 return createFromMap(createMapFromQueryString(apiQuery)); 501 505 } 502 506 }
Note:
See TracChangeset
for help on using the changeset viewer.