Search in sources :

Example 1 with ParseException

use of bibtex.parser.ParseException in project mycore by MyCoRe-Org.

the class MCRBibTeX2MODSTransformer method parse.

private BibtexFile parse(String input) throws IOException {
    BibtexFile bibtexFile = new BibtexFile();
    BibtexParser parser = new BibtexParser(false);
    parser.setMultipleFieldValuesPolicy(BibtexMultipleFieldValuesPolicy.KEEP_ALL);
    try {
        parser.parse(bibtexFile, new StringReader(input));
    } catch (ParseException ex) {
        MCRMessageLogger.logMessage(ex.toString());
    }
    return bibtexFile;
}
Also used : BibtexFile(bibtex.dom.BibtexFile) BibtexParser(bibtex.parser.BibtexParser) StringReader(java.io.StringReader) ParseException(bibtex.parser.ParseException)

Aggregations

BibtexFile (bibtex.dom.BibtexFile)1 BibtexParser (bibtex.parser.BibtexParser)1 ParseException (bibtex.parser.ParseException)1 StringReader (java.io.StringReader)1