org.vfny.geoserver.global.xml
Class WriterHelper

java.lang.Object
  extended byorg.vfny.geoserver.global.xml.WriterHelper

public class WriterHelper
extends java.lang.Object

WriterUtils purpose.

Used to provide assitance writing xml to a Writer.


Field Summary
protected  java.io.Writer writer
          The output writer.
 
Constructor Summary
protected WriterHelper()
          WriterUtils constructor.
  WriterHelper(java.io.Writer writer)
          WriterUtils constructor.
 
Method Summary
 void attrTag(java.lang.String tagName, java.util.Map attributes)
          attrTag purpose.
 void closeTag(java.lang.String tagName)
          closeTag purpose.
 void comment(java.lang.String comment)
          comment purpose.
 void openTag(java.lang.String tagName)
          openTag purpose.
 void openTag(java.lang.String tagName, java.util.Map attributes)
          openTag purpose.
 void textTag(java.lang.String tagName, java.util.Map attributes, java.lang.String data)
          textTag purpose.
 void textTag(java.lang.String tagName, java.lang.String data)
          textTag purpose.
 void valueTag(java.lang.String tagName, java.lang.String value)
          valueTag purpose.
 void write(java.lang.String s)
          write purpose.
 void writeln(java.lang.String s)
          writeln purpose.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected java.io.Writer writer
The output writer.

Constructor Detail

WriterHelper

protected WriterHelper()
WriterUtils constructor.

Should never be called.


WriterHelper

public WriterHelper(java.io.Writer writer)
WriterUtils constructor.

Stores the specified writer to use for output.

Parameters:
writer - the writer which will be used for outputing the xml.
Method Detail

write

public void write(java.lang.String s)
           throws ConfigurationException
write purpose.

Writes the String specified to the stored output writer.

Parameters:
s - The String to write.
Throws:
ConfigurationException - When an IO exception occurs.

writeln

public void writeln(java.lang.String s)
             throws ConfigurationException
writeln purpose.

Writes the String specified to the stored output writer.

Parameters:
s - The String to write.
Throws:
ConfigurationException - When an IO exception occurs.

openTag

public void openTag(java.lang.String tagName)
             throws ConfigurationException
openTag purpose.

Writes an open xml tag with the name specified to the stored output writer.

Parameters:
tagName - The tag name to write.
Throws:
ConfigurationException - When an IO exception occurs.

openTag

public void openTag(java.lang.String tagName,
                    java.util.Map attributes)
             throws ConfigurationException
openTag purpose.

Writes an open xml tag with the name and attributes specified to the stored output writer.

Parameters:
tagName - The tag name to write.
attributes - The tag attributes to write.
Throws:
ConfigurationException - When an IO exception occurs.

closeTag

public void closeTag(java.lang.String tagName)
              throws ConfigurationException
closeTag purpose.

Writes an close xml tag with the name specified to the stored output writer.

Parameters:
tagName - The tag name to write.
Throws:
ConfigurationException - When an IO exception occurs.

textTag

public void textTag(java.lang.String tagName,
                    java.lang.String data)
             throws ConfigurationException
textTag purpose.

Writes a text xml tag with the name and text specified to the stored output writer.

Parameters:
tagName - The tag name to write.
data - The text data to write.
Throws:
ConfigurationException - When an IO exception occurs.

valueTag

public void valueTag(java.lang.String tagName,
                     java.lang.String value)
              throws ConfigurationException
valueTag purpose.

Writes an xml tag with the name and value specified to the stored output writer.

Parameters:
tagName - The tag name to write.
value - The text data to write.
Throws:
ConfigurationException - When an IO exception occurs.

attrTag

public void attrTag(java.lang.String tagName,
                    java.util.Map attributes)
             throws ConfigurationException
attrTag purpose.

Writes an xml tag with the name and attributes specified to the stored output writer.

Parameters:
tagName - The tag name to write.
attributes - The tag attributes to write.
Throws:
ConfigurationException - When an IO exception occurs.

textTag

public void textTag(java.lang.String tagName,
                    java.util.Map attributes,
                    java.lang.String data)
             throws ConfigurationException
textTag purpose.

Writes an xml tag with the name, text and attributes specified to the stored output writer.

Parameters:
tagName - The tag name to write.
attributes - The tag attributes to write.
data - The tag text to write.
Throws:
ConfigurationException - When an IO exception occurs.

comment

public void comment(java.lang.String comment)
             throws ConfigurationException
comment purpose.

Writes an xml comment with the text specified to the stored output writer.

Parameters:
comment - The comment text to write.
Throws:
ConfigurationException - When an IO exception occurs.