Search in sources :

Example 1 with CustomImporter

use of org.jabref.logic.importer.fileformat.CustomImporter in project jabref by JabRef.

the class CustomImportList method readPrefs.

private void readPrefs() {
    int i = 0;
    List<String> s;
    while (!((s = prefs.getStringList(JabRefPreferences.CUSTOM_IMPORT_FORMAT + i)).isEmpty())) {
        try {
            if (s.size() == 2) {
                // New format: basePath, className
                super.add(new CustomImporter(s.get(0), s.get(1)));
            } else {
                // Old format: name, cliId, className, basePath
                super.add(new CustomImporter(s.get(3), s.get(2)));
            }
        } catch (Exception e) {
            LOGGER.warn("Could not load " + s.get(0) + " from preferences. Will ignore.", e);
        }
        i++;
    }
}
Also used : CustomImporter(org.jabref.logic.importer.fileformat.CustomImporter)

Example 2 with CustomImporter

use of org.jabref.logic.importer.fileformat.CustomImporter in project jabref by JabRef.

the class ImportFormatReader method resetImportFormats.

public void resetImportFormats(ImportFormatPreferences newImportFormatPreferences, XMPPreferences xmpPreferences) {
    this.importFormatPreferences = newImportFormatPreferences;
    formats.clear();
    formats.add(new BiblioscapeImporter());
    formats.add(new BibtexImporter(importFormatPreferences));
    formats.add(new BibTeXMLImporter());
    formats.add(new CopacImporter());
    formats.add(new EndnoteImporter(importFormatPreferences));
    formats.add(new FreeCiteImporter(importFormatPreferences));
    formats.add(new InspecImporter());
    formats.add(new IsiImporter());
    formats.add(new MedlineImporter());
    formats.add(new MedlinePlainImporter());
    formats.add(new ModsImporter());
    formats.add(new MsBibImporter());
    formats.add(new OvidImporter());
    formats.add(new PdfContentImporter(importFormatPreferences));
    formats.add(new PdfXmpImporter(xmpPreferences));
    formats.add(new RepecNepImporter(importFormatPreferences));
    formats.add(new RisImporter());
    formats.add(new SilverPlatterImporter());
    // Get custom import formats
    for (CustomImporter importer : importFormatPreferences.getCustomImportList()) {
        formats.add(importer);
    }
}
Also used : BiblioscapeImporter(org.jabref.logic.importer.fileformat.BiblioscapeImporter) IsiImporter(org.jabref.logic.importer.fileformat.IsiImporter) RisImporter(org.jabref.logic.importer.fileformat.RisImporter) CustomImporter(org.jabref.logic.importer.fileformat.CustomImporter) MsBibImporter(org.jabref.logic.importer.fileformat.MsBibImporter) RepecNepImporter(org.jabref.logic.importer.fileformat.RepecNepImporter) EndnoteImporter(org.jabref.logic.importer.fileformat.EndnoteImporter) SilverPlatterImporter(org.jabref.logic.importer.fileformat.SilverPlatterImporter) CopacImporter(org.jabref.logic.importer.fileformat.CopacImporter) ModsImporter(org.jabref.logic.importer.fileformat.ModsImporter) OvidImporter(org.jabref.logic.importer.fileformat.OvidImporter) PdfContentImporter(org.jabref.logic.importer.fileformat.PdfContentImporter) MedlinePlainImporter(org.jabref.logic.importer.fileformat.MedlinePlainImporter) BibTeXMLImporter(org.jabref.logic.importer.fileformat.BibTeXMLImporter) InspecImporter(org.jabref.logic.importer.fileformat.InspecImporter) BibtexImporter(org.jabref.logic.importer.fileformat.BibtexImporter) MedlineImporter(org.jabref.logic.importer.fileformat.MedlineImporter) PdfXmpImporter(org.jabref.logic.importer.fileformat.PdfXmpImporter) FreeCiteImporter(org.jabref.logic.importer.fileformat.FreeCiteImporter)

Aggregations

CustomImporter (org.jabref.logic.importer.fileformat.CustomImporter)2 BibTeXMLImporter (org.jabref.logic.importer.fileformat.BibTeXMLImporter)1 BiblioscapeImporter (org.jabref.logic.importer.fileformat.BiblioscapeImporter)1 BibtexImporter (org.jabref.logic.importer.fileformat.BibtexImporter)1 CopacImporter (org.jabref.logic.importer.fileformat.CopacImporter)1 EndnoteImporter (org.jabref.logic.importer.fileformat.EndnoteImporter)1 FreeCiteImporter (org.jabref.logic.importer.fileformat.FreeCiteImporter)1 InspecImporter (org.jabref.logic.importer.fileformat.InspecImporter)1 IsiImporter (org.jabref.logic.importer.fileformat.IsiImporter)1 MedlineImporter (org.jabref.logic.importer.fileformat.MedlineImporter)1 MedlinePlainImporter (org.jabref.logic.importer.fileformat.MedlinePlainImporter)1 ModsImporter (org.jabref.logic.importer.fileformat.ModsImporter)1 MsBibImporter (org.jabref.logic.importer.fileformat.MsBibImporter)1 OvidImporter (org.jabref.logic.importer.fileformat.OvidImporter)1 PdfContentImporter (org.jabref.logic.importer.fileformat.PdfContentImporter)1 PdfXmpImporter (org.jabref.logic.importer.fileformat.PdfXmpImporter)1 RepecNepImporter (org.jabref.logic.importer.fileformat.RepecNepImporter)1 RisImporter (org.jabref.logic.importer.fileformat.RisImporter)1 SilverPlatterImporter (org.jabref.logic.importer.fileformat.SilverPlatterImporter)1