Class GuiXMLWriter

java.lang.Object
common.xml.GuiXMLWriter
All Implemented Interfaces:
GuiXMLConstants

public class GuiXMLWriter extends Object implements GuiXMLConstants

Title: Gui XML Writer

Description: Writes JModel GUI specific information to an XML file. This class provides methods for model save.

Author:
Bertoli Marco Date: 22-lug-2005 Time: 15.54.48
  • Constructor Details

    • GuiXMLWriter

      public GuiXMLWriter()
  • Method Details

    • writeXML

      public static void writeXML(String fileName, CommonModel model)
      Writes gui model informations into an XML file
      Parameters:
      fileName - name of the file to be created
      model - data structure
    • writeXML

      public static void writeXML(File xmlFile, CommonModel model)
      Writes gui model informations into an XML file
      Parameters:
      xmlFile - handler to the file to be created
      model - data structure
    • writeXML

      public static void writeXML(OutputStream out, CommonModel model)
      Writes gui model informations into an XML file
      Parameters:
      out - stream where XML should be written
      model - data structure
    • getDocument

      public static Document getDocument(CommonModel model)
      Returns the entire Document representing GUI data structure.
      Parameters:
      model - data structure
      Returns:
      complete GUI data structure in Document format
    • writeGuiInfos

      protected static void writeGuiInfos(Document guiDoc, CommonModel model)
      Creates root element and adds schema informations to it
      Parameters:
      guiDoc - document root
      model - data structure
    • writeClasses

      protected static void writeClasses(Document doc, Node guiNode, JSimGraphModel model)
      Write informations for user Classes (name and color)
      Parameters:
      doc - document root
      guiNode - parent node where class informations should be added
      model - data structure
    • writeStations

      protected static void writeStations(Document doc, Node guiNode, JSimGraphModel model)
      Write informations for stations (name and position)
      Parameters:
      doc - document root
      guiNode - parent node where station informations should be added
      model - data structure
    • writeConnectionShapes

      protected static void writeConnectionShapes(Document doc, Node guiNode, JSimGraphModel model)
      Write informations for connection shapes
      Parameters:
      doc - document root
      guiNode - parent node where station informations should be added
      model - data structure