public class DownloadReferrersTask extends PleaseWaitRunnable
| Modifier and Type | Field and Description |
|---|---|
private boolean |
canceled |
private Map<Long,OsmPrimitiveType> |
children
the collection of child primitives
|
private Exception |
lastException |
private DataSet |
parents
the parents
|
private OsmServerReader |
reader |
private OsmDataLayer |
targetLayer
the target layer
|
progressMonitor| Constructor and Description |
|---|
DownloadReferrersTask(OsmDataLayer targetLayer,
Collection<OsmPrimitive> children)
constructor
|
DownloadReferrersTask(OsmDataLayer targetLayer,
long id,
OsmPrimitiveType type)
constructor
|
DownloadReferrersTask(OsmDataLayer targetLayer,
Map<Long,OsmPrimitiveType> children)
constructor
|
DownloadReferrersTask(OsmDataLayer targetLayer,
PrimitiveId primitiveId)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancel()
User pressed cancel button.
|
protected void |
downloadParents(long id,
OsmPrimitiveType type,
ProgressMonitor progressMonitor) |
protected void |
finish()
Finish up the data work.
|
protected void |
realRun()
Called in the worker thread to do the actual work.
|
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, runprivate boolean canceled
private Exception lastException
private OsmServerReader reader
private OsmDataLayer targetLayer
private Map<Long,OsmPrimitiveType> children
public DownloadReferrersTask(OsmDataLayer targetLayer, Collection<OsmPrimitive> children)
targetLayer - the target layer for the downloaded primitives. Must not be null.children - the collection of child primitives for which parents are to be downloadedpublic DownloadReferrersTask(OsmDataLayer targetLayer, Map<Long,OsmPrimitiveType> children)
targetLayer - the target layer for the downloaded primitives. Must not be null.children - the collection of children for which parents are to be downloaded. Children
are specified by their id and their type.public DownloadReferrersTask(OsmDataLayer targetLayer, long id, OsmPrimitiveType type) throws IllegalArgumentException
targetLayer - the target layer. Must not be null.id - the primitive id. id > 0 required.type - the primitive type. type != null requiredIllegalArgumentException - thrown if id <= 0IllegalArgumentException - thrown if type == nullIllegalArgumentException - thrown if targetLayer == nullpublic DownloadReferrersTask(OsmDataLayer targetLayer, PrimitiveId primitiveId) throws IllegalArgumentException
targetLayer - the target layer. Must not be null.primitiveId - a PrimitiveId object.IllegalArgumentException - thrown if id <= 0IllegalArgumentException - thrown if targetLayer == nullprotected void cancel()
PleaseWaitRunnablecancel in class PleaseWaitRunnableprotected void finish()
PleaseWaitRunnablefinish in class PleaseWaitRunnableprotected void downloadParents(long id, OsmPrimitiveType type, ProgressMonitor progressMonitor) throws OsmTransferException
OsmTransferExceptionprotected void realRun() throws SAXException, IOException, OsmTransferException
PleaseWaitRunnablerealRun in class PleaseWaitRunnableSAXExceptionIOExceptionOsmTransferException