==== Patch level 1 Source: fb8f25e6-7148-42da-a9a5-df68bcff033b:/local/jabref/trunk/jabref:2610 [local] Target: 15a67142-8137-0410-b105-af5202cce309:/trunk/jabref:2553 [mirrored] (https://jabref.svn.sourceforge.net/svnroot/jabref) Log: r2390@ali: fedor | 2007-09-21 14:12:35 +0200 jabref from sf trunk copied to local trunk r2401@ali: fedor | 2007-09-21 14:48:21 +0200 r2399@ali: fedor | 2007-09-21 14:33:04 +0200 ARXIV download patch (sends User-Agent: now) r2539@ali: fedor | 2007-11-14 13:16:23 +0100 Merge of r2439: fedor | 2007-10-02 17:32:58 +0200 Added 'Open SPIRES' action (Merged with jabref?) Fixup of the merge. Also adds site modifications for gnodoit and fixes Logger class to compile on jdk1.5.0 r2540@ali: fedor | 2007-11-14 13:21:16 +0100 r2440: fedor | 2007-10-02 17:36:14 +0200 Removed Site modifications r2604@ali: fedor | 2007-12-04 18:16:10 +0100 Regenerated _JabRefPlugin.java after merge r2609@ali: fedor | 2007-12-05 10:01:54 +0100 Fixed handling of Spires bibkeys with space in it r2610@ali: fedor | 2007-12-05 10:43:39 +0100 Fixed to conform to introducion of ImportInspector interface === .classpath ================================================================== --- .classpath (revision 2553) +++ .classpath (patch spires level 1) @@ -17,7 +17,7 @@ - + === src/java/net/sf/jabref/imports/SPIRESFetcher.java ================================================================== --- src/java/net/sf/jabref/imports/SPIRESFetcher.java (revision 2553) +++ src/java/net/sf/jabref/imports/SPIRESFetcher.java (patch spires level 1) @@ -0,0 +1,220 @@ +package net.sf.jabref.imports; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLEncoder; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import net.sf.jabref.OutputPrinter; +import net.sf.jabref.BibtexDatabase; +import net.sf.jabref.BibtexEntry; +import net.sf.jabref.GUIGlobals; +import net.sf.jabref.Globals; +import net.sf.jabref.imports.BibtexParser; + +/** + * + * This class allows to access the Slac SPIRES database. + * + * It can either be a GeneralFetcher to pose requests to the database or fetch + * individual entries. + * + * @author Fedor Bezrukov + * + * @version $Id$ + * + */ +public class SPIRESFetcher implements EntryFetcher { + + private static String spiresHost = "www-spires.slac.stanford.edu"; + + public SPIRESFetcher() { + } + + /** + * Construct the query URL + * + * @param key + * The key of the OAI2 entry that the url should poitn to. + * + * @return a String denoting the query URL + */ + public String constructUrl(String key) { + String identifier = ""; + try { + identifier = URLEncoder.encode((String) key, "UTF-8"); + } catch (UnsupportedEncodingException e) { + return ""; + } + StringBuffer sb = new StringBuffer("http://").append(spiresHost) + .append("/"); + sb.append("spires/find/hep/www").append("?"); + sb.append("rawcmd=find+"); + sb.append(identifier); + sb.append("&FORMAT=WWWBRIEFBIBTEX&SEQUENCE="); + return sb.toString(); + } + + /** + * Constructs a SPIRES query url from slaccitation field + * + * @param slaccitation + * @return query string + */ + public static String constructUrlFromSlaccitation(String slaccitation) { + String cmd = "j"; + String key = slaccitation.replaceAll("^%%CITATION = ", "").replaceAll( + ";%%$", ""); + if (key.matches("^\\w*-\\w*[ /].*")) + cmd = "eprint"; + try { + key = URLEncoder.encode((String) key, "UTF-8"); + } catch (UnsupportedEncodingException e) { + } + StringBuffer sb = new StringBuffer("http://").append(spiresHost) + .append("/"); + sb.append("spires/find/hep/www").append("?"); + sb.append("rawcmd=find+").append(cmd).append("+"); + sb.append(key); + return sb.toString(); + } + + /** + * Construct an SPIRES query url from eprint field + * + * @param eprint + * @return query string + */ + public static String constructUrlFromEprint(String eprint) { + String key = eprint.replaceAll(" [.*]$", ""); + try { + key = URLEncoder.encode(key, "UTF-8"); + } catch (UnsupportedEncodingException e) { + return ""; + } + StringBuffer sb = new StringBuffer("http://").append(spiresHost) + .append("/"); + sb.append("spires/find/hep/www").append("?"); + sb.append("rawcmd=find+eprint+"); + sb.append(key); + return sb.toString(); + } + + /** + * Import an entry from an OAI2 archive. The BibtexEntry provided has to + * have the field OAI2_IDENTIFIER_FIELD set to the search string. + * + * @param key + * The OAI2 key to fetch from ArXiv. + * @return The imnported BibtexEntry or null if none. + */ + private BibtexDatabase importSpiresEntries(String key, OutputPrinter frame) { + String url = constructUrl(key); + try { + HttpURLConnection conn = (HttpURLConnection) (new URL(url)).openConnection(); + conn.setRequestProperty("User-Agent", "Jabref"); + InputStream inputStream = conn.getInputStream(); + + SPIRESBibtexFilterReader reader = new SPIRESBibtexFilterReader( + new InputStreamReader(inputStream)); + + ParserResult pr = BibtexParser.parse(reader); + + return pr.getDatabase(); + } catch (IOException e) { + frame.showMessage( Globals.lang( + "An Exception ocurred while accessing '%0'", url) + + "\n\n" + e.toString(), Globals.lang(getKeyName()), + JOptionPane.ERROR_MESSAGE); + } catch (RuntimeException e) { + frame.showMessage( Globals.lang( + "An Error occurred while fetching from SPIRES source (%0):", + new String[] { url }) + + "\n\n" + e.getMessage(), Globals.lang(getKeyName()), + JOptionPane.ERROR_MESSAGE); + } + return null; + } + + // public void addSpiresURL(BibtexEntry entry) { + // String url = "http://"+spiresHost+"/spires/find/hep/www?texkey+"; + // url = url+entry.getCiteKey(); + // entry.setField("url", url); + // } + // + // public void addSpiresURLtoDatabase(BibtexDatabase db) { + // Iterator iter = db.getEntries().iterator(); + // while (iter.hasNext()) + // addSpiresURL(iter.next()); + // } + + /* + * @see net.sf.jabref.imports.EntryFetcher + */ + public String getHelpPage() { + // there is no helppage + return null; + } + + public URL getIcon() { + return GUIGlobals.getIconUrl("www"); + } + + public String getKeyName() { + return "Fetch SPIRES"; + } + + public JPanel getOptionsPanel() { + // we have no additional options + return null; + } + + public String getTitle() { + return Globals.menuTitle(getKeyName()); + } + + /* + * @see net.sf.jabref.gui.ImportInspectionDialog.CallBack + */ + public void cancelled() { + } + + public void done(int entriesImported) { + } + + public void stopFetching() { + } + + /* + * @see java.lang.Runnable + */ + public boolean processQuery(String query, ImportInspector dialog, + OutputPrinter frame) { + try { + frame.setStatus("Fetching entries from Spires"); + /* query the archive and load the results into the BibtexEntry */ + BibtexDatabase bd = importSpiresEntries(query,frame); + + /* addSpiresURLtoDatabase(bd); */ + + frame.setStatus("Adding fetched entries"); + /* add the entry to the inspection dialog */ + if (bd.getEntryCount() > 0) + for (BibtexEntry entry : bd.getEntries()) + dialog.addEntry(entry); + + /* update the dialogs progress bar */ + // dialog.setProgress(i + 1, keys.length); + /* inform the inspection dialog, that we're done */ + } catch (Exception e) { + frame.showMessage(Globals.lang("Error while fetching from Spires: ") + + e.getMessage()); + e.printStackTrace(); + } + return true; + } +} Property changes on: src/java/net/sf/jabref/imports/SPIRESFetcher.java ___________________________________________________________________ Name: snv:keywords +Id === src/java/net/sf/jabref/imports/SPIRESBibtexFilterReader.java ================================================================== --- src/java/net/sf/jabref/imports/SPIRESBibtexFilterReader.java (revision 2553) +++ src/java/net/sf/jabref/imports/SPIRESBibtexFilterReader.java (patch spires level 1) @@ -0,0 +1,76 @@ +package net.sf.jabref.imports; + +import java.io.Reader; +import java.io.BufferedReader; +import java.io.FilterReader; +import java.io.IOException; +import java.util.regex.Matcher; + +/** + * + * Warning -- it is not a generic filter, only read is implemented! + * + * @author Fedor Bezrukov + * + * @version $Id$ + * + * TODO: Fix grammar in bibtex entries -- it ma return invalid bibkeys (with space) + * + */ +public class SPIRESBibtexFilterReader extends FilterReader { + + protected BufferedReader in; + + private String line; + private int pos; + private boolean pre; + + SPIRESBibtexFilterReader(Reader _in) { + super(_in); + in = new BufferedReader(_in); + pos=-1; + pre=false; + } + + private String readpreLine() throws IOException { + String l; + do { + l=in.readLine(); + if (l==null) + return null; + if (l.equals("
")) {
+    			pre = true;
+    			l=in.readLine();
+    		}
+    		if (l.equals("
")) + pre = false; + } while (!pre); + return l; + } + + private String fixBibkey(String in) { + if (in== null) + return null; + System.out.println(in); + if ( in.matches("@Article\\{.*,") ) { + System.out.println(in.replace(' ','_')); + return in.replace(' ', '_'); + } else + return in; + } + + public int read() throws IOException { + if ( pos<0 ) { + line=fixBibkey(readpreLine()); + pos=0; + if ( line == null ) + return -1; + } + if ( pos>=line.length() ) { + pos=-1; + return '\n'; + } + return line.charAt(pos++); + } + +} Property changes on: src/java/net/sf/jabref/imports/SPIRESBibtexFilterReader.java ___________________________________________________________________ Name: snv:keywords +Id === src/java/net/sf/jabref/Globals.java ================================================================== --- src/java/net/sf/jabref/Globals.java (revision 2553) +++ src/java/net/sf/jabref/Globals.java (patch spires level 1) @@ -193,9 +193,7 @@ public static final int NEWLINE_LENGTH = System.getProperty("line.separator").length(); // Instantiate logger: - // TODO: Doesn't work in Java 5: - // private static Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); - private static Logger logger = Logger.global; + private static Logger logger = Logger.getLogger(""); /** * true if we have unix newlines === src/java/net/sf/jabref/BasePanel.java ================================================================== --- src/java/net/sf/jabref/BasePanel.java (revision 2553) +++ src/java/net/sf/jabref/BasePanel.java (patch spires level 1) @@ -88,6 +88,7 @@ import net.sf.jabref.gui.MainTableSelectionListener; import net.sf.jabref.imports.AppendDatabaseAction; import net.sf.jabref.imports.BibtexParser; +import net.sf.jabref.imports.SPIRESFetcher; import net.sf.jabref.journals.AbbreviateAction; import net.sf.jabref.journals.UnabbreviateAction; import net.sf.jabref.labelPattern.LabelPatternUtil; @@ -1142,6 +1143,32 @@ } }); + actions.put("openSpires", new BaseAction() { + public void action() { + BibtexEntry[] bes = mainTable.getSelectedEntries(); + if ((bes != null) && (bes.length == 1)) { + Object link = null; + if (bes[0].getField("eprint") != null) + link = SPIRESFetcher.constructUrlFromEprint(bes[0].getField("eprint").toString()); + else if (bes[0].getField("slaccitation") != null) + link = SPIRESFetcher.constructUrlFromSlaccitation(bes[0].getField("slaccitation").toString()); + if (link != null) { + //output(Globals.lang("Calling external viewer...")); + try { + Util.openExternalViewer(metaData(), link.toString(), "url"); + output(Globals.lang("External viewer called")+"."); + } catch (IOException ex) { + output(Globals.lang("Error") + ": " + ex.getMessage()); + } + } + else + output(Globals.lang("No url defined")+"."); + } else + output(Globals.lang("No entries or multiple entries selected.")); + } + }); + + actions.put("replaceAll", new BaseAction() { public void action() { ReplaceStringDialog rsd = new ReplaceStringDialog(frame); === src/java/net/sf/jabref/JabRefPreferences.java ================================================================== --- src/java/net/sf/jabref/JabRefPreferences.java (revision 2553) +++ src/java/net/sf/jabref/JabRefPreferences.java (patch spires level 1) @@ -822,6 +822,7 @@ defKeyBinds.put("Open file", "F4"); defKeyBinds.put("Open PDF or PS", "shift F5"); defKeyBinds.put("Open URL or DOI", "F3"); + defKeyBinds.put("Open SPIRES entry", "ctrl F3"); defKeyBinds.put("Toggle entry preview", "ctrl F9"); defKeyBinds.put("Switch preview layout", "F9"); defKeyBinds.put("Edit entry", "ctrl E"); @@ -844,6 +845,7 @@ defKeyBinds.put("Fetch SPIRES", "ctrl F8"); defKeyBinds.put("Write XMP", "ctrl F4"); defKeyBinds.put("New file link", "ctrl N"); + defKeyBinds.put("Fetch SPIRES", "ctrl F8"); } private String getNextUnit(Reader data) throws IOException { === src/java/net/sf/jabref/JabRefFrame.java ================================================================== --- src/java/net/sf/jabref/JabRefFrame.java (revision 2553) +++ src/java/net/sf/jabref/JabRefFrame.java (patch spires level 1) @@ -314,6 +314,9 @@ openUrl = new GeneralAction("openUrl", "Open URL or DOI", Globals.lang("Open URL or DOI"), prefs.getKey("Open URL or DOI")), + openSpires = new GeneralAction("openSpires", "Open SPIRES entry", + Globals.lang("Open SPIRES entry"), + prefs.getKey("Open SPIRES entry")), dupliCheck = new GeneralAction("dupliCheck", "Find duplicates"), //strictDupliCheck = new GeneralAction("strictDupliCheck", "Find and remove exact duplicates"), plainTextImport = new GeneralAction("plainTextImport", @@ -1221,6 +1224,7 @@ tools.add(openFile); tools.add(openPdf); tools.add(openUrl); + tools.add(openSpires); tools.addSeparator(); tools.add(newSubDatabaseAction); @@ -1429,7 +1433,7 @@ selectAll, copyKey, copyCiteKey, editPreamble, editStrings, toggleGroups, toggleSearch, makeKeyAction, normalSearch, incrementalSearch, replaceAll, importMenu, exportMenu, fetchCiteSeer, - openPdf, openUrl, togglePreview, dupliCheck, /*strictDupliCheck,*/ highlightAll, + openPdf, openUrl, openSpires, togglePreview, dupliCheck, /*strictDupliCheck,*/ highlightAll, highlightAny, newEntryAction, plainTextImport, closeDatabaseAction, switchPreview, integrityCheckAction, autoSetPdf, autoSetPs, toggleHighlightAny, toggleHighlightAll, databaseProperties, abbreviateIso, === src/java/net/sf/jabref/plugin/core/generated/_JabRefPlugin.java ================================================================== --- src/java/net/sf/jabref/plugin/core/generated/_JabRefPlugin.java (revision 2553) +++ src/java/net/sf/jabref/plugin/core/generated/_JabRefPlugin.java (patch spires level 1) @@ -24,12 +24,12 @@ static Log log = LogFactory.getLog(_JabRefPlugin.class); - public List getExportFormatTemplateExtensions(){ - ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "ExportFormatTemplate"); - List result = new ArrayList(); + public List getEntryFetcherExtensions(){ + ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "EntryFetcher"); + List result = new ArrayList(); for (Extension ext : extPoint.getConnectedExtensions()) { try { - result.add(new ExportFormatTemplateExtension(getManager().getPlugin( + result.add(new EntryFetcherExtension(getManager().getPlugin( ext.getDeclaringPluginDescriptor().getId()), ext)); } catch (PluginLifecycleException e) { log.error("Failed to activate plug-in " + ext.getDeclaringPluginDescriptor().getId(), e); @@ -38,48 +38,37 @@ return result; } - public static class ExportFormatTemplateExtension extends RuntimeExtension { - public ExportFormatTemplateExtension(Plugin declaringPlugin, Extension wrapped){ + public static class EntryFetcherExtension extends RuntimeExtension { + public EntryFetcherExtension(Plugin declaringPlugin, Extension wrapped){ super(declaringPlugin, wrapped); } - public String getDisplayName(){ - return getStringParameter("displayName"); + /** + * @return A singleton instance of the class parameter or null if the class could not be found! + */ + public net.sf.jabref.imports.EntryFetcher getEntryFetcher(){ + return (net.sf.jabref.imports.EntryFetcher)getClassParameter("entryFetcher"); } - public String getConsoleName(){ - return getStringParameter("consoleName"); + public String getName(){ + return getStringParameter("name"); } - public String getLayoutFilename(){ - return getStringParameter("layoutFilename"); + public String getDescription(){ + return getStringParameter("description"); } - - public URL getDirAsUrl(){ - return getResourceParameter("dir"); - } - - public URL getDirAsUrl(String relativePath){ - return getResourceParameter("dir", relativePath); - } - - - public String getExtension(){ - return getStringParameter("extension"); - } - } - public List getExportFormatExtensions(){ - ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "ExportFormat"); - List result = new ArrayList(); + public List getImportFormatExtensions(){ + ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "ImportFormat"); + List result = new ArrayList(); for (Extension ext : extPoint.getConnectedExtensions()) { try { - result.add(new ExportFormatExtension(getManager().getPlugin( + result.add(new ImportFormatExtension(getManager().getPlugin( ext.getDeclaringPluginDescriptor().getId()), ext)); } catch (PluginLifecycleException e) { log.error("Failed to activate plug-in " + ext.getDeclaringPluginDescriptor().getId(), e); @@ -88,8 +77,8 @@ return result; } - public static class ExportFormatExtension extends RuntimeExtension { - public ExportFormatExtension(Plugin declaringPlugin, Extension wrapped){ + public static class ImportFormatExtension extends RuntimeExtension { + public ImportFormatExtension(Plugin declaringPlugin, Extension wrapped){ super(declaringPlugin, wrapped); } @@ -97,11 +86,42 @@ /** * @return A singleton instance of the class parameter or null if the class could not be found! */ - public net.sf.jabref.export.IExportFormat getExportFormat(){ - return (net.sf.jabref.export.IExportFormat)getClassParameter("exportFormat"); + public net.sf.jabref.imports.ImportFormat getImportFormat(){ + return (net.sf.jabref.imports.ImportFormat)getClassParameter("importFormat"); } + public String getName(){ + return getStringParameter("name"); + } + + + public String getDescription(){ + return getStringParameter("description"); + } + + } + + public List getExportFormatTemplateExtensions(){ + ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "ExportFormatTemplate"); + List result = new ArrayList(); + for (Extension ext : extPoint.getConnectedExtensions()) { + try { + result.add(new ExportFormatTemplateExtension(getManager().getPlugin( + ext.getDeclaringPluginDescriptor().getId()), ext)); + } catch (PluginLifecycleException e) { + log.error("Failed to activate plug-in " + ext.getDeclaringPluginDescriptor().getId(), e); + } + } + return result; + } + + public static class ExportFormatTemplateExtension extends RuntimeExtension { + public ExportFormatTemplateExtension(Plugin declaringPlugin, Extension wrapped){ + super(declaringPlugin, wrapped); + } + + public String getDisplayName(){ return getStringParameter("displayName"); } @@ -112,6 +132,20 @@ } + public String getLayoutFilename(){ + return getStringParameter("layoutFilename"); + } + + + public URL getDirAsUrl(){ + return getResourceParameter("dir"); + } + + public URL getDirAsUrl(String relativePath){ + return getResourceParameter("dir", relativePath); + } + + public String getExtension(){ return getStringParameter("extension"); } @@ -157,12 +191,12 @@ } - public List getEntryFetcherExtensions(){ - ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "EntryFetcher"); - List result = new ArrayList(); + public List getPushToApplicationExtensions(){ + ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "PushToApplication"); + List result = new ArrayList(); for (Extension ext : extPoint.getConnectedExtensions()) { try { - result.add(new EntryFetcherExtension(getManager().getPlugin( + result.add(new PushToApplicationExtension(getManager().getPlugin( ext.getDeclaringPluginDescriptor().getId()), ext)); } catch (PluginLifecycleException e) { log.error("Failed to activate plug-in " + ext.getDeclaringPluginDescriptor().getId(), e); @@ -171,8 +205,8 @@ return result; } - public static class EntryFetcherExtension extends RuntimeExtension { - public EntryFetcherExtension(Plugin declaringPlugin, Extension wrapped){ + public static class PushToApplicationExtension extends RuntimeExtension { + public PushToApplicationExtension(Plugin declaringPlugin, Extension wrapped){ super(declaringPlugin, wrapped); } @@ -180,8 +214,8 @@ /** * @return A singleton instance of the class parameter or null if the class could not be found! */ - public net.sf.jabref.imports.EntryFetcher getEntryFetcher(){ - return (net.sf.jabref.imports.EntryFetcher)getClassParameter("entryFetcher"); + public net.sf.jabref.external.PushToApplication getPushToApp(){ + return (net.sf.jabref.external.PushToApplication)getClassParameter("pushToApp"); } @@ -235,45 +269,6 @@ } - public List getPushToApplicationExtensions(){ - ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "PushToApplication"); - List result = new ArrayList(); - for (Extension ext : extPoint.getConnectedExtensions()) { - try { - result.add(new PushToApplicationExtension(getManager().getPlugin( - ext.getDeclaringPluginDescriptor().getId()), ext)); - } catch (PluginLifecycleException e) { - log.error("Failed to activate plug-in " + ext.getDeclaringPluginDescriptor().getId(), e); - } - } - return result; - } - - public static class PushToApplicationExtension extends RuntimeExtension { - public PushToApplicationExtension(Plugin declaringPlugin, Extension wrapped){ - super(declaringPlugin, wrapped); - } - - - /** - * @return A singleton instance of the class parameter or null if the class could not be found! - */ - public net.sf.jabref.external.PushToApplication getPushToApp(){ - return (net.sf.jabref.external.PushToApplication)getClassParameter("pushToApp"); - } - - - public String getName(){ - return getStringParameter("name"); - } - - - public String getDescription(){ - return getStringParameter("description"); - } - - } - public List getLayoutFormatterExtensions(){ ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "LayoutFormatter"); List result = new ArrayList(); @@ -313,12 +308,12 @@ } - public List getImportFormatExtensions(){ - ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "ImportFormat"); - List result = new ArrayList(); + public List getExportFormatExtensions(){ + ExtensionPoint extPoint = getManager().getRegistry().getExtensionPoint(getId(), "ExportFormat"); + List result = new ArrayList(); for (Extension ext : extPoint.getConnectedExtensions()) { try { - result.add(new ImportFormatExtension(getManager().getPlugin( + result.add(new ExportFormatExtension(getManager().getPlugin( ext.getDeclaringPluginDescriptor().getId()), ext)); } catch (PluginLifecycleException e) { log.error("Failed to activate plug-in " + ext.getDeclaringPluginDescriptor().getId(), e); @@ -327,8 +322,8 @@ return result; } - public static class ImportFormatExtension extends RuntimeExtension { - public ImportFormatExtension(Plugin declaringPlugin, Extension wrapped){ + public static class ExportFormatExtension extends RuntimeExtension { + public ExportFormatExtension(Plugin declaringPlugin, Extension wrapped){ super(declaringPlugin, wrapped); } @@ -336,20 +331,25 @@ /** * @return A singleton instance of the class parameter or null if the class could not be found! */ - public net.sf.jabref.imports.ImportFormat getImportFormat(){ - return (net.sf.jabref.imports.ImportFormat)getClassParameter("importFormat"); + public net.sf.jabref.export.IExportFormat getExportFormat(){ + return (net.sf.jabref.export.IExportFormat)getClassParameter("exportFormat"); } - public String getName(){ - return getStringParameter("name"); + public String getDisplayName(){ + return getStringParameter("displayName"); } - public String getDescription(){ - return getStringParameter("description"); + public String getConsoleName(){ + return getStringParameter("consoleName"); } + + public String getExtension(){ + return getStringParameter("extension"); + } + } } === src/plugins/net.sf.jabref.core/plugin.xml ================================================================== --- src/plugins/net.sf.jabref.core/plugin.xml (revision 2553) +++ src/plugins/net.sf.jabref.core/plugin.xml (patch spires level 1) @@ -69,6 +69,15 @@ value="Fetch Entries from OAI2 Archives like ArXiv." /> + + + + + +