edu.isi.pegasus.planner.catalog.site.classes
public abstract class AbstractXMLPrintVisitor extends Object implements SiteDataVisitor
Modifier and Type | Field and Description |
---|---|
protected int |
mCurrentIndentIndex
The number of tabs to use for current indent
|
protected String |
mNewLine
The new line character to be used
|
protected Writer |
mWriter
The internal writer
|
Constructor and Description |
---|
AbstractXMLPrintVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
closeElement(String element)
Generates a closing tag for an element
|
void |
decrementIndentIndex()
Decrements the indent index
|
void |
depart(SiteData data) |
String |
getCurrentIndent()
Returns the current indent to be used while writing out
|
String |
getNextIndent()
Returns the indent to be used for the nested element.
|
void |
incrementIndentIndex()
Increments the indent index
|
void |
initialize(Writer writer)
Initialize the visitor implementation
|
void |
visit(SiteData data) |
void |
writeAttribute(String key,
String value)
Writes an attribute to the stream.
|
void |
writeAttribute(Writer writer,
String key,
String value)
Writes an attribute to the stream.
|
protected Writer mWriter
protected String mNewLine
protected int mCurrentIndentIndex
public void initialize(Writer writer)
initialize
in interface SiteDataVisitor
writer
- the writerpublic void writeAttribute(String key, String value) throws IOException
key
- the attribute keyvalue
- the attribute valueIOException
public void writeAttribute(Writer writer, String key, String value) throws IOException
writer
- the stream to write tokey
- the attribute keyvalue
- the attribute valueIOException
public String getCurrentIndent()
public String getNextIndent()
public void incrementIndentIndex()
public void decrementIndentIndex()
public void closeElement(String element) throws IOException
element
- the element tag nameIOException
public void visit(SiteData data) throws IOException
visit
in interface SiteDataVisitor
IOException
public void depart(SiteData data) throws IOException
depart
in interface SiteDataVisitor
IOException