|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.io.OsmConnection
org.openstreetmap.josm.io.OsmServerReader
org.openstreetmap.josm.io.OsmServerObjectReader
public class OsmServerObjectReader
OsmServerObjectReader reads an individual object from the OSM server. It can either download the object including or not including its immediate children. The former case is called a "full download". It can also download a specific version of the object (however, "full" download is not possible in that case).
Field Summary | |
---|---|
private boolean |
full
true if a full download is required, i.e. |
private PrimitiveId |
id
the id of the object to download |
private int |
version
the specific version number, if required (incompatible with full), or -1 else |
Fields inherited from class org.openstreetmap.josm.io.OsmConnection |
---|
activeConnection, cancel, oauthParameters |
Constructor Summary | |
---|---|
|
OsmServerObjectReader(long id,
OsmPrimitiveType type,
boolean full)
Creates a new server object reader for a given id and a primitive type. |
protected |
OsmServerObjectReader(long id,
OsmPrimitiveType type,
boolean full,
int version)
|
|
OsmServerObjectReader(long id,
OsmPrimitiveType type,
int version)
Creates a new server object reader for a given id and a primitive type. |
|
OsmServerObjectReader(PrimitiveId id,
boolean full)
Creates a new server object reader for an object with the given id |
protected |
OsmServerObjectReader(PrimitiveId id,
boolean full,
int version)
|
|
OsmServerObjectReader(PrimitiveId id,
int version)
Creates a new server object reader for an object with the given id |
Method Summary | |
---|---|
DataSet |
parseOsm(ProgressMonitor progressMonitor)
Downloads and parses the data. |
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 |
Field Detail |
---|
private PrimitiveId id
private boolean full
private int version
Constructor Detail |
---|
public OsmServerObjectReader(long id, OsmPrimitiveType type, boolean full) throws java.lang.IllegalArgumentException
id
- the object id. > 0 required.type
- the type. Must not be null.full
- true, if a full download is requested (i.e. a download including
immediate children); false, otherwise
java.lang.IllegalArgumentException
- thrown if id <= 0
java.lang.IllegalArgumentException
- thrown if type is nullpublic OsmServerObjectReader(long id, OsmPrimitiveType type, int version) throws java.lang.IllegalArgumentException
id
- the object id. > 0 required.type
- the type. Must not be null.version
- the specific version number, if required; -1, otherwise
java.lang.IllegalArgumentException
- thrown if id <= 0
java.lang.IllegalArgumentException
- thrown if type is nullprotected OsmServerObjectReader(long id, OsmPrimitiveType type, boolean full, int version) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public OsmServerObjectReader(PrimitiveId id, boolean full)
id
id
- the object id. Must not be null. Unique id > 0 required.full
- true, if a full download is requested (i.e. a download including
immediate children); false, otherwise
java.lang.IllegalArgumentException
- thrown if id is null
java.lang.IllegalArgumentException
- thrown if id.getUniqueId() <= 0public OsmServerObjectReader(PrimitiveId id, int version)
id
id
- the object id. Must not be null. Unique id > 0 required.version
- the specific version number, if required; -1, otherwise
java.lang.IllegalArgumentException
- thrown if id is null
java.lang.IllegalArgumentException
- thrown if id.getUniqueId() <= 0protected OsmServerObjectReader(PrimitiveId id, boolean full, int version)
Method Detail |
---|
public DataSet parseOsm(ProgressMonitor progressMonitor) throws OsmTransferException
parseOsm
in class OsmServerReader
progressMonitor
- the progress monitor. Set to NullProgressMonitor.INSTANCE
if
null
org.xml.sax.SAXException
java.io.IOException
OsmTransferException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |