Package org.jfree.xml.generator
Class ModelWriter
- java.lang.Object
-
- org.jfree.xml.generator.ModelWriter
-
- Direct Known Subclasses:
SplittingModelWriter
public class ModelWriter extends java.lang.ObjectA model writer.
-
-
Field Summary
Fields Modifier and Type Field Description private DescriptionModelmodelA model containing class descriptions.private static SafeTagListsafeTagsThe tags that can be split.private XMLWriterSupportwriterSupportA support class for writing XML tags.
-
Constructor Summary
Constructors Constructor Description ModelWriter()Creates a new model writer instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DescriptionModelgetModel()Returns the model.static SafeTagListgetSafeTags()Returns the safe tag list.XMLWriterSupportgetWriterSupport()Returns the writer support object.voidsetModel(DescriptionModel model)Sets the model to be written.voidwrite(java.io.Writer writer)Writes a model to the specified writer.protected voidwriteClassDescription(java.io.Writer writer, ClassDescription cd)Writes a class description.protected voidwriteCloseComment(java.io.Writer writer, Comments comments)Writes the close comments from a set of comments.protected voidwriteComment(java.io.Writer writer, java.lang.String[] comments)Writes a sequence of comments.protected voidwriteManualMapping(java.io.Writer writer, ManualMappingInfo mi)Writes a manual mapping to the XML output.protected voidwriteMultiplexMapping(java.io.Writer writer, MultiplexMappingInfo mi)Writes a multiplex mapping to the XML output.protected voidwriteOpenComment(java.io.Writer writer, Comments comments)Writes the open comments from a set of comments.private voidwritePropertyInfo(java.io.Writer writer, PropertyInfo ipi)Writes a property info element.protected voidwriteStandardComment(java.io.Writer writer, Comments comments)Writes a set of comments.protected voidwriteTag(java.io.Writer writer, java.lang.String tagName, java.lang.String attribute, java.lang.String value, Comments comments)Writes a closed (short) tag with eventually nested comments.protected voidwriteTag(java.io.Writer writer, java.lang.String tagName, AttributeList attributes, Comments comments)Writes a closed (short) tag with eventually nested comments.static voidwriteXMLHeader(java.io.Writer writer)Writes an XML header.
-
-
-
Field Detail
-
safeTags
private static SafeTagList safeTags
The tags that can be split.
-
writerSupport
private XMLWriterSupport writerSupport
A support class for writing XML tags.
-
model
private DescriptionModel model
A model containing class descriptions.
-
-
Method Detail
-
getSafeTags
public static SafeTagList getSafeTags()
Returns the safe tag list.- Returns:
- The safe tag list.
-
getModel
public DescriptionModel getModel()
Returns the model.- Returns:
- The model.
-
setModel
public void setModel(DescriptionModel model)
Sets the model to be written.- Parameters:
model- the model.
-
writeXMLHeader
public static void writeXMLHeader(java.io.Writer writer) throws java.io.IOExceptionWrites an XML header.- Parameters:
writer- the writer.- Throws:
java.io.IOException- if there is an I/O problem.
-
writeStandardComment
protected void writeStandardComment(java.io.Writer writer, Comments comments) throws java.io.IOExceptionWrites a set of comments.- Parameters:
writer- the writer.comments- a set of comments.- Throws:
java.io.IOException- if there is an I/O problem.
-
writeComment
protected void writeComment(java.io.Writer writer, java.lang.String[] comments) throws java.io.IOExceptionWrites a sequence of comments.- Parameters:
writer- the writer.comments- the comments (nullignored).- Throws:
java.io.IOException- if there is an I/O problem.
-
writeOpenComment
protected void writeOpenComment(java.io.Writer writer, Comments comments) throws java.io.IOExceptionWrites the open comments from a set of comments.- Parameters:
writer- the writer.comments- the set of comments.- Throws:
java.io.IOException- if there is an I/O problem.
-
writeCloseComment
protected void writeCloseComment(java.io.Writer writer, Comments comments) throws java.io.IOExceptionWrites the close comments from a set of comments.- Parameters:
writer- the writer.comments- the set of comments.- Throws:
java.io.IOException- if there is an I/O problem.
-
writeTag
protected void writeTag(java.io.Writer writer, java.lang.String tagName, AttributeList attributes, Comments comments) throws java.io.IOExceptionWrites a closed (short) tag with eventually nested comments.- Parameters:
writer- the writer.tagName- the tag name.attributes- the attributes.comments- the comments.- Throws:
java.io.IOException- if there is an I/O problem.
-
writeTag
protected void writeTag(java.io.Writer writer, java.lang.String tagName, java.lang.String attribute, java.lang.String value, Comments comments) throws java.io.IOExceptionWrites a closed (short) tag with eventually nested comments.- Parameters:
writer- the writer.tagName- the tag name.attribute- the attribute name.value- the attribute value.comments- the comments.- Throws:
java.io.IOException- if there is an I/O problem.
-
write
public void write(java.io.Writer writer) throws java.io.IOExceptionWrites a model to the specified writer.- Parameters:
writer- the writer.- Throws:
java.io.IOException- if there is an I/O problem.
-
writeManualMapping
protected void writeManualMapping(java.io.Writer writer, ManualMappingInfo mi) throws java.io.IOExceptionWrites a manual mapping to the XML output.- Parameters:
writer- the writer.mi- the mapping info.- Throws:
java.io.IOException- if there is an I/O problem.
-
writeMultiplexMapping
protected void writeMultiplexMapping(java.io.Writer writer, MultiplexMappingInfo mi) throws java.io.IOExceptionWrites a multiplex mapping to the XML output.- Parameters:
writer- the writer.mi- the mapping info.- Throws:
java.io.IOException- if there is an I/O problem.
-
writeClassDescription
protected void writeClassDescription(java.io.Writer writer, ClassDescription cd) throws java.io.IOExceptionWrites a class description.- Parameters:
writer- the writer.cd- the class description.- Throws:
java.io.IOException- if there is an I/O problem.
-
writePropertyInfo
private void writePropertyInfo(java.io.Writer writer, PropertyInfo ipi) throws java.io.IOExceptionWrites a property info element.- Parameters:
writer- the writer.ipi- the property info.- Throws:
java.io.IOException- if there is an I/O problem.
-
getWriterSupport
public XMLWriterSupport getWriterSupport()
Returns the writer support object.- Returns:
- The writer support object.
-
-