Package org.openstreetmap.josm.io
Class OsmServerUserPreferencesReader
java.lang.Object
org.openstreetmap.josm.io.OsmConnection
org.openstreetmap.josm.io.OsmServerReader
org.openstreetmap.josm.io.OsmServerUserPreferencesReader
Download and parse preferences of the logged in user (OSM API v0.6 "/user/preferences").
- Since:
- 12502
- 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 TypeMethodDescriptionbuildFromXML(Document document) Parses the given XML data and returns the associated user preferences.fetchUserPreferences(ProgressMonitor monitor) Fetches user preferences, without explicit reason.fetchUserPreferences(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
-
OsmServerUserPreferencesReader
public OsmServerUserPreferencesReader()Constructs a newOsmServerUserInfoReader.
-
-
Method Details
-
buildFromXML
Parses the given XML data and returns the associated user preferences.- Parameters:
document- The XML contents- Returns:
- The user preferences
- 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
-
fetchUserPreferences
Fetches user preferences, without explicit reason.- Parameters:
monitor- The progress monitor- Returns:
- The user preferences
- Throws:
OsmTransferException- if something goes wrong
-
fetchUserPreferences
public Map<String,String> fetchUserPreferences(ProgressMonitor monitor, String reason) throws OsmTransferException 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
-