Class XMLWriter

java.lang.Object
mgui.io.FileWriter
mgui.io.standard.xml.XMLWriter
All Implemented Interfaces:
InterfaceIO, IconObject
Direct Known Subclasses:
ShapeModel3DWriter, WorkspaceWriter

public abstract class XMLWriter
extends FileWriter
Writes an XML object (i.e., any instance of XMLObject). Provides generic implementations which may be overridden by subclasses if necessary. The XML type determines how the object (and any member objects) will be written. This gives the option to either write an object fully to XML, or as a reference to a URL at which the data is stored (a much better option for large objects which are better stored as binary or compressed files, and for which a loader exists). The possible XML types are:
  1. Normal: Objects are written by reference if possible, fully otherwise
  2. Full: Objects are fully written
  3. Reference: Objects are written by reference if possible, short otherwise
  4. Short: Objects are written in short form
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Constructor Details

    • XMLWriter

      public XMLWriter()
  • Method Details

    • writeObject

      public boolean writeObject​(XMLOutputOptions options, ProgressUpdater progress_bar) throws java.io.IOException
      Writes an XML object given options.
      Parameters:
      options -
      progress_bar -
      Returns:
      Throws:
      java.io.IOException
    • writeXMLObject

      protected void writeXMLObject​(XMLOutputOptions options, ProgressUpdater progress) throws java.io.IOException
      Write the object specified in options.
      Parameters:
      options -
      progress -
      Throws:
      java.io.IOException