|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.teiid.test.client.ctc.XMLQueryVisitationStrategy
public class XMLQueryVisitationStrategy
This program helps in parsing XML Query and Results files into map objects containing individual queries/ResultSets
This program is useful to convert the JDBC ResultSet objects into XML format. We physically walk through the ResultSet object and use JDOM to convert the ResultSets into XML. This also helps convert Exceptions into XML format.
Constructor Summary | |
---|---|
XMLQueryVisitationStrategy()
|
Method Summary | |
---|---|
static org.jdom.Element |
jdomException(java.lang.Throwable ex,
org.jdom.Element exceptionElement)
Generate XML for an exception in Object form. |
java.util.List |
parseXMLQueryFile(java.lang.String queryScenarioID,
java.io.File queryFile,
java.lang.String querySetID)
Consume an XML Query File and produce a Map containing queries, with queryNames/IDs as Keys. |
ResultsHolder |
parseXMLResultsFile(java.io.File resultsFile)
Consume an XML results File and produce a Map containing query results as List objects, with resultNames/IDs as Keys. |
org.jdom.Element |
parseXMLResultsFile(java.io.File resultsFile,
org.jdom.Element parent)
Consume an XML results File, produce results as JDOM and add results to the given parent. |
org.jdom.Element |
produceMsg(java.lang.Object object,
org.jdom.Element parent)
Produce a JDOM Element for the instance of any Object. |
org.jdom.Element |
produceMsg(java.sql.ResultSet object,
org.jdom.Element resultsElement)
Produce a JDOM Element for an instance of a JDBC ResultSet object. |
org.jdom.Element |
produceResults(java.sql.ResultSet object)
Produce a JDOM Element for an instance of a JDBC ResultSet object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLQueryVisitationStrategy()
Method Detail |
---|
public java.util.List parseXMLQueryFile(java.lang.String queryScenarioID, java.io.File queryFile, java.lang.String querySetID) throws java.io.IOException, org.jdom.JDOMException
queryFile
- the XML file object that is to be parsed
org.jdom.JDOMException
- if there is an error consuming the message.
java.io.IOException
public ResultsHolder parseXMLResultsFile(java.io.File resultsFile) throws java.io.IOException, org.jdom.JDOMException
resultsFile
- the XML file object that is to be parsed
org.jdom.JDOMException
- if there is an error consuming the message.
java.io.IOException
public org.jdom.Element parseXMLResultsFile(java.io.File resultsFile, org.jdom.Element parent) throws java.io.IOException, org.jdom.JDOMException
resultsFile
- the XML file object that is to be parsedparent
- the parent Element to assign results to
org.jdom.JDOMException
- if there is an error consuming the message.
java.io.IOException
public static org.jdom.Element jdomException(java.lang.Throwable ex, org.jdom.Element exceptionElement)
ex
- exceptionElement
-
public org.jdom.Element produceResults(java.sql.ResultSet object) throws org.jdom.JDOMException, java.sql.SQLException
object
- for which the JDOM Element is to be produced.
org.jdom.JDOMException
- if there is an error producing XML.
org.jdom.JDOMException
- if there is an error producing XML.
java.sql.SQLException
- if there is an error walking through the ResultSet object.public org.jdom.Element produceMsg(java.sql.ResultSet object, org.jdom.Element resultsElement) throws org.jdom.JDOMException, java.sql.SQLException
object
- for which the JDOM Element is to be produced.
org.jdom.JDOMException
- if there is an error producing XML.
java.sql.SQLException
- if there is an error walking through the ResultSet object.public org.jdom.Element produceMsg(java.lang.Object object, org.jdom.Element parent) throws org.jdom.JDOMException
object
- the instance for which the message is to be produced.parent
- the XML element that is to be the parent of the produced XML message.
org.jdom.JDOMException
- if there is an error producing XML.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |