org.eclipse.datatools.enablement.oda.xml.util
Class SaxParserConsumer

java.lang.Object
  extended by org.eclipse.datatools.enablement.oda.xml.util.SaxParserConsumer
All Implemented Interfaces:
ISaxParserConsumer

public class SaxParserConsumer
extends java.lang.Object
implements ISaxParserConsumer

This class is an implementation of ISaxParserConsumer. The instance of this class deligate the communication between ResultSet and SaxParser, and does the majority of result-set population job.


Constructor Summary
SaxParserConsumer(RelationInformation rinfo, IXMLSource xmlSource, java.lang.String tName)
           
 
Method Summary
 void close()
          Close the SaxParserConsumer.
 void endElement(XMLPath path)
           
 void finish()
           
 int getColumnIndex(java.lang.String columnName)
           
 java.lang.String[] getRowValue()
           
 void manipulateData(XMLPath path, java.lang.String value)
          The method is used to populate one column that is specified by path in current row.
 boolean next()
          Make the cursor forward.
 void startElement(XMLPath path)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaxParserConsumer

public SaxParserConsumer(RelationInformation rinfo,
                         IXMLSource xmlSource,
                         java.lang.String tName)
                  throws OdaException
Parameters:
rs -
rinfo -
fileName -
tName -
Throws:
OdaException
Method Detail

getRowValue

public java.lang.String[] getRowValue()

manipulateData

public void manipulateData(XMLPath path,
                           java.lang.String value)
Description copied from interface: ISaxParserConsumer
The method is used to populate one column that is specified by path in current row.

Specified by:
manipulateData in interface ISaxParserConsumer

startElement

public void startElement(XMLPath path)
Specified by:
startElement in interface ISaxParserConsumer

endElement

public void endElement(XMLPath path)
Specified by:
endElement in interface ISaxParserConsumer

getColumnIndex

public int getColumnIndex(java.lang.String columnName)

next

public boolean next()
             throws OdaException
Make the cursor forward. If the end of data reached then return false.

Returns:
Throws:
OdaException

finish

public void finish()
Specified by:
finish in interface ISaxParserConsumer

close

public void close()
Close the SaxParserConsumer.