org.openstreetmap.josm.io
Class OsmServerChangesetReader

java.lang.Object
  extended by org.openstreetmap.josm.io.OsmConnection
      extended by org.openstreetmap.josm.io.OsmServerReader
          extended by org.openstreetmap.josm.io.OsmServerChangesetReader

public class OsmServerChangesetReader
extends OsmServerReader

Reads the history of an OsmPrimitive from the OSM API server.


Field Summary
 
Fields inherited from class org.openstreetmap.josm.io.OsmConnection
activeConnection, cancel, oauthParameters
 
Constructor Summary
OsmServerChangesetReader()
          constructor
 
Method Summary
 ChangesetDataSet downloadChangeset(int id, ProgressMonitor monitor)
          Downloads the content of a changeset
 DataSet parseOsm(ProgressMonitor progressMonitor)
          don't use - not implemented!
 java.util.List<Changeset> queryChangesets(ChangesetQuery query, ProgressMonitor monitor)
          Queries a list
 Changeset readChangeset(long id, ProgressMonitor monitor)
          Reads the changeset with id id from the server
 java.util.List<Changeset> readChangesets(java.util.Collection<java.lang.Integer> ids, ProgressMonitor monitor)
          Reads the changeset with id id from the server
 
Methods inherited from class org.openstreetmap.josm.io.OsmServerReader
getBaseUrl, getInputStream, getInputStreamRaw, isDoAuthenticate, parseOsmBzip2, parseOsmChange, parseOsmChangeBzip2, parseOsmChangeGzip, parseOsmGzip, parseRawGps, setDoAuthenticate
 
Methods inherited from class org.openstreetmap.josm.io.OsmConnection
addAuth, addBasicAuthorizationHeader, addOAuthAuthorizationHeader, cancel, isCanceled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsmServerChangesetReader

public OsmServerChangesetReader()
constructor

Method Detail

parseOsm

public DataSet parseOsm(ProgressMonitor progressMonitor)
                 throws OsmTransferException
don't use - not implemented!

Specified by:
parseOsm in class OsmServerReader
Throws:
OsmTransferException

queryChangesets

public java.util.List<Changeset> queryChangesets(ChangesetQuery query,
                                                 ProgressMonitor monitor)
                                          throws OsmTransferException
Queries a list

Parameters:
query - the query specification. Must not be null.
monitor - a progress monitor. Set to NullProgressMonitor.INSTANCE if null
Returns:
the list of changesets read from the server
Throws:
java.lang.IllegalArgumentException - thrown if query is null
OsmTransferException - thrown if something goes wrong w

readChangeset

public Changeset readChangeset(long id,
                               ProgressMonitor monitor)
                        throws OsmTransferException
Reads the changeset with id id from the server

Parameters:
id - the changeset id. id > 0 required.
monitor - the progress monitor. Set to NullProgressMonitor.INSTANCE if null
Returns:
the changeset read
Throws:
OsmTransferException - thrown if something goes wrong
java.lang.IllegalArgumentException - if id <= 0

readChangesets

public java.util.List<Changeset> readChangesets(java.util.Collection<java.lang.Integer> ids,
                                                ProgressMonitor monitor)
                                         throws OsmTransferException
Reads the changeset with id id from the server

Parameters:
ids - the list of ids. Ignored if null. Only load changesets for ids > 0.
monitor - the progress monitor. Set to NullProgressMonitor.INSTANCE if null
Returns:
the changeset read
Throws:
OsmTransferException - thrown if something goes wrong
java.lang.IllegalArgumentException - if id <= 0

downloadChangeset

public ChangesetDataSet downloadChangeset(int id,
                                          ProgressMonitor monitor)
                                   throws java.lang.IllegalArgumentException,
                                          OsmTransferException
Downloads the content of a changeset

Parameters:
id - the changeset id. >0 required.
monitor - the progress monitor. NullProgressMonitor.INSTANCE assumed if null.
Returns:
the changeset content
Throws:
java.lang.IllegalArgumentException - thrown if id <= 0
OsmTransferException - thrown if something went wrong


JOSM