A ResultMapSave specifies mechanisms for saving the output results from a workflow run. These then appear as buttons such as “Save as XML” in the Results Perspective.
A new way to save data can be added to Taverna 1.7.x by a class that implements the org.embl.ebi.escience.scuflui.spi.ResultMapSaveSPI interface. The name of the new class must be specified within a org.embl.ebi.escience.scuflui.spi.ResultMapSaveSPI file within the appropriate resources/META-INF/services directory.
Example
org.embl.ebi.escience.scuflui.results.SaveAsExcel implements the org.embl.ebi.escience.scuflui.spi.ResultMapSaveSPI interface.
public class SaveAsExcel implements ResultMapSaveSPI {
/**
* Return the standard looking save to disk icon
*/
public Icon getIcon() {
return TavernaIcons.saveIcon;
}
/**
* Get the description for this plugin
*/
public String getDescription() {
return ("Saves textual (non image) data to Excel format.");
}
/**
* Get the short name
*/
public String getName() {
return "Excel";
}
/**
* Show a standard save dialog and dump the entire result set to the
* specified XML file
*/
@SuppressWarnings("unchecked")
public ActionListener getListener(Map results, JComponent parent) {
// Assumes Map (which it should be)
return new SaveExcelAction(results, parent);
}
}
class SaveExcelAction implements ActionListener {
...
}
The file named org.embl.ebi.escience.scuflui.spi.ResultMapSaveSPI must include the line:
org.embl.ebi.escience.scuflui.results.SaveAsExcel







