|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jdbcimporter.parser.XMLDelimiterParser
The XMLDelimiterParser class implements the DelimiterParser interface to parse column values from an XML document that was transformed with the given XSL.
Field Summary | |
protected javax.xml.parsers.DocumentBuilder |
documentBuilder
The XML Parser. |
protected boolean |
forkThread
Flag to indicate that a thread should be forked to transform the XML. |
protected static org.apache.commons.logging.Log |
LOG
The log for debug information. |
protected javax.xml.transform.stream.StreamSource |
xmlSource
The input reader. |
protected java.lang.String |
xslResultFile
The filename to store the XML after it has been transformed with the XSL. |
protected java.io.Reader |
xslResultReader
The input reader after the XML has been transformed with the XSL. |
protected java.lang.String |
xslString
The XSL used to transform the XML. |
Constructor Summary | |
XMLDelimiterParser()
Constructor for XMLDeliimiterParser. |
Method Summary | |
java.lang.String |
getNextRow()
Returns the next row to be imported as a String. |
ColumnValue[] |
getValues(java.lang.String nextRow)
Returns the column values for the row specified. |
protected java.io.Reader |
initFileReader()
Initializes a file reader that will be used to parse the resulting XML. |
protected java.io.Reader |
initPipedReader()
Initializes a piped reader that will be used to parse the resulting XML. |
protected java.io.Reader |
initStringReader()
Initializes a string reader that will be used to parse the resulting XML. |
void |
setForkThread(boolean flag)
Sets a flag to indicate whether the XMLDelimiterParser will fork a thread to process the XSL. |
void |
setReader(java.io.Reader input)
Sets the input source for the parser. |
void |
setResultFile(java.lang.String file)
Sets the file to store the resulting XML after it has been transformed by the XSL. |
void |
setXSL(java.lang.String str)
Sets the XSL. |
void |
setXSLFile(java.lang.String filename)
Sets the XSL file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log LOG
protected javax.xml.parsers.DocumentBuilder documentBuilder
protected java.lang.String xslString
protected javax.xml.transform.stream.StreamSource xmlSource
protected java.io.Reader xslResultReader
protected java.lang.String xslResultFile
protected boolean forkThread
Constructor Detail |
public XMLDelimiterParser()
Method Detail |
public void setXSLFile(java.lang.String filename)
filename
- the XSL filenamepublic void setXSL(java.lang.String str)
str
- the XSLpublic void setResultFile(java.lang.String file)
file
- the filenamepublic void setForkThread(boolean flag)
flag
- fork thread flagpublic void setReader(java.io.Reader input)
DelimiterParser
setReader
in interface DelimiterParser
input
- the source of the data to import.DelimiterParser.setReader(Reader)
public java.lang.String getNextRow() throws java.io.IOException
DelimiterParser
getNextRow
in interface DelimiterParser
java.io.IOException
- if an error occurs while retrieving the next rowDelimiterParser.getNextRow()
public ColumnValue[] getValues(java.lang.String nextRow) throws MalformedDataException
DelimiterParser
getValues
in interface DelimiterParser
nextRow
- the row to be parsed into column values
MalformedDataException
- if the row is not formatted properlyDelimiterParser.getValues(String)
protected java.io.Reader initFileReader() throws java.io.IOException
java.io.IOException
protected java.io.Reader initPipedReader() throws java.io.IOException
java.io.IOException
protected java.io.Reader initStringReader() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |