ides.api.plugin.io
Interface ImportExportPlugin


public interface ImportExportPlugin

Interface for plugins which import/export DESModels.

Author:
christiansilvano, Lenko Grigrov

Method Summary
 void exportFile(java.io.File src, java.io.File dst)
          Export a DESModel into a different format.
 java.lang.String getFileDescription()
          Return a human readable description of the file format supported by the plugin.
 java.lang.String getFileExtension()
          Return a string with the file extension of the foreign model format.
 void importFile(java.io.File src, java.io.File dst)
          Import a DES model from a different format.
 

Method Detail

exportFile

void exportFile(java.io.File src,
                java.io.File dst)
                throws FormatTranslationException
Export a DESModel into a different format. The model is provided as an IDES file. It is OK to overwrite the destination as the user's permission has been requested.

The persistence of the source file after the method call should not be assumed.

Parameters:
src - a pointer to the IDES file with the DES model to export
dst - a pointer to the file where output should be written
Throws:
FormatTranslationException - when there is a problem exporting the model

importFile

void importFile(java.io.File src,
                java.io.File dst)
                throws FormatTranslationException
Import a DES model from a different format. The DES model has to be saved in an IDES file. It is OK to overwrite the destination as the user's permission has been requested.

The persistence of the destination file after the method call should not be assumed.

Parameters:
src - a pointer to the file from where the model has to be read
dst - a pointer to a file where to output the IDES model
Throws:
FormatTranslationException - when there is a problem importing the model

getFileDescription

java.lang.String getFileDescription()
Return a human readable description of the file format supported by the plugin.

Returns:
a human readable description of the file format supported by the plugin

getFileExtension

java.lang.String getFileExtension()
Return a string with the file extension of the foreign model format. E.g., "jpg" if the plugin exports to JPEG images.

Returns:
a string with the file extension of the foreign model format