|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jdbcexporter.formatter.XMLDelimiterFormatter
The XMLDelimiterFormatter class implements the DelimiterFormatter interface to format column values into an XML document and transform the XML document with the given XSL.
Field Summary | |
protected java.lang.String[] |
columnElementNames
The list of names for the column elements. |
protected java.lang.String |
rowElementName
The name of the element that encloses the row data. |
protected java.lang.String |
rowsElementName
The root element name. |
protected java.io.StringWriter |
tmpWriter
The temporary writer. |
protected java.io.Writer |
writer
The output writer. |
protected java.lang.String |
xslString
The XSL used to transform the XML. |
Constructor Summary | |
XMLDelimiterFormatter()
|
Method Summary | |
void |
finish()
Finishs the writing of rows to the output source. |
java.lang.String |
formatValues(ColumnValue[] values)
Creates a string representing the row of column values. |
void |
setColumnElements(java.lang.String names)
Sets the list of names for the column elements. |
void |
setRowElement(java.lang.String name)
Sets the name of the element that encloses the row data. |
void |
setRowsElement(java.lang.String name)
Sets the root element name. |
void |
setWriter(java.io.Writer output)
Sets the output source for the formatter. |
void |
setXSL(java.lang.String str)
Set the XSL that will be used to transform the XML. |
void |
setXSLFile(java.lang.String filename)
Set the xsl filename that will be used to transform the XML before writing to the file. |
void |
writeNextRow(java.lang.String row)
Writes the next row to the output source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.Writer writer
protected java.lang.String xslString
protected java.io.StringWriter tmpWriter
protected java.lang.String rowsElementName
protected java.lang.String rowElementName
protected java.lang.String[] columnElementNames
Constructor Detail |
public XMLDelimiterFormatter()
Method Detail |
public void setRowsElement(java.lang.String name)
name
- the element namepublic void setRowElement(java.lang.String name)
name
- the element namepublic void setColumnElements(java.lang.String names)
names
- a comma-separated list of element names.
if the list of columns is longer then the last value
in the list is used for the rest of columns.public void setWriter(java.io.Writer output)
DelimiterFormatter
setWriter
in interface DelimiterFormatter
output
- the destination of the dataDelimiterFormatter.setWriter(java.io.Writer)
public java.lang.String formatValues(ColumnValue[] values)
DelimiterFormatter
formatValues
in interface DelimiterFormatter
values
- the column values
DelimiterFormatter.formatValues(net.sourceforge.jdbcimporter.ColumnValue[])
public void writeNextRow(java.lang.String row) throws java.io.IOException
DelimiterFormatter
writeNextRow
in interface DelimiterFormatter
row
- the next row
java.io.IOException
- if an error occurs while writing the next rowDelimiterFormatter.writeNextRow(java.lang.String)
public void finish() throws java.io.IOException
DelimiterFormatter
finish
in interface DelimiterFormatter
java.io.IOException
DelimiterFormatter.finish()
public void setXSLFile(java.lang.String filename)
filename
- the filenamepublic void setXSL(java.lang.String str)
str
- the xsl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |