org.openstreetmap.osmosis.core.xml.v0_5
Class XmlWriter

java.lang.Object
  extended by org.openstreetmap.osmosis.core.xml.common.BaseXmlWriter
      extended by org.openstreetmap.osmosis.core.xml.v0_5.XmlWriter
All Implemented Interfaces:
Completable, Releasable, Task, Sink

public class XmlWriter
extends BaseXmlWriter
implements Sink

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

Author:
Brett Henderson

Constructor Summary
XmlWriter(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(EntityContainer entityContainer)
          Process the entity.
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

XmlWriter

public XmlWriter(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(EntityContainer entityContainer)
Process the entity.

Specified by:
process in interface Sink
Parameters:
entityContainer - The entity 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.