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.Object
A model writer.
-
-
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 DescriptionModel
getModel()
Returns the model.static SafeTagList
getSafeTags()
Returns the safe tag list.XMLWriterSupport
getWriterSupport()
Returns the writer support object.void
setModel(DescriptionModel model)
Sets the model to be written.void
write(java.io.Writer writer)
Writes a model to the specified writer.protected void
writeClassDescription(java.io.Writer writer, ClassDescription cd)
Writes a class description.protected void
writeCloseComment(java.io.Writer writer, Comments comments)
Writes the close comments from a set of comments.protected void
writeComment(java.io.Writer writer, java.lang.String[] comments)
Writes a sequence of comments.protected void
writeManualMapping(java.io.Writer writer, ManualMappingInfo mi)
Writes a manual mapping to the XML output.protected void
writeMultiplexMapping(java.io.Writer writer, MultiplexMappingInfo mi)
Writes a multiplex mapping to the XML output.protected void
writeOpenComment(java.io.Writer writer, Comments comments)
Writes the open comments from a set of comments.protected void
writeStandardComment(java.io.Writer writer, Comments comments)
Writes a set of comments.protected void
writeTag(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 void
writeTag(java.io.Writer writer, java.lang.String tagName, AttributeList attributes, Comments comments)
Writes a closed (short) tag with eventually nested comments.static void
writeXMLHeader(java.io.Writer writer)
Writes an XML header.
-
-
-
Constructor Detail
-
ModelWriter
public ModelWriter()
Creates a new model writer instance.
-
-
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.IOException
Writes 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.IOException
Writes 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.IOException
Writes a sequence of comments.- Parameters:
writer
- the writer.comments
- the comments (null
ignored).- Throws:
java.io.IOException
- if there is an I/O problem.
-
writeOpenComment
protected void writeOpenComment(java.io.Writer writer, Comments comments) throws java.io.IOException
Writes 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.IOException
Writes 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.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:
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.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:
java.io.IOException
- if there is an I/O problem.
-
write
public void write(java.io.Writer writer) throws java.io.IOException
Writes 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.IOException
Writes 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.IOException
Writes 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.IOException
Writes a class description.- Parameters:
writer
- the writer.cd
- the class description.- 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.
-
-