Package org.dbunit.dataset.xml
Class FlatDtdWriter
java.lang.Object
org.dbunit.dataset.xml.FlatDtdWriter
Writes a flat DTD document describing a dataset's tables and columns.
- Since:
- Jun 13, 2003
- Version:
- $Revision$ $Date$
- Author:
- Manuel Laflamme, Last changed by: $Author$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFlatDtdWriter.ContentModelthat renders table names as a pipe-separated choice group.static classAbstract strategy for rendering a DTD element's content model (the part between the parentheses in an <!static classFlatDtdWriter.ContentModelthat renders table names as a comma-separated, ordered sequence. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FlatDtdWriter.ContentModelContent model rendering child elements as a choice, e.g.static final FlatDtdWriter.ContentModelContent model rendering child elements as a sequence, e.g. -
Constructor Summary
ConstructorsConstructorDescriptionFlatDtdWriter(Writer writer) Creates a writer that writes DTD content to the given writer, using the sequence content model. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetContentModel(FlatDtdWriter.ContentModel contentModel) Sets the content model used to render tables' child elements.voidWrites a DTD describing the given dataset's tables and columns.
-
Field Details
-
SEQUENCE
Content model rendering child elements as a sequence, e.g.(A, B, C). -
CHOICE
Content model rendering child elements as a choice, e.g.(A | B | C).
-
-
Constructor Details
-
FlatDtdWriter
Creates a writer that writes DTD content to the given writer, using the sequence content model.- Parameters:
writer- the writer to write to.
-
-
Method Details
-
setContentModel
Sets the content model used to render tables' child elements.- Parameters:
contentModel- the content model to use.
-
write
Writes a DTD describing the given dataset's tables and columns.- Parameters:
dataSet- the dataset to write a DTD for.- Throws:
DataSetException- if reading the dataset fails.
-