|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.betwixt.XMLEventNotifier org.apache.torque.betwixt.Exporter
public class Exporter
Support for converting Torque (and other Betwixted mapped objects) in a Dataset object into XML format. It extends XMLEventNotifier, but does not make any notification calls.
Field Summary |
---|
Fields inherited from class org.apache.torque.betwixt.XMLEventNotifier |
---|
ACTION_ADD, ACTION_DELETE, ACTION_ERROR, ACTION_INFO, ACTION_TYPE, ACTION_UPDATE, EXPORT_END, EXPORT_RECORD, EXPORT_START, IMPORT_END, IMPORT_START |
Constructor Summary | |
---|---|
Exporter()
|
Method Summary | |
---|---|
org.apache.commons.betwixt.io.BeanWriter |
createBeanWriter(java.io.Writer outputWriter,
Resolver resolver)
Create the BeanWriter object to use to write data out. |
void |
exportData(Dataset dataset,
java.io.Writer outputWriter,
Resolver resolver)
Write the records in a dataset to XML |
void |
writeData(Dataset dataset,
org.apache.commons.betwixt.io.BeanWriter beanWriter)
Write the records in this dataset to XML |
void |
writeHeaderInfo(org.apache.commons.betwixt.io.BeanWriter beanWriter,
Resolver resolver)
Calls the full writeHeaderInfo method with "dataset" as the default element and uses the resolver information to create a SYSTEM Doctype heading. |
void |
writeHeaderInfo(org.apache.commons.betwixt.io.BeanWriter beanWriter,
Resolver resolver,
java.lang.String rootElement,
boolean isSystem,
java.lang.String publicId,
java.lang.String uri)
Writes the standard xml version processing info and a custom DOCTYPE header to the XML output file. |
Methods inherited from class org.apache.torque.betwixt.XMLEventNotifier |
---|
deregisterListener, getListeners, notifyListeners, registerListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Exporter()
Method Detail |
---|
public void exportData(Dataset dataset, java.io.Writer outputWriter, Resolver resolver) throws java.io.IOException, java.beans.IntrospectionException, org.xml.sax.SAXException, java.lang.Exception
dataset
- The records to export.outputWriter
- The writer that will get the XML.resolver
- Resolve various information requirements.
java.io.IOException
java.beans.IntrospectionException
org.xml.sax.SAXException
java.lang.Exception
public void writeHeaderInfo(org.apache.commons.betwixt.io.BeanWriter beanWriter, Resolver resolver) throws java.io.IOException, java.lang.IllegalStateException
java.io.IOException
java.lang.IllegalStateException
public void writeHeaderInfo(org.apache.commons.betwixt.io.BeanWriter beanWriter, Resolver resolver, java.lang.String rootElement, boolean isSystem, java.lang.String publicId, java.lang.String uri) throws java.io.IOException, java.lang.IllegalStateException
beanWriter
- The output writerresolver
- The resolver object with DTD info set.rootElement
- The root element of the data that will be output,
e.g. dataset.isSystem
- If true, the DOCTYPE will be a "System" format and not
a public ID format.publicId
- The public ID to use if needed. Can be null if isSystem
is true.uri
- The URI to the DTD file to use for validation. If null,
the Resolver will be used.
java.io.IOException
java.lang.IllegalStateException
public void writeData(Dataset dataset, org.apache.commons.betwixt.io.BeanWriter beanWriter) throws java.io.IOException, java.beans.IntrospectionException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
java.beans.IntrospectionException
public org.apache.commons.betwixt.io.BeanWriter createBeanWriter(java.io.Writer outputWriter, Resolver resolver) throws java.io.IOException, java.beans.IntrospectionException, org.xml.sax.SAXException, java.lang.Exception
outputWriter
- The writer that get the XML output.resolver
- A resolver object to locate needed information.
java.io.IOException
java.beans.IntrospectionException
org.xml.sax.SAXException
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |