Class GuiXMLWriter
java.lang.Object
common.xml.GuiXMLWriter
- All Implemented Interfaces:
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
-
Field Summary
Fields inherited from interface GuiXMLConstants
XML_A_CLASS_COLOR, XML_A_CLASS_NAME, XML_A_CONNECTION_SOURCE, XML_A_CONNECTION_TARGET, XML_A_FIELD_NAME, XML_A_FIELD_VALUE, XML_A_PARAMETRIC_CLASSPATH, XML_A_PARAMETRIC_ENABLED, XML_A_POINT_X, XML_A_POINT_Y, XML_A_POSITION_ANGLE, XML_A_POSITION_ROTATE, XML_A_POSITION_X, XML_A_POSITION_Y, XML_A_SOURCE_X, XML_A_SOURCE_Y, XML_A_STATION_NAME, XML_A_TARGET_X, XML_A_TARGET_Y, XML_ARCHIVE_A_NAME, XML_ARCHIVE_A_TIMESTAMP, XML_ARCHIVE_DOCUMENT_ROOT, XML_ARCHIVE_DOCUMENT_XSD, XML_DOCUMENT_ROOT, XML_DOCUMENT_XSD, XML_E_ARC, XML_E_CLASS, XML_E_CONNECTION_SHAPE, XML_E_FIELD, XML_E_PARAMETRIC, XML_E_POINT, XML_E_POSITION, XML_E_SOURCE, XML_E_STATION, XML_E_TARGET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentgetDocument(CommonModel model) Returns the entire Document representing GUI data structure.protected static voidwriteClasses(Document doc, Node guiNode, JSimGraphModel model) Write informations for user Classes (name and color)protected static voidwriteConnectionShapes(Document doc, Node guiNode, JSimGraphModel model) Write informations for connection shapesprotected static voidwriteGuiInfos(Document guiDoc, CommonModel model) Creates root element and adds schema informations to itprotected static voidwriteStations(Document doc, Node guiNode, JSimGraphModel model) Write informations for stations (name and position)static voidwriteXML(File xmlFile, CommonModel model) Writes gui model informations into an XML filestatic voidwriteXML(OutputStream out, CommonModel model) Writes gui model informations into an XML filestatic voidwriteXML(String fileName, CommonModel model) Writes gui model informations into an XML file
-
Constructor Details
-
GuiXMLWriter
public GuiXMLWriter()
-
-
Method Details
-
writeXML
Writes gui model informations into an XML file- Parameters:
fileName- name of the file to be createdmodel- data structure
-
writeXML
Writes gui model informations into an XML file- Parameters:
xmlFile- handler to the file to be createdmodel- data structure
-
writeXML
Writes gui model informations into an XML file- Parameters:
out- stream where XML should be writtenmodel- data structure
-
getDocument
Returns the entire Document representing GUI data structure.- Parameters:
model- data structure- Returns:
- complete GUI data structure in Document format
-
writeGuiInfos
Creates root element and adds schema informations to it- Parameters:
guiDoc- document rootmodel- data structure
-
writeClasses
Write informations for user Classes (name and color)- Parameters:
doc- document rootguiNode- parent node where class informations should be addedmodel- data structure
-
writeStations
Write informations for stations (name and position)- Parameters:
doc- document rootguiNode- parent node where station informations should be addedmodel- data structure
-
writeConnectionShapes
Write informations for connection shapes- Parameters:
doc- document rootguiNode- parent node where station informations should be addedmodel- data structure
-