Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.importer.fileformat.pdf

public Class PdfEmbeddedBibFileImporter

extends PdfImporter
Class Inheritance
Imports
java.io.IOException, java.nio.file.Path, java.util.ArrayList, .List, .Map, org.jabref.logic.importer.ImportFormatPreferences, .ParseException, .ParserResult, org.jabref.logic.importer.fileformat.BibtexParser, org.jabref.logic.l10n.Localization, org.jabref.logic.util.io.FileUtil, org.jabref.model.entry.BibEntry, org.apache.pdfbox.pdmodel.PDDocument, .PDDocumentNameDictionary, .PDEmbeddedFilesNameTreeNode, .PDPage, org.apache.pdfbox.pdmodel.common.PDNameTreeNode, org.apache.pdfbox.pdmodel.common.filespecification.PDComplexFileSpecification, .PDEmbeddedFile, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation, .PDAnnotationFileAttachment

Imports an embedded Bib-File from the PDF.

Field Summary

Modifier and TypeField and Description
private final BibtexParser

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private List<BibEntry>
private List<BibEntry>
public String
getDescription()

Implements abstract org.jabref.logic.importer.Importer.getDescription.

Returns the description of the import format.

private static PDEmbeddedFile
public String
getId()

Implements abstract org.jabref.logic.importer.Importer.getId.

Returns a slug, which identifies this importer.

public String
getName()

Implements abstract org.jabref.logic.importer.Importer.getName.

Returns the name of this import format.

public ParserResult
importDatabase(Path filePath, PDDocument document)

Implements abstract org.jabref.logic.importer.fileformat.pdf.PdfImporter.importDatabase.

Extraction of embedded files in pdfs adapted from: ...

Inherited from org.jabref.logic.importer.fileformat.pdf.PdfImporter:
getFileTypeimportDatabaseimportDatabaseimportDatabaseisRecognizedFormatisRecognizedFormat

Field Detail

bibtexParserback to summary
private final BibtexParser bibtexParser

Constructor Detail

PdfEmbeddedBibFileImporterback to summary
public PdfEmbeddedBibFileImporter(ImportFormatPreferences importFormatPreferences)

Method Detail

extractAndParseFileback to summary
private List<BibEntry> extractAndParseFile(PDEmbeddedFile embeddedFile) throws IOException, ParseException
extractAndParseFilesback to summary
private List<BibEntry> extractAndParseFiles(Map<String, PDComplexFileSpecification> names) throws IOException, ParseException
getDescriptionback to summary
public String getDescription()

Implements abstract org.jabref.logic.importer.Importer.getDescription.

Doc from org.jabref.logic.importer.Importer.getDescription.

Returns the description of the import format.

The description should specify
what kind of entries from what sources and based on what specification it is able to import

by what criteria it isRecognizedFormat(BufferedReader) recognizes an import format

Annotations
@Override
getEmbeddedFileback to summary
private static PDEmbeddedFile getEmbeddedFile(PDComplexFileSpecification fileSpec)
getIdback to summary
public String getId()

Implements abstract org.jabref.logic.importer.Importer.getId.

Doc from org.jabref.logic.importer.Importer.getId.

Returns a slug, which identifies this importer. Used, for example, to identify the importer in CLI.

Typically, this name should be short, in English, and should not contain special characters like #, %, etc.

Annotations
@Override
getNameback to summary
public String getName()

Implements abstract org.jabref.logic.importer.Importer.getName.

Doc from org.jabref.logic.importer.Importer.getName.

Returns the name of this import format. Typically, this is a string that denotes file type or format. It can also be localized, like "XMP-annotated PDF".

Annotations
@Override
importDatabaseback to summary
public ParserResult importDatabase(Path filePath, PDDocument document) throws IOException, ParseException

Implements abstract org.jabref.logic.importer.fileformat.pdf.PdfImporter.importDatabase.

Extraction of embedded files in pdfs adapted from: ...