|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.dataset.io.schema.XMLDataSetSchemaWriter
public class XMLDataSetSchemaWriter
Writes the schema for a DataSet
out as an XML Schema.
Canonical use:
Writer writer = new PrintWriter(System.out); XMLDataSetSchemaWriter xmlWriter = new XMLDataSetSchemaWriter(writer); xmlWriter.writeDataSet(ds);
You can also use the static DataSetUtility
methods, like
DataSetUtility.writeDataSetAsXml(OutputStream, DataSet)
for a one-line operation.
Constructor Summary | |
---|---|
XMLDataSetSchemaWriter(java.io.OutputStream os)
Creates a new instance of XMLDataSetSchemaWriter for a given OutputStream . |
|
XMLDataSetSchemaWriter(java.io.Writer writer)
Creates a new instance of XMLDataSetSchemaWriter for a given Writer . |
Method Summary | |
---|---|
void |
writeDataSet(DataSet ds)
Writes the complete DataSet schema out as an XML Schema to the OutputStream
or Writer this class was constructed with. |
void |
writeDataSet(DataSet ds,
java.lang.String... tableNames)
Writes the DataSet schema out as an XML Schema to the OutputStream
or Writer this class was constructed with for the tables listed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLDataSetSchemaWriter(java.io.OutputStream os)
XMLDataSetSchemaWriter
for a given OutputStream
.
os
- The OutputStream
to write to; must be open. Will not be closed by this class. The
OutputStream
will be wrapped in a PrintWriter
so line separation
will be environment-specific.public XMLDataSetSchemaWriter(java.io.Writer writer)
XMLDataSetSchemaWriter
for a given Writer
.
writer
- The Writer
to write to; must be open. Will not be closed by this class. The
writer will be wrapped in a PrintWriter
so line separation will be
environment-specific.Method Detail |
---|
public void writeDataSet(DataSet ds) throws SchemaWriterException
DataSet
schema out as an XML Schema to the OutputStream
or Writer
this class was constructed with.
writeDataSet
in interface DataSetSchemaWriter
ds
- The DataSet
to write out as a Schema.
org.jdesktop.dataset.io.SchemaWriterException
- If an error occurred while writing the schema.
SchemaWriterException
- If any error occurs while writing the schema.public void writeDataSet(DataSet ds, java.lang.String... tableNames) throws SchemaWriterException
DataSet
schema out as an XML Schema to the OutputStream
or Writer
this class was constructed with for the tables listed.
writeDataSet
in interface DataSetSchemaWriter
ds
- The DataSet
to write as a schema.tableNames
- The DataTable
names to include in the schema; includes their relations
.
org.jdesktop.dataset.io.SchemaWriterException
- If an error occurred while dumping.
SchemaWriterException
- If any error occurs while exporting the schema.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |