|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.ExportData
Export data from relational database to an XML document User ResultSet directly to increase the performance, without first dump the table to the table object.
| Field Summary | |
(package private) java.util.Hashtable |
all_nodes
Hashtable for all the elements for the exportTo(). |
(package private) JDBCClient |
client
It's database connection of where to get the data. |
(package private) edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.DocumentImpl |
document
The document implementation for the creation of the DOM document. |
(package private) long |
num_of_nodes
used to keep process of the printNode. |
(package private) long |
num_of_tuples
Use to report number of tuples exported. |
(package private) java.util.Hashtable |
positions
Hashtable for get the position of a specific node. |
(package private) java.util.Hashtable |
roots
Hashtable of Vectors for all the roots. |
| Constructor Summary | |
ExportData(JDBCClient client)
Construct the export object that connects to the database. |
|
| Method Summary | |
void |
exportTo(java.io.PrintStream out)
Dump the xmldata in the database out to a printstream. |
void |
exportTo(java.lang.String filename)
Dump the XML data to a file. |
(package private) edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.Node |
exportTuple(java.lang.String table_name,
java.lang.String iid,
java.lang.String pid,
java.lang.String position,
java.sql.ResultSet tuples,
Table attribute_names)
This one will export one tuple out. |
(package private) java.lang.String |
indent(int level)
Indent is a function to generate number of spaces based on the the input level. |
(package private) void |
init()
|
(package private) void |
insertChild(edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.Node parent_node,
edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.Node child_node,
java.lang.String child_position)
This will insert the child_node into the parent_node with specific position. |
(package private) void |
printDOM(java.io.PrintStream out)
This will print out all the dom trees start from the roots. |
(package private) void |
printNode(java.io.PrintStream out,
edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.Node cur,
int level)
Recursive function to visit each node and print it out. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
JDBCClient client
java.util.Hashtable all_nodes
java.util.Hashtable roots
java.util.Hashtable positions
edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.DocumentImpl document
long num_of_nodes
long num_of_tuples
| Constructor Detail |
public ExportData(JDBCClient client)
| Method Detail |
void init()
public void exportTo(java.lang.String filename)
throws java.io.IOException
public void exportTo(java.io.PrintStream out)
void printDOM(java.io.PrintStream out)
java.lang.String indent(int level)
void printNode(java.io.PrintStream out,
edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.Node cur,
int level)
level - This is the nesting level of how many time the printNode function
is recursived called. The real value will be start from 0, means the first
level of calling.
void insertChild(edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.Node parent_node,
edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.Node child_node,
java.lang.String child_position)
edu.wpi.cs.DSRG.xmldb.XMLRDBMSUpdate.Node exportTuple(java.lang.String table_name,
java.lang.String iid,
java.lang.String pid,
java.lang.String position,
java.sql.ResultSet tuples,
Table attribute_names)
throws java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||