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.BufferedInputStream, .FileNotFoundException, .IOException, .InputStream, java.net.MalformedURLException, .URISyntaxException, .URL, java.util.List, .Objects, .Optional, org.jabref.model.entry.BibEntry, org.jabref.model.entry.identifier.Identifier, 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 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.

public default Optional<T>
findIdentifier(BibEntry
the BibEntry for which an identifier should be found
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 closest match in the result)

fetchedEntries:List<BibEntry>

list of entries returned by the web service

findIdentifierback to summary
public default Optional<T> findIdentifier(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.

Parameters
entry:BibEntry

the BibEntry for which an identifier should be found

Returns:Optional<T>

the identifier (if an ID was found, otherwise an empty Optional)

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