public class TechnicalSystem_StorageHandler extends java.lang.Object implements PersistenceServiceTechnicalSystem
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TECHNICAL_SYSTEM_FILE_ENCODING |
static java.lang.String |
TECHNICAL_SYSTEM_FILE_SUFFIX_EOM |
static java.lang.String |
TECHNICAL_SYSTEM_FILE_SUFFIX_XML |
| Constructor and Description |
|---|
TechnicalSystem_StorageHandler() |
| Modifier and Type | Method and Description |
|---|---|
int |
getIndexPositionOfMenuItem()
Has to return a desired index position for the JMenuItem to be returned through the current implementation.
|
javax.swing.JMenuItem |
getJMenueItem(PersistenceHandler.PersistenceAction action)
Has to return a JMenuItem for the specified persistence action.
|
java.lang.String |
getTechnicalSystemAsBase64String(TechnicalSystem technicalSystem)
Returns a TechnicalSystem instance as base64 string.
|
java.lang.String |
getTechnicalSystemAsXMLString(TechnicalSystem technicalSystem)
Returns the model of a technical system as XML-string.
|
TechnicalSystem |
getTechnicalSystemFromBase64String(java.lang.String base64EncodedModel)
Returns a TechnicalSystem from a base64 string.
|
TechnicalSystem |
getTechnicalSystemFromEOMFile(java.io.File technicalSystemFile)
Gets the technical system from eom file.
|
TechnicalSystem |
getTechnicalSystemFromXMLFile(java.io.File technicalSystemFile)
Load model from a XML file.
|
TechnicalSystem |
getTechnicalSystemFromXMLString(java.lang.String xmlString)
Gets the technical system from a XML string.
|
TechnicalSystem |
loadModelFromFile(java.io.File technicalSystemFile)
Load model from file.
|
TechnicalSystem |
loadTechnicalSystem(OptionModelController omc,
java.awt.Component invoker)
Load a
TechnicalSystem. |
TechnicalSystem |
loadTechnicalSystem(OptionModelController omc,
java.io.File fileToLoad,
java.awt.Component invoker)
Loads a technical system.
|
boolean |
saveModelAsFile(java.io.File technicalSystemFile,
TechnicalSystem technicalSystem)
Save model as file.
|
boolean |
saveTechnicalSystem(OptionModelController omc,
TechnicalSystem tsSave,
java.awt.Component invoker)
Save a
TechnicalSystem. |
boolean |
saveTechnicalSystemAs(OptionModelController omc,
TechnicalSystem tsSaveAs,
java.awt.Component invoker)
Save as the specified
TechnicalSystem. |
boolean |
saveTechnicalSystemAsEOMFile(java.io.File technicalSystemFile,
TechnicalSystem technicalSystem)
Saves an Instance of a
TechnicalSystem as TXT file. |
boolean |
saveTechnicalSystemAsXMLFile(java.io.File technicalSystemFile,
TechnicalSystem technicalSystem)
Saves an Instance of a
TechnicalSystem as XML file. |
java.io.File |
selectFile(java.awt.Component parentComponent,
java.lang.String caption,
boolean allowNewFolder)
Select file to load or save TechnicalSystem information.
|
public static final java.lang.String TECHNICAL_SYSTEM_FILE_ENCODING
public static final java.lang.String TECHNICAL_SYSTEM_FILE_SUFFIX_XML
public static final java.lang.String TECHNICAL_SYSTEM_FILE_SUFFIX_EOM
public javax.swing.JMenuItem getJMenueItem(PersistenceHandler.PersistenceAction action)
PersistenceServiceActionListener to the menu item, since the
PersistenceHandler will manage to invoke the required actions.getJMenueItem in interface PersistenceServiceaction - the persistence action that has to be executed with the returning menu itempublic int getIndexPositionOfMenuItem()
PersistenceServicegetIndexPositionOfMenuItem in interface PersistenceService#getJMenueItem(PersistenceAction)public TechnicalSystem loadTechnicalSystem(OptionModelController omc, java.awt.Component invoker)
PersistenceServiceTechnicalSystemTechnicalSystem.loadTechnicalSystem in interface PersistenceServiceTechnicalSystemomc - the current OptionModelControllerinvoker - the invoker componentpublic TechnicalSystem loadTechnicalSystem(OptionModelController omc, java.io.File fileToLoad, java.awt.Component invoker)
omc - the current OptionModelControllerfileToLoad - the file to load (may be null. If file selection will be shown)invoker - the invoker componentpublic boolean saveTechnicalSystem(OptionModelController omc, TechnicalSystem tsSave, java.awt.Component invoker)
PersistenceServiceTechnicalSystemTechnicalSystem.saveTechnicalSystem in interface PersistenceServiceTechnicalSystemomc - the current OptionModelControllertsSave - the TechnicalSystem to saveinvoker - the invoker componentpublic boolean saveTechnicalSystemAs(OptionModelController omc, TechnicalSystem tsSaveAs, java.awt.Component invoker)
PersistenceServiceTechnicalSystemTechnicalSystem.saveTechnicalSystemAs in interface PersistenceServiceTechnicalSystemomc - the current OptionModelControllertsSaveAs - the TechnicalSystem to save-asinvoker - the invoker componentpublic java.io.File selectFile(java.awt.Component parentComponent,
java.lang.String caption,
boolean allowNewFolder)
parentComponent - the parent componentcaption - the captionallowNewFolder - the allow new folderpublic TechnicalSystem loadModelFromFile(java.io.File technicalSystemFile)
technicalSystemFile - the technical system filepublic boolean saveModelAsFile(java.io.File technicalSystemFile,
TechnicalSystem technicalSystem)
technicalSystemFile - the technical system filetechnicalSystem - the technical systempublic TechnicalSystem getTechnicalSystemFromXMLFile(java.io.File technicalSystemFile)
technicalSystemFile - the file of the technical systempublic boolean saveTechnicalSystemAsXMLFile(java.io.File technicalSystemFile,
TechnicalSystem technicalSystem)
TechnicalSystem as XML file.technicalSystemFile - the file to that the model has be savedtechnicalSystem - the technical systempublic TechnicalSystem getTechnicalSystemFromXMLString(java.lang.String xmlString)
xmlString - the XML stringpublic java.lang.String getTechnicalSystemAsXMLString(TechnicalSystem technicalSystem)
technicalSystem - the instance of the technical systempublic TechnicalSystem getTechnicalSystemFromEOMFile(java.io.File technicalSystemFile)
technicalSystemFile - the technical system filepublic boolean saveTechnicalSystemAsEOMFile(java.io.File technicalSystemFile,
TechnicalSystem technicalSystem)
TechnicalSystem as TXT file.technicalSystemFile - the file to that the model has be savedtechnicalSystem - the technical systempublic java.lang.String getTechnicalSystemAsBase64String(TechnicalSystem technicalSystem)
technicalSystem - the technical systempublic TechnicalSystem getTechnicalSystemFromBase64String(java.lang.String base64EncodedModel)
base64EncodedModel - the base64 encoded model