Class ModelWriter

java.lang.Object
org.jfree.xml.generator.ModelWriter
Direct Known Subclasses:
SplittingModelWriter

public class ModelWriter extends Object
A model writer.
  • Field Details

    • 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.
  • Constructor Details

    • ModelWriter

      public ModelWriter()
      Creates a new model writer instance.
  • Method Details

    • 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(Writer writer) throws IOException
      Writes an XML header.
      Parameters:
      writer - the writer.
      Throws:
      IOException - if there is an I/O problem.
    • writeStandardComment

      protected void writeStandardComment(Writer writer, Comments comments) throws IOException
      Writes a set of comments.
      Parameters:
      writer - the writer.
      comments - a set of comments.
      Throws:
      IOException - if there is an I/O problem.
    • writeComment

      protected void writeComment(Writer writer, String[] comments) throws IOException
      Writes a sequence of comments.
      Parameters:
      writer - the writer.
      comments - the comments (null ignored).
      Throws:
      IOException - if there is an I/O problem.
    • writeOpenComment

      protected void writeOpenComment(Writer writer, Comments comments) throws IOException
      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

      protected void writeCloseComment(Writer writer, Comments comments) throws IOException
      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

      public void write(Writer writer) throws IOException
      Writes a model to the specified writer.
      Parameters:
      writer - the writer.
      Throws:
      IOException - if there is an I/O problem.
    • writeManualMapping

      protected void writeManualMapping(Writer writer, ManualMappingInfo mi) throws IOException
      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

      protected void writeMultiplexMapping(Writer writer, MultiplexMappingInfo mi) throws IOException
      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

      protected void writeClassDescription(Writer writer, ClassDescription cd) throws IOException
      Writes a class description.
      Parameters:
      writer - the writer.
      cd - the class description.
      Throws:
      IOException - if there is an I/O problem.
    • writePropertyInfo

      private void writePropertyInfo(Writer writer, PropertyInfo ipi) throws IOException
      Writes a property info element.
      Parameters:
      writer - the writer.
      ipi - the property info.
      Throws:
      IOException - if there is an I/O problem.
    • getWriterSupport

      public XMLWriterSupport getWriterSupport()
      Returns the writer support object.
      Returns:
      The writer support object.