Changeset 6031 in josm for trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
- Timestamp:
- 2013-06-26T21:04:53+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r5782 r6031 49 49 50 50 protected String newLayerName = null; 51 52 @Override 53 public String[] getPatterns() { 54 if (this.getClass() == DownloadOsmTask.class) { 55 return new String[]{PATTERN_OSM_API_URL, PATTERN_OVERPASS_API_URL, 56 PATTERN_OVERPASS_API_XAPI_URL, PATTERN_EXTERNAL_OSM_FILE}; 57 } else { 58 return super.getPatterns(); 59 } 60 } 61 62 @Override 63 public String getTitle() { 64 if (this.getClass() == DownloadOsmTask.class) { 65 return tr("Download OSM"); 66 } else { 67 return super.getTitle(); 68 } 69 } 51 70 52 71 protected void rememberDownloadedData(DataSet ds) { … … 136 155 * @param url The URL as String 137 156 */ 157 @Override 138 158 public Future<?> loadUrl(boolean new_layer, String url, ProgressMonitor progressMonitor) { 139 159 if (url.matches(PATTERN_OVERPASS_API_URL)) { … … 156 176 newLayerName = matcher.matches() ? matcher.group(1) : null; 157 177 } 158 159 /* (non-Javadoc) 160 * @see org.openstreetmap.josm.actions.downloadtasks.DownloadTask#acceptsUrl(java.lang.String) 161 */ 162 @Override 163 public boolean acceptsUrl(String url) { 164 return url != null && ( 165 url.matches(PATTERN_OSM_API_URL) // OSM API 0.6 and XAPI 166 || url.matches(PATTERN_OVERPASS_API_URL) // Overpass API 167 || url.matches(PATTERN_OVERPASS_API_XAPI_URL) // Overpass API XAPI compatibility layer 168 || url.matches(PATTERN_EXTERNAL_OSM_FILE) // Remote .osm files 169 ); 170 } 171 178 179 @Override 172 180 public void cancel() { 173 181 if (downloadTask != null) {
Note:
See TracChangeset
for help on using the changeset viewer.