org.openstreetmap.osmosis.core.xml.v0_6.impl
Class OsmWriter

java.lang.Object
  extended by org.openstreetmap.osmosis.core.xml.common.ElementWriter
      extended by org.openstreetmap.osmosis.core.xml.v0_6.impl.OsmWriter

public class OsmWriter
extends ElementWriter

Renders OSM data types as xml.

Author:
Brett Henderson

Field Summary
 
Fields inherited from class org.openstreetmap.osmosis.core.xml.common.ElementWriter
writer
 
Constructor Summary
OsmWriter(java.lang.String elementName, int indentLevel, boolean renderAttributes)
          Creates a new instance.
 
Method Summary
 void begin()
          Begins an element.
 void end()
          Ends an element.
 void process(EntityContainer entityContainer)
          Writes the element in the container.
 void setWriter(java.io.BufferedWriter writer)
          Sets the writer used as the xml output destination.
 
Methods inherited from class org.openstreetmap.osmosis.core.xml.common.ElementWriter
addAttribute, beginOpenElement, closeElement, endOpenElement, getTimestampFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsmWriter

public OsmWriter(java.lang.String elementName,
                 int indentLevel,
                 boolean renderAttributes)
Creates a new instance.

Parameters:
elementName - The name of the element to be written.
indentLevel - The indent level of the element.
renderAttributes - Specifies whether attributes of the top level element should be rendered. This would typically be set to false if this element is embedded within a higher level element (eg. changesets)
Method Detail

begin

public void begin()
Begins an element.


end

public void end()
Ends an element.


process

public void process(EntityContainer entityContainer)
Writes the element in the container.

Parameters:
entityContainer - The container holding the entity.

setWriter

public void setWriter(java.io.BufferedWriter writer)
Sets the writer used as the xml output destination.

Overrides:
setWriter in class ElementWriter
Parameters:
writer - The writer.