Package org.openstreetmap.josm.io
Class OsmServerUserInfoReader
java.lang.Object
org.openstreetmap.josm.io.OsmConnection
org.openstreetmap.josm.io.OsmServerReader
org.openstreetmap.josm.io.OsmServerUserInfoReader
Download and parse info of the logged in user (OSM API v0.6 "/user/details").
- See Also:
-
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 inherited from class org.openstreetmap.josm.io.OsmServerReader
contentType, gpxParsedProperlyFields inherited from class org.openstreetmap.josm.io.OsmConnection
activeConnection, cancel, fetcher, oAuth20Parameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UserInfobuildFromXML(Document document) Parses the given XML data and returns the associated user info.fetchUserInfo(ProgressMonitor monitor) Fetches user info, without explicit reason.fetchUserInfo(ProgressMonitor monitor, String reason) Fetches user info, with an explicit reason.parseOsm(ProgressMonitor progressMonitor) Download OSM files from somewhereMethods 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, setDoAuthenticateMethods inherited from class org.openstreetmap.josm.io.OsmConnection
addAuth, addBasicAuthorizationHeader, addOAuth20AuthorizationHeader, cancel, isCanceled, retrieveBasicAuthorizationLogin, setOAuthAccessTokenFetcher
-
Constructor Details
-
OsmServerUserInfoReader
public OsmServerUserInfoReader()Constructs a newOsmServerUserInfoReader.
-
-
Method Details
-
buildFromXML
Parses the given XML data and returns the associated user info.- Parameters:
document- The XML contents- Returns:
- The user info
- Throws:
XmlParsingException- if parsing goes wrong
-
parseOsm
Description copied from class:OsmServerReaderDownload OSM files from somewhere- Specified by:
parseOsmin classOsmServerReader- Parameters:
progressMonitor- The progress monitor- Returns:
- The corresponding dataset
- Throws:
OsmTransferException- if any error occurs
-
fetchUserInfo
Fetches user info, without explicit reason.- Parameters:
monitor- The progress monitor- Returns:
- The user info
- Throws:
OsmTransferException- if something goes wrong
-
fetchUserInfo
Fetches user info, with an explicit reason.- Parameters:
monitor- The progress monitorreason- The reason to show on console. Can benullif no reason is given- Returns:
- The user info
- Throws:
OsmTransferException- if something goes wrong- Since:
- 6695
-