source: josm/trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesUrlBoundsTask.java@ 12464

Last change on this file since 12464 was 12284, checked in by Don-vip, 7 years ago

see #14794 - javadoc

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.actions.downloadtasks;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.util.concurrent.Future;
7
8import org.openstreetmap.josm.gui.progress.ProgressMonitor;
9import org.openstreetmap.josm.tools.OsmUrlToBounds;
10
11/**
12 * Specialized task for downloading OSM notes within bounds.
13 * <p>
14 * It handles one URL pattern: openstreetmap website URL with {@code #map?} argument.
15 * @since 8195
16 */
17public class DownloadNotesUrlBoundsTask extends DownloadNotesTask {
18
19 @Override
20 public Future<?> loadUrl(boolean newLayer, String url, ProgressMonitor progressMonitor) {
21 return download(newLayer, OsmUrlToBounds.parse(url), null);
22 }
23
24 @Override
25 public String[] getPatterns() {
26 return new String[]{
27 "https?://www\\.(osm|openstreetmap)\\.org/(.*)?#map=\\p{Digit}+/.*/.*&layers=[A-MO-Z]*N[A-MO-Z]*"};
28 }
29
30 @Override
31 public String getTitle() {
32 return tr("Download OSM Notes within Bounds");
33 }
34}
Note: See TracBrowser for help on using the repository browser.