public class DiffResultProcessor extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
DiffResultProcessor.DiffResultEntry |
private class |
DiffResultProcessor.Parser |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<PrimitiveId,DiffResultProcessor.DiffResultEntry> |
diffResults
mapping from old id to new id and version, the result of parsing the diff result
replied by the server
|
private java.util.Collection<? extends OsmPrimitive> |
primitives
the collection of primitives being uploaded
|
private java.util.Set<OsmPrimitive> |
processed
the set of processed primitives *after* the new id, the new version and the new changeset id is set
|
| Constructor and Description |
|---|
DiffResultProcessor(java.util.Collection<? extends OsmPrimitive> primitives)
Creates a diff result reader
|
| Modifier and Type | Method and Description |
|---|---|
void |
parse(java.lang.String diffUploadResponse,
ProgressMonitor progressMonitor)
Parse the response from a diff upload to the OSM API.
|
protected java.util.Set<OsmPrimitive> |
postProcess(Changeset cs,
ProgressMonitor monitor)
Postprocesses the diff result read and parsed from the server.
|
private java.util.Map<PrimitiveId,DiffResultProcessor.DiffResultEntry> diffResults
private java.util.Set<OsmPrimitive> processed
private java.util.Collection<? extends OsmPrimitive> primitives
public DiffResultProcessor(java.util.Collection<? extends OsmPrimitive> primitives)
primitives - the collection of primitives which have been uploaded. If null,
assumes an empty collection.public void parse(java.lang.String diffUploadResponse, ProgressMonitor progressMonitor) throws XmlParsingException
diffUploadResponse - the response. Must not be null.progressMonitor - a progress monitor. Defaults to NullProgressMonitor.INSTANCE if nulljava.lang.IllegalArgumentException - if diffUploadRequest is nullXmlParsingException - if the diffUploadRequest can't be parsed successfullyprotected java.util.Set<OsmPrimitive> postProcess(Changeset cs, ProgressMonitor monitor)
cs - the current changeset. Ignored if null.monitor - the progress monitor. Set to NullProgressMonitor.INSTANCE if null