Class OSMDownloadSource
java.lang.Object
org.openstreetmap.josm.gui.download.OSMDownloadSource
- All Implemented Interfaces:
DownloadSource<List<IDownloadSourceType>>
Class defines the way data is fetched from the OSM server.
- Since:
- 12652
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static final classprivate static final classstatic classThe GUI representation of the OSM download source. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final List<IDownloadSourceType>The possible methods to get datastatic final StringThe simple name for theOSMDownloadSource.OSMDownloadSourcePanel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanAdd a download type to the default JOSM download windowcreatePanel(DownloadDialog dialog) Creates a panel with GUI specific for the download source.voiddoDownload(List<IDownloadSourceType> data, DownloadSettings settings) Downloads the data.static <T extends IDownloadSourceType>
TgetDownloadType(Class<T> typeClazz) Get the instance of a data download typestatic List<IDownloadSourceType>Returns the possible downloads that JOSM can make in the default Download screen.getLabel()Returns a string representation of this download source.booleanDefines whether this download source should be visible only in the expert mode.static booleanRemoves a download source type.
-
Field Details
-
SIMPLE_NAME
The simple name for theOSMDownloadSource.OSMDownloadSourcePanel- Since:
- 12706
- See Also:
-
DOWNLOAD_SOURCES
The possible methods to get data
-
-
Constructor Details
-
OSMDownloadSource
public OSMDownloadSource()
-
-
Method Details
-
createPanel
Description copied from interface:DownloadSourceCreates a panel with GUI specific for the download source.- Specified by:
createPanelin interfaceDownloadSource<List<IDownloadSourceType>>- Parameters:
dialog- the parent download dialog, asDownloadDialog.getInstance()might not be initialized yet- Returns:
- Returns
AbstractDownloadSourcePanel.
-
doDownload
Description copied from interface:DownloadSourceDownloads the data.- Specified by:
doDownloadin interfaceDownloadSource<List<IDownloadSourceType>>- Parameters:
data- The required data for the download source.settings- The global settings of the download dialog, seeDownloadDialog.
-
getLabel
Description copied from interface:DownloadSourceReturns a string representation of this download source.- Specified by:
getLabelin interfaceDownloadSource<List<IDownloadSourceType>>- Returns:
- A string representation of this download source.
-
onlyExpert
Description copied from interface:DownloadSourceDefines whether this download source should be visible only in the expert mode.- Specified by:
onlyExpertin interfaceDownloadSource<List<IDownloadSourceType>>- Returns:
- Returns
trueif the download source should be visible only in the expert mode,falseotherwise.
-
getDownloadTypes
Returns the possible downloads that JOSM can make in the default Download screen.- Returns:
- The possible downloads that JOSM can make in the default Download screen
- Since:
- 16503
-
getDownloadType
Get the instance of a data download type- Type Parameters:
T- The type to get- Parameters:
typeClazz- The class of the type- Returns:
- The type instance
- Since:
- 16503
-
removeDownloadType
Removes a download source type.- Parameters:
type- The IDownloadSourceType object to remove- Returns:
trueif this download types contained the specified object- Since:
- 16503
-
addDownloadType
Add a download type to the default JOSM download window- Parameters:
type- The initialized type to download- Returns:
true(as specified byCollection.add(E)), but it also returns false if the class already has an instance in the list- Since:
- 16503
-