putFormat(new OpenDocumentSpreadsheetCreator());
putFormat(new MSBibExportFormat());
putFormat(new MySQLExport());
// Add Export Formats contributed by Plugins
JabRefPlugin plugin = JabRefPlugin.getInstance(PluginCore.getManager());
if (plugin != null){
// 1. ExportFormats based on Templates
for (ExportFormatTemplateExtension e : plugin.getExportFormatTemplateExtensions()){
ExportFormat format = PluginBasedExportFormat.getFormat(e);
if (format != null){
putFormat(format);
}
}
// 2. ExportFormat classed
for (final ExportFormatExtension e : plugin.getExportFormatExtensions()) {
putFormat(new IExportFormat(){
public String getConsoleName() {
return e.getConsoleName();
}
public String getDisplayName() {
return e.getDisplayName();
}
public FileFilter getFileFilter() {
return new ExportFileFilter(this, e.getExtension());
}
IExportFormat wrapped;
public void performExport(BibtexDatabase database, MetaData metaData,
String file, String encoding, Set<String> entryIds)
throws Exception {
if (wrapped == null)
wrapped = e.getExportFormat();
wrapped.performExport(database, metaData, file, encoding, entryIds);
}
});
}
// 3. Formatters provided by Export Format Providers
for (ExportFormatProviderExtension e : plugin.getExportFormatProviderExtensions()) {
IExportFormatProvider formatProvider = e.getFormatProvider();
for (IExportFormat exportFormat : formatProvider.getExportFormats()) {
putFormat(exportFormat);
}
}