Top Description Inners Fields Constructors Methods
org.jabref.logic.importer.fileformat

public Class PdfMergeMetadataImporter

extends Importer
Class Inheritance
Known Direct Subclasses
org.jabref.logic.importer.fileformat.PdfMergeMetadataImporter.EntryBasedFetcherWrapper
Imports
java.io.BufferedReader, .IOException, java.nio.file.Path, java.util.ArrayList, .List, .Map, .Objects, .Optional, .Set, org.jabref.logic.importer.EntryBasedFetcher, .FetcherException, .ImportFormatPreferences, .Importer, .ParserResult, org.jabref.logic.importer.fetcher.DoiFetcher, org.jabref.logic.importer.fetcher.isbntobibtex.IsbnFetcher, org.jabref.logic.importer.util.FileFieldParser, org.jabref.logic.util.StandardFileType, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .LinkedFile, org.jabref.model.entry.field.Field, .StandardField, org.jabref.preferences.FilePreferences, org.slf4j.Logger, .LoggerFactory

PdfEmbeddedBibFileImporter imports an embedded Bib-File from the PDF.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final ImportFormatPreferences
private static final Logger
private final List<Importer>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getDescription()

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

Returns the description of the import format.

public StandardFileType
getFileType()

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

Returns the type of files that this importer can read

public String
getName()

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

Returns the name of this import format.

public ParserResult
importDatabase(BufferedReader
the input to read from
reader
)

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

Parse the database in the source.

public ParserResult
importDatabase(String
the string which should be imported
data
)

Overrides org.jabref.logic.importer.Importer.importDatabase.

Parse the database in the specified string.

public ParserResult
importDatabase(Path
the path to the file which should be imported
filePath
)

Overrides org.jabref.logic.importer.Importer.importDatabase.

Parse the database in the specified file.

public boolean
isRecognizedFormat(BufferedReader input)

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

Check whether the source is in the correct format for this importer.

Inherited from org.jabref.logic.importer.Importer:
compareToequalsgetCharsetgetIdgetReadergetReaderhashCodeisRecognizedFormatisRecognizedFormattoString

Field Detail

importFormatPreferencesback to summary
private final ImportFormatPreferences importFormatPreferences
LOGGERback to summary
private static final Logger LOGGER

Hides org.jabref.logic.importer.Importer.LOGGER.

metadataImportersback to summary
private final List<Importer> metadataImporters

Constructor Detail

PdfMergeMetadataImporterback to summary
public PdfMergeMetadataImporter(ImportFormatPreferences importFormatPreferences)

Method Detail

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 recognizes an import format
Returns:String

description of the import format

Annotations
@Override
getFileTypeback to summary
public StandardFileType getFileType()

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

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

Returns the type of files that this importer can read

Returns:StandardFileType

FileType corresponding to the importer

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.

The name must be unique.

Returns:String

format name, must be unique and not null

Annotations
@Override
importDatabaseback to summary
public ParserResult importDatabase(BufferedReader reader) throws IOException

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

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

Parse the database in the source.

This method can be called in two different contexts - either when importing in a specified format, or when importing in unknown format. In the latter case, JabRef cycles through all available import formats. No error messages or feedback is displayed from individual import formats in this case.

If importing in a specified format and an empty library is returned, JabRef reports that no entries were found.

This method should never return null.

Parameters
reader:BufferedReader

the input to read from

Annotations
@Override
importDatabaseback to summary
public ParserResult importDatabase(String data) throws IOException

Overrides org.jabref.logic.importer.Importer.importDatabase.

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

Parse the database in the specified string.

Importer having the facilities to detect the correct encoding of a string should overwrite this method, determine the encoding and then call importDatabase(BufferedReader).

Parameters
data:String

the string which should be imported

Returns:ParserResult

the parsed result

Annotations
@Override
Exceptions
IOException:
Signals that an I/O exception has occurred.
importDatabaseback to summary
public ParserResult importDatabase(Path filePath) throws IOException

Overrides org.jabref.logic.importer.Importer.importDatabase.

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

Parse the database in the specified file.

Parameters
filePath:Path

the path to the file which should be imported

Annotations
@Override
isRecognizedFormatback to summary
public boolean isRecognizedFormat(BufferedReader input) throws IOException

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

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

Check whether the source is in the correct format for this importer.

The effect of this method is primarily to avoid unnecessary processing of files when searching for a suitable import format. If this method returns false, the import routine will move on to the next import format.

Thus, the correct behaviour is to return false if it is certain that the file is not of the suitable type, and true otherwise. Returning true is the safe choice if not certain.

Annotations
@Override
org.jabref.logic.importer.fileformat back to summary

public Class PdfMergeMetadataImporter.EntryBasedFetcherWrapper

extends PdfMergeMetadataImporter
implements EntryBasedFetcher
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.EntryBasedFetcher, org.jabref.logic.importer.WebFetcher

Field Summary

Modifier and TypeField and Description
private final BibDatabaseContext
private final FilePreferences
private static final Logger

Constructor Summary

AccessConstructor and Description
public
EntryBasedFetcherWrapper(ImportFormatPreferences importFormatPreferences, FilePreferences filePreferences, BibDatabaseContext context)

Method Summary

Modifier and TypeMethod and Description
public List<BibEntry>
performSearch(BibEntry
entry to search bibliographic information for
entry
)

Implements org.jabref.logic.importer.EntryBasedFetcher.performSearch.

Looks for hits which are matched by the given BibEntry.

Inherited from org.jabref.logic.importer.fileformat.PdfMergeMetadataImporter:
getDescriptiongetFileTypegetNameimportDatabaseimportDatabaseimportDatabaseisRecognizedFormat

Field Detail

databaseContextback to summary
private final BibDatabaseContext databaseContext
filePreferencesback to summary
private final FilePreferences filePreferences
LOGGERback to summary
private static final Logger LOGGER

Hides org.jabref.logic.importer.fileformat.PdfMergeMetadataImporter.LOGGER.

Constructor Detail

EntryBasedFetcherWrapperback to summary
public EntryBasedFetcherWrapper(ImportFormatPreferences importFormatPreferences, FilePreferences filePreferences, BibDatabaseContext context)

Method Detail

performSearchback to summary
public List<BibEntry> performSearch(BibEntry entry) throws FetcherException

Implements org.jabref.logic.importer.EntryBasedFetcher.performSearch.

Doc from org.jabref.logic.importer.EntryBasedFetcher.performSearch.

Looks for hits which are matched by the given BibEntry.

Parameters
entry:BibEntry

entry to search bibliographic information for

Returns:List<BibEntry>

a list of BibEntry, which are matched by the query (may be empty)

Annotations
@Override