Class ModelWriter
java.lang.Object
org.jfree.xml.generator.ModelWriter
- Direct Known Subclasses:
SplittingModelWriter
A model writer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetModel()Returns the model.static SafeTagListReturns the safe tag list.Returns the writer support object.voidsetModel(DescriptionModel model) Sets the model to be written.voidWrites a model to the specified writer.protected voidwriteClassDescription(Writer writer, ClassDescription cd) Writes a class description.protected voidwriteCloseComment(Writer writer, Comments comments) Writes the close comments from a set of comments.protected voidwriteComment(Writer writer, String[] comments) Writes a sequence of comments.protected voidwriteManualMapping(Writer writer, ManualMappingInfo mi) Writes a manual mapping to the XML output.protected voidwriteMultiplexMapping(Writer writer, MultiplexMappingInfo mi) Writes a multiplex mapping to the XML output.protected voidwriteOpenComment(Writer writer, Comments comments) Writes the open comments from a set of comments.protected voidwriteStandardComment(Writer writer, Comments comments) Writes a set of comments.protected voidWrites a closed (short) tag with eventually nested comments.protected voidwriteTag(Writer writer, String tagName, AttributeList attributes, Comments comments) Writes a closed (short) tag with eventually nested comments.static voidwriteXMLHeader(Writer writer) Writes an XML header.
-
Constructor Details
-
ModelWriter
public ModelWriter()Creates a new model writer instance.
-
-
Method Details
-
getSafeTags
-
getModel
-
setModel
Sets the model to be written.- Parameters:
model- the model.
-
writeXMLHeader
Writes an XML header.- Parameters:
writer- the writer.- Throws:
IOException- if there is an I/O problem.
-
writeStandardComment
Writes a set of comments.- Parameters:
writer- the writer.comments- a set of comments.- Throws:
IOException- if there is an I/O problem.
-
writeComment
Writes a sequence of comments.- Parameters:
writer- the writer.comments- the comments (nullignored).- Throws:
IOException- if there is an I/O problem.
-
writeOpenComment
Writes the open comments from a set of comments.- Parameters:
writer- the writer.comments- the set of comments.- Throws:
IOException- if there is an I/O problem.
-
writeCloseComment
Writes the close comments from a set of comments.- Parameters:
writer- the writer.comments- the set of comments.- Throws:
IOException- if there is an I/O problem.
-
writeTag
protected void writeTag(Writer writer, String tagName, AttributeList attributes, Comments comments) throws IOException Writes a closed (short) tag with eventually nested comments.- Parameters:
writer- the writer.tagName- the tag name.attributes- the attributes.comments- the comments.- Throws:
IOException- if there is an I/O problem.
-
writeTag
protected void writeTag(Writer writer, String tagName, String attribute, String value, Comments comments) throws IOException Writes 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:
IOException- if there is an I/O problem.
-
write
Writes a model to the specified writer.- Parameters:
writer- the writer.- Throws:
IOException- if there is an I/O problem.
-
writeManualMapping
Writes a manual mapping to the XML output.- Parameters:
writer- the writer.mi- the mapping info.- Throws:
IOException- if there is an I/O problem.
-
writeMultiplexMapping
Writes a multiplex mapping to the XML output.- Parameters:
writer- the writer.mi- the mapping info.- Throws:
IOException- if there is an I/O problem.
-
writeClassDescription
Writes a class description.- Parameters:
writer- the writer.cd- the class description.- Throws:
IOException- if there is an I/O problem.
-
getWriterSupport
Returns the writer support object.- Returns:
- The writer support object.
-