Package org.openstreetmap.josm.io
Class OsmServerLocationReader
java.lang.Object
org.openstreetmap.josm.io.OsmConnection
org.openstreetmap.josm.io.OsmServerReader
org.openstreetmap.josm.io.OsmServerLocationReader
- Direct Known Subclasses:
GeoJSONServerReader
Read content from OSM server for a given URL
- Since:
- 1146
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected classprotected classprotected static classNested 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
FieldsFields inherited from class org.openstreetmap.josm.io.OsmServerReader
contentType, gpxParsedProperlyFields inherited from class org.openstreetmap.josm.io.OsmConnection
activeConnection, cancel, fetcher, oAuth20Parameters -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newOsmServerLocationReader. -
Method Summary
Modifier and TypeMethodDescriptionprotected final <T> TdoParse(OsmServerLocationReader.Parser<T> parser, ProgressMonitor progressMonitor) final StringgetUrl()Returns the URL to fetchparseOsm(ProgressMonitor progressMonitor) Download OSM files from somewhereparseOsm(ProgressMonitor progressMonitor, Compression compression) Download compressed OSM files from somewhereparseOsmChange(ProgressMonitor progressMonitor) Download OSM Change uncompressed files from somewhereparseOsmChange(ProgressMonitor progressMonitor, Compression compression) Download OSM Change compressed files from somewhereparseRawGps(ProgressMonitor progressMonitor) Retrieve raw gps waypoints from the server API.parseRawGps(ProgressMonitor progressMonitor, Compression compression) Retrieve compressed GPX files from somewhere.parseRawNotes(ProgressMonitor progressMonitor) Downloads notes from a given raw URL.parseRawNotes(ProgressMonitor progressMonitor, Compression compression) Download notes from a URL that contains a compressed notes dump fileMethods inherited from class org.openstreetmap.josm.io.OsmServerReader
adaptRequest, fetchData, getAttribute, getBaseUrl, getInputStream, getInputStream, getInputStreamRaw, getInputStreamRaw, getInputStreamRaw, getInputStreamRaw, isDoAuthenticate, isGpxParsedProperly, parseNotes, setDoAuthenticateMethods inherited from class org.openstreetmap.josm.io.OsmConnection
addAuth, addBasicAuthorizationHeader, addOAuth20AuthorizationHeader, cancel, isCanceled, retrieveBasicAuthorizationLogin, setOAuthAccessTokenFetcher
-
Field Details
-
url
-
-
Constructor Details
-
OsmServerLocationReader
Constructs a newOsmServerLocationReader.- Parameters:
url- The URL to fetch
-
-
Method Details
-
getUrl
Returns the URL to fetch- Returns:
- the URL to fetch
- Since:
- 15247
-
doParse
protected final <T> T doParse(OsmServerLocationReader.Parser<T> parser, ProgressMonitor progressMonitor) throws OsmTransferException - Throws:
OsmTransferException
-
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
-
parseOsm
public DataSet parseOsm(ProgressMonitor progressMonitor, Compression compression) throws OsmTransferException Description copied from class:OsmServerReaderDownload compressed OSM files from somewhere- Overrides:
parseOsmin classOsmServerReader- Parameters:
progressMonitor- The progress monitorcompression- compression to use- Returns:
- The corresponding dataset
- Throws:
OsmTransferException- if any error occurs
-
parseOsmChange
Description copied from class:OsmServerReaderDownload OSM Change uncompressed files from somewhere- Overrides:
parseOsmChangein classOsmServerReader- Parameters:
progressMonitor- The progress monitor- Returns:
- The corresponding dataset
- Throws:
OsmTransferException- if any error occurs
-
parseOsmChange
public DataSet parseOsmChange(ProgressMonitor progressMonitor, Compression compression) throws OsmTransferException Description copied from class:OsmServerReaderDownload OSM Change compressed files from somewhere- Overrides:
parseOsmChangein classOsmServerReader- Parameters:
progressMonitor- The progress monitorcompression- compression to use- Returns:
- The corresponding dataset
- Throws:
OsmTransferException- if any error occurs
-
parseRawGps
Description copied from class:OsmServerReaderRetrieve raw gps waypoints from the server API.- Overrides:
parseRawGpsin classOsmServerReader- Parameters:
progressMonitor- The progress monitor- Returns:
- The corresponding GPX tracks
- Throws:
OsmTransferException- if any error occurs
-
parseRawGps
public GpxData parseRawGps(ProgressMonitor progressMonitor, Compression compression) throws OsmTransferException Description copied from class:OsmServerReaderRetrieve compressed GPX files from somewhere.- Overrides:
parseRawGpsin classOsmServerReader- Parameters:
progressMonitor- The progress monitorcompression- compression to use- Returns:
- The corresponding GPX tracks
- Throws:
OsmTransferException- if any error occurs
-
parseRawNotes
Description copied from class:OsmServerReaderDownloads notes from a given raw URL. The URL is assumed to be complete and no API limits are added- Overrides:
parseRawNotesin classOsmServerReader- Parameters:
progressMonitor- progress monitor- Returns:
- A list of notes parsed from the URL
- Throws:
OsmTransferException- if any error occurs during dialog with OSM API
-
parseRawNotes
public List<Note> parseRawNotes(ProgressMonitor progressMonitor, Compression compression) throws OsmTransferException Description copied from class:OsmServerReaderDownload notes from a URL that contains a compressed notes dump file- Overrides:
parseRawNotesin classOsmServerReader- Parameters:
progressMonitor- progress monitorcompression- compression to use- Returns:
- A list of notes parsed from the URL
- Throws:
OsmTransferException- if any error occurs during dialog with OSM API
-