Class XMLArchiver
java.lang.Object
common.xml.XMLArchiver
- All Implemented Interfaces:
GuiXMLConstants
Title: XML Archiver
Description: Used to save and load model information to be used for the simulation and for the save/load capability.
- Author:
- Bertoli Marco Date: 22-lug-2005 Time: 13.47.51
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringArchive root attribute holding the JMT version that saved the file.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, String documentName) Returns a new Archive XML Document used to store simulation and GUI datastatic ElementgetGuiFromArchiveDocument(Document archive) Returns a Gui information data Element, given an input archive in Document format.static ElementgetResultsFromArchiveDocument(Document archive) Returns Results information data Element, given an input archive in Document format.static ElementgetSimFromArchiveDocument(Document archive) Returns a simulation data Element, given an input archive in Document format.static voidloadModel(File archiveName, CommonModel model) Loads an archive into specified CommonModel.static voidsaveModel(File archiveName, CommonModel model) Saves JMT Archive storing informations for simulator and for the gui
-
Field Details
-
XML_ARCHIVE_A_JMT_VERSION
Archive root attribute holding the JMT version that saved the file. Mirrored in legacyxml.LegacyXmlExporter.- See Also:
-
-
Constructor Details
-
XMLArchiver
public XMLArchiver()
-
-
Method Details
-
saveModel
Saves JMT Archive storing informations for simulator and for the gui- Parameters:
archiveName- Handler to the archive to be createdmodel- data structure
-
loadModel
Loads an archive into specified CommonModel. If CommonModel is a JMODELModel, loads gui informations too.- Parameters:
archiveName- name of the archive to be openedmodel- CommonModel where all loaded informations should be stored Modified by Francesco D'Aquino
-
getDocument
Returns a new Archive XML Document used to store simulation and GUI data- Parameters:
model- data structuredocumentName- name of created document (to be set into root element)- Returns:
- created Document
-
getSimFromArchiveDocument
-
getGuiFromArchiveDocument
-
getResultsFromArchiveDocument
-