Class DownloadOsmIdTask
- java.lang.Object
-
- org.openstreetmap.josm.actions.downloadtasks.AbstractDownloadTask<DataSet>
-
- org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask
-
- org.openstreetmap.josm.actions.downloadtasks.DownloadOsmIdTask
-
- All Implemented Interfaces:
DownloadTask
public class DownloadOsmIdTask extends DownloadOsmTask
Specialized task for downloading OSM objects by ID.It handles one URL pattern: openstreetmap website URL with
/(node|way|relation)/<id>
argument.- Since:
- 8240
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask
DownloadOsmTask.AbstractInternalTask, DownloadOsmTask.DownloadTask
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
URL_ID_PATTERN
-
Fields inherited from class org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask
currentBounds, downloadTask, newLayerName, OVERPASS_INTERPRETER_DATA, warnAboutEmptyArea
-
Fields inherited from class org.openstreetmap.josm.actions.downloadtasks.AbstractDownloadTask
downloadedData, zoomAfterDownload
-
-
Constructor Summary
Constructors Constructor Description DownloadOsmIdTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getPatterns()
Returns regular expressions that match the URLsjava.lang.String
getTitle()
Returns human-readable description of the taskjava.util.concurrent.Future<?>
loadUrl(DownloadParams settings, java.lang.String url, ProgressMonitor progressMonitor)
Loads a given URL from the OSM Server-
Methods inherited from class org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask
cancel, download, download, download, extractOsmFilename, getConfirmationMessage, getDownloadProjectionBounds, getOsmServerReader, isSafeForRemotecontrolRequests, modifyUrlBeforeLoad, rememberDownloadedBounds, searchPotentiallyDeletedPrimitives
-
Methods inherited from class org.openstreetmap.josm.actions.downloadtasks.AbstractDownloadTask
acceptsUrl, acceptsUrl, getDownloadedData, getErrorObjects, isCanceled, isFailed, patterns, rememberDownloadedData, rememberErrorMessage, rememberException, setCanceled, setFailed, setZoomAfterDownload, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.actions.downloadtasks.DownloadTask
acceptsDocumentationSummary, getErrorMessages
-
-
-
-
Field Detail
-
URL_ID_PATTERN
private static final java.lang.String URL_ID_PATTERN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DownloadOsmIdTask
public DownloadOsmIdTask()
-
-
Method Detail
-
getPatterns
public java.lang.String[] getPatterns()
Description copied from interface:DownloadTask
Returns regular expressions that match the URLs- Specified by:
getPatterns
in interfaceDownloadTask
- Overrides:
getPatterns
in classDownloadOsmTask
- Returns:
- The array of accepted URL patterns
-
loadUrl
public java.util.concurrent.Future<?> loadUrl(DownloadParams settings, java.lang.String url, ProgressMonitor progressMonitor)
Description copied from class:DownloadOsmTask
Loads a given URL from the OSM Server- Specified by:
loadUrl
in interfaceDownloadTask
- Overrides:
loadUrl
in classDownloadOsmTask
- Parameters:
settings
- download settingsurl
- The URL as StringprogressMonitor
- the progressMonitor- Returns:
- the future representing the asynchronous task
- See Also:
DownloadTask.download(DownloadParams, Bounds, ProgressMonitor)
-
getTitle
public java.lang.String getTitle()
Description copied from interface:DownloadTask
Returns human-readable description of the task- Specified by:
getTitle
in interfaceDownloadTask
- Overrides:
getTitle
in classDownloadOsmTask
- Returns:
- The task description
-
-