public abstract class AbstractPrimitiveTask extends PleaseWaitRunnable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
canceled |
private boolean |
downloadRelations |
protected DataSet |
ds |
private boolean |
fullRelation |
protected java.lang.Exception |
lastException |
protected OsmDataLayer |
layer |
private java.util.Set<PrimitiveId> |
missingPrimitives |
protected MultiFetchServerObjectReader |
multiObjectReader |
protected OsmServerObjectReader |
objectReader |
private boolean |
zoom |
progressMonitor| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPrimitiveTask(java.lang.String title,
OsmDataLayer layer) |
protected |
AbstractPrimitiveTask(java.lang.String title,
ProgressMonitor progressMonitor,
OsmDataLayer layer) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
java.util.Set<PrimitiveId> |
getMissingPrimitives()
Replies the set of ids of all primitives for which a fetch request to the
server was submitted but which are not available from the server (the server
replied a return code of 404)
|
protected abstract void |
initMultiFetchReader(MultiFetchServerObjectReader reader) |
protected void |
loadIncompleteNodes() |
protected void |
loadIncompleteRelationMembers() |
protected void |
realRun()
Called in the worker thread to do the actual work.
|
AbstractPrimitiveTask |
setDownloadRelations(boolean downloadRelations,
boolean fullRelation)
Sets whether .
|
AbstractPrimitiveTask |
setZoom(boolean zoom)
Sets whether the map view should zoom to impacted primitives at the end.
|
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, runprotected boolean canceled
protected java.lang.Exception lastException
private java.util.Set<PrimitiveId> missingPrimitives
protected final OsmDataLayer layer
protected MultiFetchServerObjectReader multiObjectReader
protected OsmServerObjectReader objectReader
private boolean zoom
private boolean downloadRelations
private boolean fullRelation
protected AbstractPrimitiveTask(java.lang.String title, OsmDataLayer layer)
protected AbstractPrimitiveTask(java.lang.String title, ProgressMonitor progressMonitor, OsmDataLayer layer)
protected abstract void initMultiFetchReader(MultiFetchServerObjectReader reader)
public final AbstractPrimitiveTask setZoom(boolean zoom)
zoom - true if the map view should zoom to impacted primitives at the endthispublic final AbstractPrimitiveTask setDownloadRelations(boolean downloadRelations, boolean fullRelation)
downloadRelations - true iffullRelation - true if a full download is required,
i.e., a download including the immediate children of a relation.thispublic java.util.Set<PrimitiveId> getMissingPrimitives()
protected 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 occursprotected void loadIncompleteRelationMembers() throws OsmTransferException
OsmTransferExceptionprotected void loadIncompleteNodes() throws OsmTransferException
OsmTransferExceptionprotected void cancel()
PleaseWaitRunnablecancel in class PleaseWaitRunnableprotected void finish()
PleaseWaitRunnablefinish in class PleaseWaitRunnable