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

java.lang.Object
  extended by org.openstreetmap.osmosis.core.xml.v0_6.XmlChangeReader
All Implemented Interfaces:
java.lang.Runnable, Task, ChangeSource, RunnableChangeSource

public class XmlChangeReader
extends java.lang.Object
implements RunnableChangeSource

A change source reading from an xml file. The entire contents of the file are read.

Author:
Brett Henderson

Constructor Summary
XmlChangeReader(java.io.File file, boolean enableDateParsing, CompressionMethod compressionMethod)
          Creates a new instance.
 
Method Summary
 void run()
          Reads all data from the file and send it to the sink.
 void setChangeSink(ChangeSink changeSink)
          Sets the change 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

XmlChangeReader

public XmlChangeReader(java.io.File file,
                       boolean enableDateParsing,
                       CompressionMethod compressionMethod)
Creates a new instance.

Parameters:
file - The file to read.
enableDateParsing - If true, dates will be parsed from xml data, else the current date will be used thus saving parsing time.
compressionMethod - Specifies the compression method to employ.
Method Detail

setChangeSink

public void setChangeSink(ChangeSink changeSink)
Sets the change sink to send data to.

Specified by:
setChangeSink in interface ChangeSource
Parameters:
changeSink - The sink for receiving all produced data.

run

public void run()
Reads all data from the file and send it to the sink.

Specified by:
run in interface java.lang.Runnable