Changeset 2711 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2009-12-30T20:18:59+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/CacheFiles.java
r2606 r2711 57 57 this(ident, true); 58 58 } 59 59 60 60 public CacheFiles(String ident, boolean isPlugin) { 61 61 String pref = isPlugin ? Main.pref.getPluginsDirFile().getPath() : Main.pref.getPreferencesDir(); 62 62 63 63 boolean dir_writeable; 64 64 this.ident = ident; -
trunk/src/org/openstreetmap/josm/io/Capabilities.java
r2599 r2711 77 77 * don't include this parameter or if the parameter value is illegal (not a number, 78 78 * a negative number) 79 * 79 * 80 80 * @return the max number of objects in a changeset 81 81 */ -
trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java
r2599 r2711 51 51 /** 52 52 * Replies true if <code>errorHeader</code> matches with {@see #ERROR_HEADER_PATTERN} 53 * 53 * 54 54 * @param errorHeader the error header 55 55 * @return true if <code>errorHeader</code> matches with {@see #ERROR_HEADER_PATTERN} … … 91 91 /** 92 92 * Creates the exception with the given <code>errorHeader</code> 93 * 93 * 94 94 * @param errorHeader the error header 95 95 */ … … 103 103 * Creates the exception with the given error header and the given 104 104 * source. 105 * 105 * 106 106 * @param errorHeader the error header 107 107 * @param source the source for the exception … … 115 115 /** 116 116 * Creates the exception 117 * 117 * 118 118 * @param changesetId the id if the closed changeset 119 119 * @param closedOn the date the changeset was closed on … … 129 129 /** 130 130 * Replies the id of the changeset which was closed 131 * 131 * 132 132 * @return the id of the changeset which was closed 133 133 */ … … 138 138 /** 139 139 * Replies the date the changeset was closed 140 * 140 * 141 141 * @return the date the changeset was closed. May be null if the date isn't known. 142 142 */ … … 147 147 /** 148 148 * Replies the source where the exception was thrown 149 * 149 * 150 150 * @return the source 151 151 */ -
trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
r2688 r2711 20 20 * Replies a changeset query object from the query part of a OSM API URL for querying 21 21 * changesets. 22 * 22 * 23 23 * @param query the query part 24 24 * @return the query object 25 25 * @throws ChangesetQueryUrlException thrown if query doesn't consist of valid query parameters 26 * 26 * 27 27 */ 28 28 static public ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException{ … … 48 48 /** 49 49 * Restricts the query to changesets owned by the user with id <code>uid</code>. 50 * 50 * 51 51 * @param uid the uid of the user. >0 expected. 52 52 * @return the query object with the applied restriction … … 64 64 /** 65 65 * Restricts the query to changesets owned by the user with user name <code>username</code>. 66 * 66 * 67 67 * Caveat: for historical reasons the username might not be unique! It is recommended to use 68 68 * {@see #forUser(int)} to restrict the query to a specific user. 69 * 69 * 70 70 * @param username the username. Must not be null. 71 71 * @return the query object with the applied restriction … … 83 83 * Replies true if this query is restricted to user whom we only know the user name 84 84 * for. 85 * 85 * 86 86 * @return true if this query is restricted to user whom we only know the user name 87 87 * for … … 94 94 * Replies the user name which this query is restricted to. null, if this query isn't 95 95 * restricted to a user name, i.e. if {@see #isRestrictedToPartiallyIdentifiedUser()} is false. 96 * 96 * 97 97 * @return the user name which this query is restricted to 98 98 */ … … 103 103 /** 104 104 * Replies true if this query is restricted to user whom know the user id for. 105 * 105 * 106 106 * @return true if this query is restricted to user whom know the user id for 107 107 */ … … 112 112 /** 113 113 * Replies a query which is restricted to a bounding box. 114 * 114 * 115 115 * @param minLon min longitude of the bounding box. Valid longitude value expected. 116 116 * @param minLat min latitude of the bounding box. Valid latitude value expected. 117 117 * @param maxLon max longitude of the bounding box. Valid longitude value expected. 118 118 * @param maxLat max latitude of the bounding box. Valid latitude value expected. 119 * 119 * 120 120 * @return the restricted changeset query 121 121 * @throws IllegalArgumentException thrown if either of the parameters isn't a valid longitude or … … 137 137 /** 138 138 * Replies a query which is restricted to a bounding box. 139 * 139 * 140 140 * @param min the min lat/lon coordinates of the bounding box. Must not be null. 141 141 * @param max the max lat/lon coordiantes of the bounding box. Must not be null. 142 * 142 * 143 143 * @return the restricted changeset query 144 144 * @throws IllegalArgumentException thrown if min is null … … 154 154 /** 155 155 * Replies a query which is restricted to a bounding box given by <code>bbox</code>. 156 * 156 * 157 157 * @param bbox the bounding box. Must not be null. 158 158 * @return the changeset query … … 168 168 * Restricts the result to changesets which have been closed after the date given by <code>d</code>. 169 169 * <code>d</code> d is a date relative to the current time zone. 170 * 170 * 171 171 * @param d the date . Must not be null. 172 172 * @return the restricted changeset query … … 183 183 * habe been created before <code>createdBefore</code>. Both dates are expressed relative to the current 184 184 * time zone. 185 * 185 * 186 186 * @param closedAfter only reply changesets closed after this date. Must not be null. 187 187 * @param createdBefore only reply changesets created before this date. Must not be null. … … 201 201 * Restricts the result to changesets which are or aren't open, depending on the value of 202 202 * <code>isOpen</code> 203 * 203 * 204 204 * @param isOpen whether changesets should or should not be open 205 205 * @return the restricted changeset query … … 213 213 * Restricts the result to changesets which are or aren't closed, depending on the value of 214 214 * <code>isClosed</code> 215 * 215 * 216 216 * @param isClosed whether changesets should or should not be open 217 217 * @return the restricted changeset query … … 224 224 /** 225 225 * Replies the query string to be used in a query URL for the OSM API. 226 * 226 * 227 227 * @return the query string 228 228 */ … … 268 268 return sb.toString(); 269 269 } 270 271 270 272 271 public static class ChangesetQueryUrlException extends Exception { … … 408 407 * Parses the changeset query given as URL query parameters and replies a 409 408 * {@see ChangesetQuery} 410 * 409 * 411 410 * <code>query</code> is the query part of a API url for querying changesets, 412 411 * see <a href="http://wiki.openstreetmap.org/wiki/API_v0.6#Query:_GET_.2Fapi.2F0.6.2Fchangesets">OSM API</a>. 413 * 412 * 414 413 * Example for an query string:<br> 415 414 * <pre> 416 415 * uid=1234&open=true 417 416 * </pre> 418 * 417 * 419 418 * @param query the query string. If null, an empty query (identical to a query for all changesets) is 420 419 * assumed -
trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java
r2604 r2711 53 53 /** 54 54 * Creates a diff result reader 55 * 55 * 56 56 * @param primitives the collection of primitives which have been uploaded. If null, 57 57 * assumes an empty collection. … … 67 67 /** 68 68 * Parse the response from a diff upload to the OSM API. 69 * 69 * 70 70 * @param diffUploadResponse the response. Must not be null. 71 71 * @param progressMonitor a progress monitor. Defaults to {@see NullProgressMonitor#INSTANCE} if null 72 72 * @throws IllegalArgumentException thrown if diffUploadRequest is null 73 73 * @throws OsmDataParsingException thrown if the diffUploadRequest can't be parsed successfully 74 * 74 * 75 75 */ 76 76 public void parse(String diffUploadResponse, ProgressMonitor progressMonitor) throws OsmDataParsingException { … … 99 99 /** 100 100 * Postprocesses the diff result read and parsed from the server. 101 * 101 * 102 102 * Uploaded objects are assigned their new id (if they got assigned a new 103 103 * id by the server), their new version (if the version was incremented), 104 104 * and the id of the changeset to which they were uploaded. 105 * 105 * 106 106 * @param cs the current changeset. Ignored if null. 107 107 * @param monitor the progress monitor. Set to {@see NullProgressMonitor#INSTANCE} if null -
trunk/src/org/openstreetmap/josm/io/FileImporter.java
r2703 r2711 31 31 return false; 32 32 } 33 33 34 34 /** 35 35 * Needs to be implemented if isBatchImporter() returns false. … … 79 79 80 80 /** 81 * If multiple files (with multiple file formats) are selected, 81 * If multiple files (with multiple file formats) are selected, 82 82 * they are opened in the order of their priorities. 83 83 * Highest priority comes first. -
trunk/src/org/openstreetmap/josm/io/OsmChangeBuilder.java
r2604 r2711 68 68 /** 69 69 * Writes the prolog of the OsmChange document 70 * 70 * 71 71 * @throws IllegalStateException thrown if the prologs has already been written 72 72 */ … … 82 82 /** 83 83 * Appends a collection of {@see OsmPrimitive}s to the OsmChange document. 84 * 84 * 85 85 * @param primitives the collection of primitives. Ignored if null. 86 86 * @throws IllegalStateException thrown if the prologs has not been written yet … … 99 99 /** 100 100 * Appends an {@see OsmPrimitive} to the OsmChange document. 101 * 101 * 102 102 * @param p the primitive. Ignored if null. 103 103 * @throws IllegalStateException thrown if the prologs has not been written yet … … 115 115 /** 116 116 * Writes the epilog of the OsmChange document 117 * 117 * 118 118 * @throws IllegalStateException thrown if the prologs has not been written yet 119 119 */ -
trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java
r2688 r2711 274 274 /** 275 275 * Create a parser 276 * 276 * 277 277 * @param source the input stream with the changeset content as XML document. Must not be null. 278 278 * @throws IllegalArgumentException thrown if source is null. … … 292 292 /** 293 293 * Parses the content 294 * 294 * 295 295 * @param progressMonitor the progress monitor. Set to {@see NullProgressMonitor#INSTANCE} 296 296 * if null … … 323 323 /** 324 324 * Parses the content from the input source 325 * 325 * 326 326 * @return the parsed data 327 327 * @throws OsmDataParsingException thrown if something went wrong. Check for chained -
trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java
r2563 r2711 17 17 /** 18 18 * OsmServerObjectReader reads an individual object from the OSM server. 19 * 19 * 20 20 * It can either download the object including or not including its immediate children. 21 21 * The former case is called a "full download". 22 * 22 * 23 23 */ 24 24 public class OsmServerObjectReader extends OsmServerReader { … … 30 30 /** 31 31 * Creates a new server object reader for a given id and a primitive type. 32 * 32 * 33 33 * @param id the object id. > 0 required. 34 34 * @param type the type. Must not be null. … … 49 49 /** 50 50 * Creates a new server object reader for an object with the given <code>id</code> 51 * 51 * 52 52 * @param id the object id. Must not be null. Unique id > 0 required. 53 53 * @param full true, if a full download is requested (i.e. a download including … … 67 67 /** 68 68 * Downloads and parses the data. 69 * 69 * 70 70 * @param progressMonitor the progress monitor. Set to {@see NullProgressMonitor#INSTANCE} if 71 71 * null -
trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
r2599 r2711 46 46 47 47 long uploadStartTime; 48 49 48 50 49 public String timeLeft(int progress, int list_size) { -
trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
r2641 r2711 18 18 /** 19 19 * Looks up the credentials for a given type. 20 * 20 * 21 21 * @param the type of service. {@see RequestorType#SERVER} for the OSM API server, {@see RequestorType#PROXY} 22 22 * for a proxy server … … 28 28 /** 29 29 * Saves the credentials in <code>credentials</code> for the given service type. 30 * 30 * 31 31 * @param the type of service. {@see RequestorType#SERVER} for the OSM API server, {@see RequestorType#PROXY} 32 32 * for a proxy server … … 37 37 38 38 /** 39 * 39 * 40 40 * @param requestorType the type of service. {@see RequestorType#SERVER} for the OSM API server, {@see RequestorType#PROXY} 41 41 * for a proxy server
Note:
See TracChangeset
for help on using the changeset viewer.