![]() |
Quadcap Embeddable Database |
Inheritance diagram for com.quadcap.sql.tools.XmlDump:

The XML document has an outer tag of <database>. Each child element then contains one table row, where the tag name specifies the table name; each child element of this tag contains one column value where the tag name specifies the column name. Most object are represented in their standard Java toString style representation, except binary objects, which are dumped in hexadecimal. (Base-64 would probably be better...)
Definition at line 98 of file XmlDump.java.
Public Member Functions | |
| XmlDump () | |
| No-argument constructor. | |
| XmlDump (Connection conn) | |
| Construct an XmlDump object bound to the specified connection. | |
| XmlDump (Connection conn, int indentLevel) | |
| Construct an XmlDump object bound to the specified connection, and with a specified initial indent level. | |
| void | setConnection (Connection conn) |
| Set the dumper's database connection. | |
| Connection | getConnection () |
| Get the dumper's database connection. | |
| void | dumpTableForeignKeys (Writer w, String tableName) throws SQLException, IOException |
| Dump the SQL foreign key constraints for the specified table. | |
| void | dumpTableDefinition (Writer w, String tableName) throws SQLException, IOException |
| Dump the SQL table definition for the specified table. | |
| void | dumpTable (Writer w, String tableName) throws IOException, SQLException |
| Dump the rows of the specified table to the output stream in XML format. | |
| void | dumpTables (Writer w) throws IOException, SQLException |
| Dump all of the tables in the database which is referenced by the current connection object to the specified output stream. | |
| void | backup (java.sql.Connection conn, Writer w) throws IOException, SQLException |
| A convenience function that sets the current connection and dumps the database in one go. | |
Static Public Member Functions | |
| Connection | makeConnection () throws Exception |
| Establish a database connection based on the settings of system properties. | |
| void | main (String[] args) |
| A main program which allows this function to be run as a command-line application for doing an off-line dump. | |
Package Functions | |
| final void | beginTag (Writer w, String tag) throws IOException |
| final void | endTag (Writer w, String tag) throws IOException |
| final void | writeString (Writer w, String str) throws IOException |
| final void | writeBinaryStream (Writer w, InputStream is) throws IOException |
| final void | writeCharacterStream (Writer w, Reader r) throws IOException |
| final void | writeBinary (Writer w, Object obj) throws IOException |
| final void | writeValue (Writer w, Object obj, int jdbcType) throws SQLException, IOException |
| List | parseViewDef (String s) |
| void | dumpViewDefinitions (Writer w) throws SQLException, IOException |
| void | dumpIndexDefinitions (Writer w, String tableName) throws SQLException, IOException |
| final Iterator | orderTables () throws SQLException |
| Hashtable | getTypes () throws SQLException |
| DbType | getType (int type) throws SQLException |
Package Attributes | |
| Connection | conn |
| int | indentLevel = 0 |
| String | lineSep |
| boolean | wasBegin = false |
| boolean | wasEnd = false |
| Hashtable | types = null |
Static Package Attributes | |
| final String | charsLt = "<" |
| final String | charsGt = ">" |
| final String | charsAmp = "&" |
| final char[] | hexBytes |
|
|
No-argument constructor.
The object so constructed needs a Definition at line 109 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.lineSep. Referenced by com.quadcap.sql.tools.XmlDump.main(). |
|
|
Construct an XmlDump object bound to the specified connection.
Definition at line 118 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.lineSep. |
|
||||||||||||
|
Construct an XmlDump object bound to the specified connection, and with a specified initial indent level.
Definition at line 131 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.lineSep. |
|
||||||||||||
|
A convenience function that sets the current connection and dumps the database in one go.
Definition at line 809 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.backup(), and com.quadcap.sql.tools.XmlDump.conn. Referenced by com.quadcap.sql.tools.XmlDump.backup(). |
|
||||||||||||
|
Definition at line 155 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.beginTag(), com.quadcap.sql.tools.XmlDump.indentLevel, com.quadcap.sql.tools.XmlDump.lineSep, com.quadcap.sql.tools.XmlDump.wasBegin, and com.quadcap.sql.tools.XmlDump.wasEnd. Referenced by com.quadcap.sql.tools.XmlDump.beginTag(). |
|
||||||||||||
|
Definition at line 374 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.conn, and com.quadcap.sql.tools.XmlDump.dumpIndexDefinitions(). Referenced by com.quadcap.sql.tools.XmlDump.dumpIndexDefinitions(). |
|
||||||||||||
|
Dump the rows of the specified table to the output stream in XML format. Each row is dumped as an XML element with the tag name equal to the table name. Each non-null column is dumped as a sub-element with the tag name equal to the column name.
Definition at line 711 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.conn, and com.quadcap.sql.tools.XmlDump.dumpTable(). Referenced by com.quadcap.sql.tools.XmlDump.dumpTable(). |
|
||||||||||||
|
Dump the SQL table definition for the specified table.
Definition at line 602 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.conn, com.quadcap.sql.tools.XmlDump.dumpTableDefinition(), com.quadcap.sql.tools.XmlDump.DbType.getCreateParams(), com.quadcap.sql.tools.XmlDump.DbType.getTypePrefix(), and com.quadcap.sql.tools.XmlDump.DbType.getTypeSuffix(). Referenced by com.quadcap.sql.tools.XmlDump.dumpTableDefinition(). |
|
||||||||||||
|
Dump the SQL foreign key constraints for the specified table.
Definition at line 532 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.conn, and com.quadcap.sql.tools.XmlDump.dumpTableForeignKeys(). Referenced by com.quadcap.sql.tools.XmlDump.dumpTableForeignKeys(). |
|
|
Dump all of the tables in the database which is referenced by the current connection object to the specified output stream.
This routine writes a well-formed XML document, with a document element named This routine first constructs a graph of the foreign table reference constraints, and attempts to output base tables before dependant tables, so that the resulting file can be imported without causing foreign key integrity violations.
Definition at line 765 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.dumpTables(), and com.quadcap.sql.tools.XmlDump.orderTables(). Referenced by com.quadcap.sql.tools.XmlDump.dumpTables(), and com.quadcap.sql.tools.XmlDump.main(). |
|
|
Definition at line 333 of file XmlDump.java. References com.quadcap.util.collections.DiGraph.addArc(), com.quadcap.sql.tools.XmlDump.conn, com.quadcap.sql.tools.XmlDump.dumpViewDefinitions(), and com.quadcap.util.collections.DiGraph.levelize(). Referenced by com.quadcap.sql.tools.XmlDump.dumpViewDefinitions(). |
|
||||||||||||
|
Definition at line 166 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.endTag(), com.quadcap.sql.tools.XmlDump.indentLevel, com.quadcap.sql.tools.XmlDump.lineSep, com.quadcap.sql.tools.XmlDump.wasBegin, and com.quadcap.sql.tools.XmlDump.wasEnd. Referenced by com.quadcap.sql.tools.XmlDump.endTag(). |
|
|
Get the dumper's database connection.
Definition at line 151 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.conn. |
|
|
Definition at line 519 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.getType(), com.quadcap.sql.tools.XmlDump.getTypes(), and com.quadcap.sql.tools.XmlDump.types. Referenced by com.quadcap.sql.tools.XmlDump.getType(). |
|
|
Definition at line 502 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.conn, and com.quadcap.sql.tools.XmlDump.types. Referenced by com.quadcap.sql.tools.XmlDump.getType(). |
|
|
A main program which allows this function to be run as a command-line application for doing an off-line dump.
The name of the output file is specified as the argument. If the name of the output file ends with
Definition at line 895 of file XmlDump.java. References com.quadcap.sql.Connection.close(), com.quadcap.sql.tools.XmlDump.dumpTables(), com.quadcap.sql.tools.XmlDump.main(), com.quadcap.sql.tools.XmlDump.makeConnection(), and com.quadcap.sql.tools.XmlDump.XmlDump(). Referenced by com.quadcap.sql.tools.XmlDump.main(). |
|
|
Establish a database connection based on the settings of system properties. The following system properties are used to establish the database connection:
Definition at line 852 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.main(). |
|
|
Definition at line 427 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.conn. Referenced by com.quadcap.sql.tools.XmlDump.dumpTables(). |
|
|
Definition at line 307 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.parseViewDef(). Referenced by com.quadcap.sql.tools.XmlDump.parseViewDef(). |
|
|
Set the dumper's database connection.
Definition at line 142 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.setConnection(). Referenced by com.quadcap.sql.tools.XmlDump.setConnection(). |
|
||||||||||||
|
Definition at line 237 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.hexBytes, and com.quadcap.sql.tools.XmlDump.writeBinary(). Referenced by com.quadcap.sql.tools.XmlDump.writeBinary(). |
|
||||||||||||
|
Definition at line 209 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.hexBytes, and com.quadcap.sql.tools.XmlDump.writeBinaryStream(). Referenced by com.quadcap.sql.tools.XmlDump.writeBinaryStream(). |
|
||||||||||||
|
Definition at line 217 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.charsAmp, com.quadcap.sql.tools.XmlDump.charsGt, com.quadcap.sql.tools.XmlDump.charsLt, and com.quadcap.sql.tools.XmlDump.writeCharacterStream(). Referenced by com.quadcap.sql.tools.XmlDump.writeCharacterStream(). |
|
||||||||||||
|
Definition at line 184 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.charsAmp, com.quadcap.sql.tools.XmlDump.charsGt, com.quadcap.sql.tools.XmlDump.charsLt, com.quadcap.sql.tools.XmlDump.wasBegin, com.quadcap.sql.tools.XmlDump.wasEnd, and com.quadcap.sql.tools.XmlDump.writeString(). Referenced by com.quadcap.sql.tools.XmlDump.writeString(). |
|
||||||||||||||||
|
Definition at line 252 of file XmlDump.java. References com.quadcap.sql.tools.XmlDump.writeValue(). Referenced by com.quadcap.sql.tools.XmlDump.writeValue(). |
|
|
Definition at line 182 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.writeCharacterStream(), and com.quadcap.sql.tools.XmlDump.writeString(). |
|
|
Definition at line 181 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.writeCharacterStream(), and com.quadcap.sql.tools.XmlDump.writeString(). |
|
|
Definition at line 180 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.writeCharacterStream(), and com.quadcap.sql.tools.XmlDump.writeString(). |
|
|
|
Initial value:
Definition at line 205 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.writeBinary(), and com.quadcap.sql.tools.XmlDump.writeBinaryStream(). |
|
|
Definition at line 100 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.beginTag(), and com.quadcap.sql.tools.XmlDump.endTag(). |
|
|
Definition at line 101 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.beginTag(), com.quadcap.sql.tools.XmlDump.endTag(), and com.quadcap.sql.tools.XmlDump.XmlDump(). |
|
|
Definition at line 500 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.getType(), and com.quadcap.sql.tools.XmlDump.getTypes(). |
|
|
Definition at line 102 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.beginTag(), com.quadcap.sql.tools.XmlDump.endTag(), and com.quadcap.sql.tools.XmlDump.writeString(). |
|
|
Definition at line 103 of file XmlDump.java. Referenced by com.quadcap.sql.tools.XmlDump.beginTag(), com.quadcap.sql.tools.XmlDump.endTag(), and com.quadcap.sql.tools.XmlDump.writeString(). |