Verified Owner
Top Description Fields Methods
org.jabref.logic.importer

public Interface IdParserFetcher<T extends Identifier>

extends IdFetcher<T extends Identifier>, ParserFetcher
Known Direct Implementers
org.jabref.logic.importer.fetcher.CrossRef
Imports
java.io.IOException, .InputStream, java.net.HttpURLConnection, .MalformedURLException, .URISyntaxException, .URL, java.util.List, .Optional, org.jabref.model.entry.BibEntry, org.jabref.model.entry.identifier.Identifier, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

Provides a convenient interface for IdFetcher, which follow the usual three-step procedure:
  1. Open a URL based on the search query
  2. Parse the response to get a list of BibEntry
  3. Extract identifier

Field Summary

Modifier and TypeField and Description
public static final Logger

Method Summary

Modifier and TypeMethod and Description
public Optional<T>
extractIdentifier(BibEntry
the entry for which we are searching the identifier (can be used to find the closest match in the result)
inputEntry
,
List<BibEntry>
list of entries returned by the web service
fetchedEntries
)

Extracts the identifier from the list of fetched entries.

private Optional<T>
fetchIdentifier(BibEntry entry, URL urlForEntry)

public default Optional<T>
findIdentifier(@NonNull BibEntry entry)

Implements org.jabref.logic.importer.IdFetcher.findIdentifier.

Looks for an identifier based on the information stored in the given BibEntry.

public Parser
getParser()

Returns the parser used to convert the response to a list of BibEntry.

public URL
getURLForEntry(BibEntry
the entry to look information for
entry
)

Constructs a URL based on the BibEntry.

Inherited from org.jabref.logic.importer.IdFetcher:
getIdentifierName
Inherited from org.jabref.logic.importer.ParserFetcher:
doPostCleanup

Field Detail

LOGGERback to summary
public static final Logger LOGGER

Method Detail

extractIdentifierback to summary
public Optional<T> extractIdentifier(BibEntry inputEntry, List<BibEntry> fetchedEntries) throws FetcherException

Extracts the identifier from the list of fetched entries.

Parameters
inputEntry:BibEntry

the entry for which we are searching the identifier (can be used to find the closest match in the result)

fetchedEntries:List<BibEntry>

list of entries returned by the web service

fetchIdentifierback to summary
private Optional<T> fetchIdentifier(BibEntry entry, URL urlForEntry) throws FetcherException
findIdentifierback to summary
public default Optional<T> findIdentifier(@NonNull BibEntry entry) throws FetcherException

Implements org.jabref.logic.importer.IdFetcher.findIdentifier.

Doc from org.jabref.logic.importer.IdFetcher.findIdentifier.

Looks for an identifier based on the information stored in the given BibEntry.

Annotations
@Override
getParserback to summary
public Parser getParser()

Returns the parser used to convert the response to a list of BibEntry.

getURLForEntryback to summary
public URL getURLForEntry(BibEntry entry) throws URISyntaxException, MalformedURLException, FetcherException

Constructs a URL based on the BibEntry.

Parameters
entry:BibEntry

the entry to look information for