Class OverpassDownloadSource
- java.lang.Object
-
- org.openstreetmap.josm.gui.download.OverpassDownloadSource
-
- All Implemented Interfaces:
DownloadSource<OverpassDownloadSource.OverpassDownloadData>
public class OverpassDownloadSource extends java.lang.Object implements DownloadSource<OverpassDownloadSource.OverpassDownloadData>
Class defines the way data is fetched from Overpass API.- Since:
- 12652
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
OverpassDownloadSource.OverpassDownloadData
Encapsulates data that is required to preform download from Overpass API.static class
OverpassDownloadSource.OverpassDownloadSourcePanel
The GUI representation of the Overpass download source.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FULL_DOWNLOAD_QUERY
Overpass query to retrieve all nodes and related parent objects,
-
Constructor Summary
Constructors Constructor Description OverpassDownloadSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractDownloadSourcePanel<OverpassDownloadSource.OverpassDownloadData>
createPanel(DownloadDialog dialog)
Creates a panel with GUI specific for the download source.void
doDownload(OverpassDownloadSource.OverpassDownloadData data, DownloadSettings settings)
Downloads the data.java.lang.String
getLabel()
Returns a string representation of this download source.boolean
onlyExpert()
Defines whether this download source should be visible only in the expert mode.
-
-
-
Field Detail
-
FULL_DOWNLOAD_QUERY
public static final java.lang.String FULL_DOWNLOAD_QUERY
Overpass query to retrieve all nodes and related parent objects,- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OverpassDownloadSource
public OverpassDownloadSource()
-
-
Method Detail
-
createPanel
public AbstractDownloadSourcePanel<OverpassDownloadSource.OverpassDownloadData> createPanel(DownloadDialog dialog)
Description copied from interface:DownloadSource
Creates a panel with GUI specific for the download source.- Specified by:
createPanel
in interfaceDownloadSource<OverpassDownloadSource.OverpassDownloadData>
- Parameters:
dialog
- the parent download dialog, asDownloadDialog.getInstance()
might not be initialized yet- Returns:
- Returns
AbstractDownloadSourcePanel
.
-
doDownload
public void doDownload(OverpassDownloadSource.OverpassDownloadData data, DownloadSettings settings)
Description copied from interface:DownloadSource
Downloads the data.- Specified by:
doDownload
in interfaceDownloadSource<OverpassDownloadSource.OverpassDownloadData>
- Parameters:
data
- The required data for the download source.settings
- The global settings of the download dialog, seeDownloadDialog
.
-
getLabel
public java.lang.String getLabel()
Description copied from interface:DownloadSource
Returns a string representation of this download source.- Specified by:
getLabel
in interfaceDownloadSource<OverpassDownloadSource.OverpassDownloadData>
- Returns:
- A string representation of this download source.
-
onlyExpert
public boolean onlyExpert()
Description copied from interface:DownloadSource
Defines whether this download source should be visible only in the expert mode.- Specified by:
onlyExpert
in interfaceDownloadSource<OverpassDownloadSource.OverpassDownloadData>
- Returns:
- Returns
true
if the download source should be visible only in the expert mode,false
otherwise.
-
-