General structure of MZmine3 code¶
MZmine 3 is developed using Java technology, therefore it is completely platform independent, requiring only Java runtime for running. One of the main design goals is to keep a strict separation between the application core and modules for data processing and visualization. The general architecture of the modules is presented at the following scheme.
The practical instructions for MZmine coding can be found here.
Each module in MZmine necessarily contains three classes:
Optionally module can contain dialog class:
You can fnd examples for all these classes in the
Each Module class implements one of three interfaces:
- MZMineModule interface - the most basic interface, aimed at any module that has to store some kind of parameters,
- MZMineRunnableModule interface - an interface that extends MZmine module and presents a
runModule()method, which provides an opportunity to run task (for example, from the dialog),
- MZMineProcessingModule interface - an interface that extends MZMineRunnableModule and gives an opportunity to execute a module in a batch.
The Parameters class is defined by the ParameterSet interface, which declares functions necessary to get, load, and save module parameters. Also, in this class additional information must be defined, such as compatibility of module with the IMS data and URL of online documentation. Typically, a module would use SimpleParameterSet class.
This is the part where the functionality of a module is implemented. The main specifications are defined by the Task interface, with methods that control and monitor the flow of a task execution (such as
getFinishedPercentage()). Task interface is implemented by AbstractTask class, which defines some of the most common used methods.