Package org.openstreetmap.josm.io
Class OsmServerHistoryReader
- java.lang.Object
-
- org.openstreetmap.josm.io.OsmConnection
-
- org.openstreetmap.josm.io.OsmServerReader
-
- org.openstreetmap.josm.io.OsmServerHistoryReader
-
public class OsmServerHistoryReader extends OsmServerReader
Reads the history of anOsmPrimitivefrom the OSM API server.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.io.OsmServerReader
OsmServerReader.DomParser<R>
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.io.OsmConnection
OsmConnection.OAuthAccessTokenFetcher
-
-
Field Summary
Fields Modifier and Type Field Description private longidprivate OsmPrimitiveTypeprimitiveType-
Fields inherited from class org.openstreetmap.josm.io.OsmServerReader
contentType, gpxParsedProperly
-
Fields inherited from class org.openstreetmap.josm.io.OsmConnection
activeConnection, cancel, fetcher, oAuth20Parameters
-
-
Constructor Summary
Constructors Constructor Description OsmServerHistoryReader(OsmPrimitiveType type, long id)constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HistoryDataSetparseHistory(ProgressMonitor progressMonitor)Fetches the history from the OSM API and parses itDataSetparseOsm(ProgressMonitor progressMonitor)don't use - not implemented!-
Methods inherited from class org.openstreetmap.josm.io.OsmServerReader
adaptRequest, fetchData, getAttribute, getBaseUrl, getInputStream, getInputStream, getInputStreamRaw, getInputStreamRaw, getInputStreamRaw, getInputStreamRaw, isDoAuthenticate, isGpxParsedProperly, parseNotes, parseOsm, parseOsmChange, parseOsmChange, parseRawGps, parseRawGps, parseRawNotes, parseRawNotes, setDoAuthenticate
-
Methods inherited from class org.openstreetmap.josm.io.OsmConnection
addAuth, addBasicAuthorizationHeader, addOAuth20AuthorizationHeader, cancel, isCanceled, retrieveBasicAuthorizationLogin, setOAuthAccessTokenFetcher
-
-
-
-
Field Detail
-
primitiveType
private final OsmPrimitiveType primitiveType
-
id
private final long id
-
-
Constructor Detail
-
OsmServerHistoryReader
public OsmServerHistoryReader(OsmPrimitiveType type, long id)
constructor- Parameters:
type- the type of the primitive whose history is to be fetched from the server. Must not be null.id- the id of the primitive- Throws:
java.lang.IllegalArgumentException- if type is null
-
-
Method Detail
-
parseOsm
public DataSet parseOsm(ProgressMonitor progressMonitor) throws OsmTransferException
don't use - not implemented!- Specified by:
parseOsmin classOsmServerReader- Parameters:
progressMonitor- The progress monitor- Returns:
- The corresponding dataset
- Throws:
OsmTransferException- if any error occurs
-
parseHistory
public HistoryDataSet parseHistory(ProgressMonitor progressMonitor) throws OsmTransferException
Fetches the history from the OSM API and parses it- Parameters:
progressMonitor- progress monitor- Returns:
- the data set with the parsed history data
- Throws:
OsmTransferException- if an exception occurs
-
-