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 classOverpassDownloadSource.OverpassDownloadDataEncapsulates data that is required to preform download from Overpass API.static classOverpassDownloadSource.OverpassDownloadSourcePanelThe GUI representation of the Overpass download source.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFULL_DOWNLOAD_QUERYOverpass 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.voiddoDownload(OverpassDownloadSource.OverpassDownloadData data, DownloadSettings settings)Downloads the data.java.lang.StringgetLabel()Returns a string representation of this download source.booleanonlyExpert()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:DownloadSourceCreates a panel with GUI specific for the download source.- Specified by:
createPanelin 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:DownloadSourceDownloads the data.- Specified by:
doDownloadin 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:DownloadSourceReturns a string representation of this download source.- Specified by:
getLabelin interfaceDownloadSource<OverpassDownloadSource.OverpassDownloadData>- Returns:
- A string representation of this download source.
-
onlyExpert
public boolean onlyExpert()
Description copied from interface:DownloadSourceDefines whether this download source should be visible only in the expert mode.- Specified by:
onlyExpertin interfaceDownloadSource<OverpassDownloadSource.OverpassDownloadData>- Returns:
- Returns
trueif the download source should be visible only in the expert mode,falseotherwise.
-
-