Package org.openstreetmap.josm.gui.io
Class DownloadPrimitivesTask
- java.lang.Object
-
- org.openstreetmap.josm.gui.PleaseWaitRunnable
-
- org.openstreetmap.josm.gui.io.AbstractPrimitiveTask
-
- org.openstreetmap.josm.gui.io.DownloadPrimitivesTask
-
- All Implemented Interfaces:
java.lang.Runnable
,ProgressMonitor.CancelListener
public class DownloadPrimitivesTask extends AbstractPrimitiveTask
Task downloading a set of OSM primitives.- Since:
- 4081
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<PrimitiveId>
ids
-
Fields inherited from class org.openstreetmap.josm.gui.io.AbstractPrimitiveTask
canceled, ds, fullRelation, lastException, layer, multiObjectReader, objectReader
-
Fields inherited from class org.openstreetmap.josm.gui.PleaseWaitRunnable
progressMonitor
-
-
Constructor Summary
Constructors Constructor Description DownloadPrimitivesTask(OsmDataLayer layer, java.util.List<PrimitiveId> ids, boolean fullRelation)
Constructs a newDownloadPrimitivesTask
.DownloadPrimitivesTask(OsmDataLayer layer, java.util.List<PrimitiveId> ids, boolean fullRelation, ProgressMonitor progressMonitor)
Constructs a newDownloadPrimitivesTask
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
initMultiFetchReader(MultiFetchServerObjectReader reader)
-
Methods inherited from class org.openstreetmap.josm.gui.io.AbstractPrimitiveTask
cancel, finish, getMissingPrimitives, loadIncompleteNodes, realRun, setDownloadRelations, setZoom
-
Methods inherited from class org.openstreetmap.josm.gui.PleaseWaitRunnable
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
-
-
-
-
Field Detail
-
ids
private final java.util.List<PrimitiveId> ids
-
-
Constructor Detail
-
DownloadPrimitivesTask
public DownloadPrimitivesTask(OsmDataLayer layer, java.util.List<PrimitiveId> ids, boolean fullRelation)
Constructs a newDownloadPrimitivesTask
.- Parameters:
layer
- the layer in which primitives are updated. Must not be null.ids
- a collection of primitives to update from the server. Set to the empty collection if null.fullRelation
- true if a full download is required, i.e., a download including the immediate children of a relation.- Throws:
java.lang.IllegalArgumentException
- if layer is null.
-
DownloadPrimitivesTask
public DownloadPrimitivesTask(OsmDataLayer layer, java.util.List<PrimitiveId> ids, boolean fullRelation, ProgressMonitor progressMonitor)
Constructs a newDownloadPrimitivesTask
.- Parameters:
layer
- the layer in which primitives are updated. Must not be null.ids
- a collection of primitives to update from the server. Set to the empty collection if null.fullRelation
- true if a full download is required, i.e., a download including the immediate children of a relation.progressMonitor
- ProgressMonitor to use or null to create a new one.- Throws:
java.lang.IllegalArgumentException
- if layer is null.
-
-
Method Detail
-
initMultiFetchReader
protected void initMultiFetchReader(MultiFetchServerObjectReader reader)
- Specified by:
initMultiFetchReader
in classAbstractPrimitiveTask
-
-