|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectides.api.plugin.io.IOPluginManager
public class IOPluginManager
The manager of I/O plugins. Plugins which provide services for the saving/loading of DES models or related meta-data or for the import/export of different file formats must register with this manager in order to be available to the user.
FileIOPlugin,
ImportExportPlugin| Field Summary | |
|---|---|
protected java.util.Comparator<ImportExportPlugin> |
descriptionComparator
Comparator which can be used to sort ImportExportPlugins
lexically according to their file format descriptions. |
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Throws RuntimeException to prevent cloning. |
FileIOPlugin |
getDataLoader(java.lang.String type)
Returns a plugin which is capable of loading a DESModel of the
given type (for example, the type of Finite-State Machines is "FSA"). |
FileIOPlugin |
getDataSaver(java.lang.Class<?> type)
Returns a plugin which is capable of saving DESModels of the
given perspective (e.g. |
java.util.Set<ImportExportPlugin> |
getExporters()
Returns the set of plugins registered to export to other file formats. |
java.util.Set<ImportExportPlugin> |
getExporters(java.lang.Class<?> type)
Returns the set of plugins registered to export DESModels of the
given perspective (e.g., FSAModel) to another file format. |
ImportExportPlugin |
getImporter(java.lang.String description)
Returns the importing plugin which has the given file-format description. |
java.util.Set<ImportExportPlugin> |
getImporters()
Returns the set of plugins registered to import from other file formats. |
FileIOPlugin |
getMetaLoaders(java.lang.String type,
java.lang.String tag)
Returns the plugin registered to load meta-data with the given tag when loading DESModels of the given type (e.g., "FSA"). |
java.util.Set<FileIOPlugin> |
getMetaSavers(java.lang.Class<?> type)
Returns the set of plugins registered to save meta-data when saving DESModels of the given perspective (e.g. |
static IOPluginManager |
instance()
Provides access to the instance of the manager. |
void |
registerDataLoader(FileIOPlugin plugin,
java.lang.String type)
Registers a plugin which can load models of the given type (for example, the type of Finite-State Machines is "FSA"). |
void |
registerDataSaver(FileIOPlugin plugin,
java.lang.Class<?> type)
Registers a plugin which can save DESModels of the given
perspective (e.g., FSAModel). |
void |
registerExport(ImportExportPlugin plugin,
java.lang.Class<?> type)
Registers a plugin which can export DESModels of the given
perspective (e.g., FSAModel) to another file format. |
void |
registerImport(ImportExportPlugin plugin)
Registers a plugin which can import models from other file formats. |
void |
registerMetaLoader(FileIOPlugin plugin,
java.lang.String tag)
Registers a plugin which can load meta-data with the given "tag" for any type of DES models (a generic plugin). |
void |
registerMetaLoader(FileIOPlugin plugin,
java.lang.String type,
java.lang.String tag)
Registers a plugin which can load meta-data with the given "tag" for the given type of DES models. |
void |
registerMetaSaver(FileIOPlugin plugin)
Registers a plugin which can save meta-data for any DESModel
perspective (a generic plugin). |
void |
registerMetaSaver(FileIOPlugin plugin,
java.lang.Class<?> type)
Registers a plugin which can save meta-data for the given DESModel perspective. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Comparator<ImportExportPlugin> descriptionComparator
ImportExportPlugins
lexically according to their file format descriptions.
ImportExportPlugin.getFileDescription()| Method Detail |
|---|
public java.lang.Object clone()
RuntimeException to prevent cloning.
clone in class java.lang.Objectpublic static IOPluginManager instance()
public FileIOPlugin getDataSaver(java.lang.Class<?> type)
DESModels of the
given perspective (e.g. FSAModel). If no registered plugin is
capable, returns null.
type - the DESModel perspective which the plugin should
handle
null if no such plugin is registeredDESModelTypepublic java.util.Set<FileIOPlugin> getMetaSavers(java.lang.Class<?> type)
DESModels of the given perspective (e.g. FSAModel). If no
such plugin is registered, returns null.
type - the DESModel perspective for which the plugins want to
save meta-data
DESModels of the given perspective, or null
if no such plugin is registeredDESModelType
public FileIOPlugin getMetaLoaders(java.lang.String type,
java.lang.String tag)
DESModels of the given type (e.g., "FSA"). If no such
plugin is registered, returns null.
type - string with the type of model being loadedtag - the "tag" for the meta-data section
null if no such plugin
is registeredpublic FileIOPlugin getDataLoader(java.lang.String type)
DESModel of the
given type (for example, the type of Finite-State Machines is "FSA"). If
no such plugin is registered, returns null.
type - string with the type of model being loaded
null if
no such plugin is registered
public void registerDataLoader(FileIOPlugin plugin,
java.lang.String type)
plugin - the plugin to be registeredtype - the type of model which the plugin can load
public void registerDataSaver(FileIOPlugin plugin,
java.lang.Class<?> type)
DESModels of the given
perspective (e.g., FSAModel).
plugin - the plugin to be registeredtype - the DESModel perspective which the plugin can saveDESModelType
public void registerMetaLoader(FileIOPlugin plugin,
java.lang.String type,
java.lang.String tag)
plugin - the plugin to be registeredtype - the type of model for which the plugin can load meta-datatag - the "tag" of the meta-data section which the plugin can load
public void registerMetaLoader(FileIOPlugin plugin,
java.lang.String tag)
plugin - the plugin to be registeredtag - the "tag" of the meta-data section which the plugin can load
public void registerMetaSaver(FileIOPlugin plugin,
java.lang.Class<?> type)
DESModel perspective.
plugin - the plugin to be registeredtype - the DESModel perspective for which the plugin can save
meta-dataDESModelTypepublic void registerMetaSaver(FileIOPlugin plugin)
DESModel
perspective (a generic plugin).
plugin - the plugin to be registeredDESModelTypepublic void registerImport(ImportExportPlugin plugin)
plugin - the plugin to be registered
public void registerExport(ImportExportPlugin plugin,
java.lang.Class<?> type)
DESModels of the given
perspective (e.g., FSAModel) to another file format.
plugin - the plugin to be registeredtype - the DESModel perspective which the plugin can exportDESModelTypepublic java.util.Set<ImportExportPlugin> getExporters(java.lang.Class<?> type)
DESModels of the
given perspective (e.g., FSAModel) to another file format. If no
such plugin is registered, returns null.
type - the DESModel perspective which the plugins should be
able to export
DESModels of the
given perspective, or null if no such plugin is
registeredDESModelTypepublic java.util.Set<ImportExportPlugin> getImporters()
public java.util.Set<ImportExportPlugin> getExporters()
public ImportExportPlugin getImporter(java.lang.String description)
null.
description - the file format description of the plugin
null if no such plugin is registeredImportExportPlugin.getFileDescription()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||