use of org.jabref.logic.auxparser.AuxParser in project jabref by JabRef.
the class AuxCommandLine method perform.
public BibDatabase perform() {
BibDatabase subDatabase = null;
if (!auxFile.isEmpty() && (database != null)) {
AuxParser auxParser = new AuxParser(auxFile, database);
AuxParserResult result = auxParser.parse();
subDatabase = result.getGeneratedBibDatabase();
// print statistics
System.out.println(result.getInformation(true));
}
return subDatabase;
}
use of org.jabref.logic.auxparser.AuxParser in project jabref by JabRef.
the class FromAuxDialog method parseActionPerformed.
private void parseActionPerformed() {
parseButton.setEnabled(false);
BasePanel bp = (BasePanel) parentTabbedPane.getComponentAt(dbChooser.getSelectedIndex());
notFoundList.removeAll();
statusInfos.setText(null);
BibDatabase refBase = bp.getDatabase();
String auxName = auxFileField.getText();
if ((auxName != null) && (refBase != null) && !auxName.isEmpty()) {
auxParser = new AuxParser(auxName, refBase);
AuxParserResult result = auxParser.parse();
notFoundList.setListData(result.getUnresolvedKeys().toArray(new String[result.getUnresolvedKeys().size()]));
statusInfos.append(result.getInformation(false));
generateButton.setEnabled(true);
// the generated database contains no entries -> no active generate-button
if (!result.getGeneratedBibDatabase().hasEntries()) {
statusInfos.append("\n" + Localization.lang("empty library"));
generateButton.setEnabled(false);
}
} else {
generateButton.setEnabled(false);
}
parseButton.setEnabled(true);
}
Aggregations