|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.wordhoard.swing.calculator.modelutils.ExportUtils
public class ExportUtils
Utilities for exporting user-defined database objects to XML.
| Field Summary | |
|---|---|
protected static FileExtensionFilter |
xmlFilter
XML extension file filter. |
| Constructor Summary | |
|---|---|
protected |
ExportUtils()
Don't allow instantiation but do allow overrides. |
| Method Summary | |
|---|---|
static org.w3c.dom.Element |
addUserDataObjectHeaderToDOM(UserDataObject userDataObject,
org.w3c.dom.Document document)
Export common header information for UserDataObject to DOM document. |
static boolean |
exportObjects(UserDataObject[] objects,
boolean[] exportedOK,
java.lang.String exportFileName,
ProgressReporter progressReporter)
Export a list of objects to XML. |
static boolean |
exportObjects(UserDataObject[] objects,
java.awt.Window parentWindow,
boolean[] exportedOK,
ProgressReporter progressReporter)
Export a list of objects to XML. |
static org.w3c.dom.Document |
newExportDocument()
Create new empty DOM document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static FileExtensionFilter xmlFilter
| Constructor Detail |
|---|
protected ExportUtils()
| Method Detail |
|---|
public static boolean exportObjects(UserDataObject[] objects,
java.awt.Window parentWindow,
boolean[] exportedOK,
ProgressReporter progressReporter)
throws ExportException
objects - The objects to export.parentWindow - Parent window for file dialog.exportedOK - Array of booleans of same length as objects.
On output each element will be set true if
the corresponding object was successfully
persisted, false otherwise.progressReporter - Progress reporter. May be null.
ExportException - to wrap I/O, DOM, etc. errors.
Prompts for a file name to which to export the objects.
public static boolean exportObjects(UserDataObject[] objects,
boolean[] exportedOK,
java.lang.String exportFileName,
ProgressReporter progressReporter)
throws ExportException
objects - Objects to export.exportedOK - Array of booleans of same length as objects.
On output each element will be set true if
the corresponding object was successfully
persisted, false otherwise.exportFileName - File to which to write the exported objects.progressReporter - Progress reporter. May be null.
ExportException public static org.w3c.dom.Document newExportDocument()
public static org.w3c.dom.Element addUserDataObjectHeaderToDOM(UserDataObject userDataObject,
org.w3c.dom.Document document)
userDataObject - User data object to add to DOM document.document - DOM document to which to add user data object.
Must not be null. In most cases,
this document should have a "wordhoard"
node as the root element.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||