Changeset 17333 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2020-11-23T16:28:11+01:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
r16643 r17333 236 236 * 237 237 * @param min the min lat/lon coordinates of the bounding box. Must not be null. 238 * @param max the max lat/lon coordi antes of the bounding box. Must not be null.238 * @param max the max lat/lon coordinates of the bounding box. Must not be null. 239 239 * 240 240 * @return the restricted changeset query … … 278 278 /** 279 279 * Restricts the result to changesets which have been closed after <code>closedAfter</code> and which 280 * ha be been created before <code>createdBefore</code>. Both dates are expressed relative to the current280 * have been created before <code>createdBefore</code>. Both dates are expressed relative to the current 281 281 * time zone. 282 282 * -
trunk/src/org/openstreetmap/josm/io/ImportCancelException.java
r7937 r17333 3 3 4 4 /** 5 * All exceptions resulting from a user cancel ation during any import should implement this interface.5 * All exceptions resulting from a user cancellation during any import should implement this interface. 6 6 * @since 6621 7 7 */ -
trunk/src/org/openstreetmap/josm/io/MessageNotifier.java
r16427 r17333 90 90 } 91 91 } catch (OsmApiException e) { 92 // We want to explicit ely display message to user in some cases like when he has been blocked (#17722)92 // We want to explicitly display message to user in some cases like when he has been blocked (#17722) 93 93 ExceptionDialogUtil.explainOsmTransferException(e); 94 94 } catch (OsmTransferException e) { -
trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
r17290 r17333 409 409 410 410 /** 411 * Workaround for difference in O erpass API.411 * Workaround for difference in Overpass API. 412 412 * As of now (version 7.55) Overpass api doesn't return invisible objects. 413 413 * Check if we have objects which do not appear in the dataset and fetch them from OSM instead. -
trunk/src/org/openstreetmap/josm/io/NoteWriter.java
r13903 r17333 51 51 out.print(" <note "); 52 52 out.print("id=\"" + note.getId() + "\" "); 53 out.print("lat=\"" + LatLon.cDdHighP ecisionFormatter.format(ll.lat()) + "\" ");54 out.print("lon=\"" + LatLon.cDdHighP ecisionFormatter.format(ll.lon()) + "\" ");53 out.print("lat=\"" + LatLon.cDdHighPrecisionFormatter.format(ll.lat()) + "\" "); 54 out.print("lon=\"" + LatLon.cDdHighPrecisionFormatter.format(ll.lon()) + "\" "); 55 55 out.print("created_at=\"" + DateUtils.fromDate(note.getCreatedAt()) + "\" "); 56 56 if (note.getClosedAt() != null) { -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r16630 r17333 72 72 73 73 /** 74 * Defines whether all OSM API requests should be signed with an OAuth token (user-based bandwi th limit instead of IP-based one)74 * Defines whether all OSM API requests should be signed with an OAuth token (user-based bandwidth limit instead of IP-based one) 75 75 */ 76 76 public static final BooleanProperty USE_OAUTH_FOR_ALL_REQUESTS = new BooleanProperty("oauth.use-for-all-requests", true); -
trunk/src/org/openstreetmap/josm/io/OsmWriter.java
r16953 r17333 239 239 void writeLatLon(LatLon ll) { 240 240 if (ll != null) { 241 out.print(" lat='"+LatLon.cDdHighP ecisionFormatter.format(ll.lat())+242 "' lon='"+LatLon.cDdHighP ecisionFormatter.format(ll.lon())+'\'');241 out.print(" lat='"+LatLon.cDdHighPrecisionFormatter.format(ll.lat())+ 242 "' lon='"+LatLon.cDdHighPrecisionFormatter.format(ll.lon())+'\''); 243 243 } 244 244 } -
trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java
r16643 r17333 94 94 * @since 11916 95 95 */ 96 public enum OverpassOutp outFormat {96 public enum OverpassOutputFormat { 97 97 /** Default output format: plain OSM XML */ 98 98 OSM_XML("xml"), … … 110 110 private final String directive; 111 111 112 OverpassOutp outFormat(String directive) {112 OverpassOutputFormat(String directive) { 113 113 this.directive = directive; 114 114 } … … 123 123 124 124 /** 125 * Returns the {@code OverpassOutp outFormat} matching the given directive.125 * Returns the {@code OverpassOutputFormat} matching the given directive. 126 126 * @param directive directive used in {@code [out:<directive>]} statement 127 * @return {@code OverpassOutp outFormat} matching the given directive127 * @return {@code OverpassOutputFormat} matching the given directive 128 128 * @throws IllegalArgumentException in case of invalid directive 129 129 */ 130 static OverpassOutp outFormat from(String directive) {131 for (OverpassOutp outFormat oof : values()) {130 static OverpassOutputFormat from(String directive) { 131 for (OverpassOutputFormat oof : values()) { 132 132 if (oof.directive.equals(directive)) { 133 133 return oof; … … 140 140 static final Pattern OUTPUT_FORMAT_STATEMENT = Pattern.compile(".*\\[out:([a-z]{3,})\\].*", Pattern.DOTALL); 141 141 142 static final Map<OverpassOutp outFormat, Class<? extends AbstractReader>> outputFormatReaders = new ConcurrentHashMap<>();142 static final Map<OverpassOutputFormat, Class<? extends AbstractReader>> outputFormatReaders = new ConcurrentHashMap<>(); 143 143 144 144 final String overpassServer; … … 165 165 * @return the previous value associated with {@code format}, or {@code null} if there was no mapping 166 166 */ 167 public static final Class<? extends AbstractReader> registerOverpassOutp outFormatReader(168 OverpassOutp outFormat format, Class<? extends AbstractReader> readerClass) {167 public static final Class<? extends AbstractReader> registerOverpassOutputFormatReader( 168 OverpassOutputFormat format, Class<? extends AbstractReader> readerClass) { 169 169 return outputFormatReaders.put(Objects.requireNonNull(format), Objects.requireNonNull(readerClass)); 170 170 } 171 171 172 172 static { 173 registerOverpassOutp outFormatReader(OverpassOutpoutFormat.OSM_XML, OverpassOsmReader.class);174 registerOverpassOutp outFormatReader(OverpassOutpoutFormat.OSM_JSON, OverpassOsmJsonReader.class);173 registerOverpassOutputFormatReader(OverpassOutputFormat.OSM_XML, OverpassOsmReader.class); 174 registerOverpassOutputFormatReader(OverpassOutputFormat.OSM_JSON, OverpassOsmJsonReader.class); 175 175 } 176 176 … … 369 369 Matcher m = OUTPUT_FORMAT_STATEMENT.matcher(overpassQuery); 370 370 if (m.matches()) { 371 Class<? extends AbstractReader> readerClass = outputFormatReaders.get(OverpassOutp outFormat.from(m.group(1)));371 Class<? extends AbstractReader> readerClass = outputFormatReaders.get(OverpassOutputFormat.from(m.group(1))); 372 372 if (readerClass != null) { 373 373 try { -
trunk/src/org/openstreetmap/josm/io/audio/AudioPlayer.java
r16624 r17333 171 171 * @param url The resource to play, which must be a WAV file or stream 172 172 * @param seconds The number of seconds into the audio to start playing 173 * @param speed Rate at which audio play es (1.0 = real time, > 1 is faster)173 * @param speed Rate at which audio plays (1.0 = real time, > 1 is faster) 174 174 * @throws InterruptedException thread interrupted 175 175 * @throws IOException audio fault exception, e.g. can't open stream, unhandleable audio format … … 184 184 * Pauses the currently playing audio stream. Does nothing if nothing playing. 185 185 * @throws InterruptedException thread interrupted 186 * @throws IOException audio fault exception, e.g. can't open stream, 186 * @throws IOException audio fault exception, e.g. can't open stream, unhandleable audio format 187 187 */ 188 188 public static void pause() throws InterruptedException, IOException { -
trunk/src/org/openstreetmap/josm/io/audio/JavaSoundPlayer.java
r16913 r17333 89 89 bytesToSkip -= skippedBytes; 90 90 if (skippedBytes == 0) { 91 // Avoid in ifinite loop91 // Avoid infinite loop 92 92 Logging.warn("Unable to skip bytes from audio input stream"); 93 93 bytesToSkip = 0; -
trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgentResponse.java
r11879 r17333 60 60 61 61 /** 62 * Sets the cancel ation status (authentication request canceled by user)63 * @param canceled the cancel ation status (authentication request canceled by user)62 * Sets the cancellation status (authentication request canceled by user) 63 * @param canceled the cancellation status (authentication request canceled by user) 64 64 */ 65 65 public void setCanceled(boolean canceled) {
Note:
See TracChangeset
for help on using the changeset viewer.