Skip to content

Commit

Permalink
Reordered Pdf-Importer priorities (#8001)
Browse files Browse the repository at this point in the history
* Reordered Pdf-Importer priorities

* Adapted tests
  • Loading branch information
btut authored Aug 18, 2021
1 parent 0b02dd4 commit 5f3abb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public class PdfMergeMetadataImporter extends Importer {
public PdfMergeMetadataImporter(ImportFormatPreferences importFormatPreferences) {
this.importFormatPreferences = importFormatPreferences;
this.metadataImporters = List.of(
new PdfGrobidImporter(GrobidCitationFetcher.GROBID_URL, importFormatPreferences),
new PdfVerbatimBibTextImporter(importFormatPreferences),
new PdfEmbeddedBibFileImporter(importFormatPreferences),
new PdfGrobidImporter(GrobidCitationFetcher.GROBID_URL, importFormatPreferences),
new PdfXmpImporter(importFormatPreferences.getXmpPreferences()),
new PdfVerbatimBibTextImporter(importFormatPreferences),
new PdfContentImporter(importFormatPreferences)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ void importWorksAsExpected() throws Exception {

// From DOI (contained in embedded bib file)
BibEntry expected = new BibEntry(StandardEntryType.Book);
expected.setCitationKey("Burd_2011");
expected.setField(StandardField.AUTHOR, "Barry Burd");
expected.setField(StandardField.TITLE, "Java{\\textregistered} For Dummies{\\textregistered}");
expected.setField(StandardField.PUBLISHER, "Wiley Publishing, Inc.");
expected.setField(StandardField.YEAR, "2011");
expected.setField(StandardField.AUTHOR, "Barry Burd");
expected.setCitationKey("9780134685991");
expected.setField(StandardField.AUTHOR, "Bloch, Joshua");
expected.setField(StandardField.TITLE, "Effective Java");
expected.setField(StandardField.PUBLISHER, "Addison Wesley");
expected.setField(StandardField.YEAR, "2018");
expected.setField(StandardField.MONTH, "jul");
expected.setField(StandardField.DOI, "10.1002/9781118257517");

Expand Down

0 comments on commit 5f3abb5

Please sign in to comment.