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

java.lang.Object
  extended by org.openstreetmap.osmosis.core.xml.common.BaseXmlWriter
      extended by org.openstreetmap.osmosis.core.xml.v0_6.XmlChangeWriter
All Implemented Interfaces:
Completable, Releasable, Task, ChangeSink

public class XmlChangeWriter
extends BaseXmlWriter
implements ChangeSink

An OSM change sink for storing all data to an xml file.

Author:
Brett Henderson

Constructor Summary
XmlChangeWriter(java.io.File file, CompressionMethod compressionMethod)
          Creates a new instance.
 
Method Summary
protected  void beginElementWriter()
          Calls the begin method of the element writer used for this implementation.
protected  void endElementWriter()
          Calls the end method of the element writer used for this implementation.
 void process(ChangeContainer changeContainer)
          Process the change.
protected  void setWriterOnElementWriter(java.io.BufferedWriter writer)
          Sets the writer on the element writer used for this implementation.
 
Methods inherited from class org.openstreetmap.osmosis.core.xml.common.BaseXmlWriter
complete, initialize, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openstreetmap.osmosis.core.lifecycle.Completable
complete
 
Methods inherited from interface org.openstreetmap.osmosis.core.lifecycle.Releasable
release
 

Constructor Detail

XmlChangeWriter

public XmlChangeWriter(java.io.File file,
                       CompressionMethod compressionMethod)
Creates a new instance.

Parameters:
file - The file to write.
compressionMethod - Specifies the compression method to employ.
Method Detail

process

public void process(ChangeContainer changeContainer)
Process the change.

Specified by:
process in interface ChangeSink
Parameters:
changeContainer - The change to be processed.

beginElementWriter

protected void beginElementWriter()
Calls the begin method of the element writer used for this implementation.

Specified by:
beginElementWriter in class BaseXmlWriter

endElementWriter

protected void endElementWriter()
Calls the end method of the element writer used for this implementation.

Specified by:
endElementWriter in class BaseXmlWriter

setWriterOnElementWriter

protected void setWriterOnElementWriter(java.io.BufferedWriter writer)
Sets the writer on the element writer used for this implementation.

Specified by:
setWriterOnElementWriter in class BaseXmlWriter
Parameters:
writer - The writer receiving xml data.