public class DownloadReferrersTask extends PleaseWaitRunnable
| Modifier and Type | Field and Description |
|---|---|
private boolean |
canceled |
private java.util.Map<java.lang.Long,OsmPrimitiveType> |
children
the collection of child primitives
|
private java.lang.Exception |
lastException |
private DataSet |
parents
the parents
|
private OsmServerReader |
reader |
private OsmDataLayer |
targetLayer
the target layer
|
progressMonitor| Constructor and Description |
|---|
DownloadReferrersTask(OsmDataLayer targetLayer,
java.util.Collection<OsmPrimitive> children)
constructor
|
DownloadReferrersTask(OsmDataLayer targetLayer,
PrimitiveId primitiveId,
ProgressMonitor progressMonitor)
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 java.lang.Exception lastException
private OsmServerReader reader
private final OsmDataLayer targetLayer
private final java.util.Map<java.lang.Long,OsmPrimitiveType> children
public DownloadReferrersTask(OsmDataLayer targetLayer, java.util.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, PrimitiveId primitiveId, ProgressMonitor progressMonitor)
targetLayer - the target layer. Must not be null.primitiveId - a PrimitiveId object.progressMonitor - ProgressMonitor to use or null to create a new one.java.lang.IllegalArgumentException - if id <= 0java.lang.IllegalArgumentException - 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 org.xml.sax.SAXException, java.io.IOException, OsmTransferException
PleaseWaitRunnablerealRun in class PleaseWaitRunnableorg.xml.sax.SAXException - if a SAX error occursjava.io.IOException - if an I/O error occursOsmTransferException - if a communication error with the OSM server occurs