org.openstreetmap.osmosis.core.xml.v0_6
Class XmlDownloader

java.lang.Object
  extended by org.openstreetmap.osmosis.core.xml.v0_6.XmlDownloader
All Implemented Interfaces:
java.lang.Runnable, Task, RunnableSource, Source

public class XmlDownloader
extends java.lang.Object
implements RunnableSource

An OSM data source reading from an osm-xml file from the OpenStreetMap-server.

Author:
Marcus Wolschon

Constructor Summary
XmlDownloader(double left, double right, double top, double bottom, java.lang.String baseUrl)
          Creates a new instance with the specified geographical coordinates.
 
Method Summary
 void run()
          Reads all data from the server and send it to the Sink.
 void setSink(Sink aSink)
          Sets the osm sink to send data to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDownloader

public XmlDownloader(double left,
                     double right,
                     double top,
                     double bottom,
                     java.lang.String baseUrl)
Creates a new instance with the specified geographical coordinates.

Parameters:
left - The longitude marking the left edge of the bounding box.
right - The longitude marking the right edge of the bounding box.
top - The latitude marking the top edge of the bounding box.
bottom - The latitude marking the bottom edge of the bounding box.
baseUrl - (optional) The base url of the server (eg. http://www.openstreetmap.org/api/0.5).
Method Detail

setSink

public void setSink(Sink aSink)
Sets the osm sink to send data to.

Specified by:
setSink in interface Source
Parameters:
aSink - The sink for receiving all produced data.

run

public void run()
Reads all data from the server and send it to the Sink.

Specified by:
run in interface java.lang.Runnable