/** * @author boconno3, elee3 * <p>Exports the applicaition model to store on a file on computer for future use. */ private void exportModel() { String pathOutputFile = view.showInputDialog("Where would you like to save the MATS model?"); try { model.exportMATSModel(pathOutputFile); } catch (Exception exception) { view.showMessageDialog("Exporting file failed - exception: " + exception); } view.appendToProjectTextArea("Export Project Successfuly"); }
/** * @author boconno3, elee3, asaini, rparames * <p>This method will load a XML file and set it as the current project */ private void loadXML() { String pathInputFile = view.showInputDialog("Where would you like to load the MATS model from?"); try { setModel(MATSModel.importFromXmlFile(pathInputFile)); view.setModel(model); view.enableImportedSystemMenuOptions(); } catch (Exception exception) { view.displayError("Importing file failed - exception: " + exception); return; } view.appendToProjectTextArea("Imported Project Successfuly"); }