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++;
}
}
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);
}
}
Aggregations