Top Fields Constructors Methods
org.jabref.logic.importer.fetcher

public Class IacrEprintFetcher

extends Object
implements FulltextFetcher, IdBasedFetcher
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.IdBasedFetcher, org.jabref.logic.importer.WebFetcher, org.jabref.logic.importer.FulltextFetcher
Imports
java.io.IOException, java.net.URL, java.util.Objects, .Optional, java.util.function.Predicate, java.util.regex.Pattern, org.jabref.logic.importer.FetcherException, .FulltextFetcher, .IdBasedFetcher, .ImportFormatPreferences, .ParseException, org.jabref.logic.importer.fileformat.BibtexParser, org.jabref.logic.l10n.Localization, org.jabref.logic.net.URLDownload, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.StandardField, org.jabref.model.strings.StringUtil

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
private static final Predicate<String>
public static final String
private final ImportFormatPreferences
private static final String
private static final Pattern

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Optional<BibEntry>
public Optional<URL>
findFullText(BibEntry
The Bibtex entry
entry
)

Implements org.jabref.logic.importer.FulltextFetcher.findFullText.

Tries to find a fulltext URL for a given BibTex entry.

private String
getAbstract(String descriptiveHtml)

private String
getDate(String descriptiveHtml)

private String
public String
getName()

Implements org.jabref.logic.importer.WebFetcher.getName.

Returns the localized name of this fetcher.

private String
public TrustLevel
getTrustLevel()

Overrides default org.jabref.logic.importer.FulltextFetcher.getTrustLevel.

Returns the level of trust for this fetcher.

private String
getVersion(String identifier, String versionHtml)

private boolean
public Optional<BibEntry>
performSearchById(String
a string which uniquely identifies the item
identifier
)

Implements org.jabref.logic.importer.IdBasedFetcher.performSearchById.

Looks for bibliographic information associated to the given identifier.

private void
setAdditionalFields(BibEntry entry, String identifier)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CITATION_URL_PREFIXback to summary
private static final String CITATION_URL_PREFIX
DESCRIPTION_URL_PREFIXback to summary
private static final String DESCRIPTION_URL_PREFIX
FULLTEXT_URL_PREFIXback to summary
private static final String FULLTEXT_URL_PREFIX
IDENTIFIER_PREDICATEback to summary
private static final Predicate<String> IDENTIFIER_PREDICATE
NAMEback to summary
public static final String NAME
prefsback to summary
private final ImportFormatPreferences prefs
VERSION_URL_PREFIXback to summary
private static final String VERSION_URL_PREFIX
WITHOUT_LETTERS_SPACEback to summary
private static final Pattern WITHOUT_LETTERS_SPACE

Constructor Detail

IacrEprintFetcherback to summary
public IacrEprintFetcher(ImportFormatPreferences prefs)

Method Detail

createEntryFromIacrCitationback to summary
private Optional<BibEntry> createEntryFromIacrCitation(String validIdentifier) throws FetcherException
findFullTextback to summary
public Optional<URL> findFullText(BibEntry entry) throws IOException, FetcherException

Implements org.jabref.logic.importer.FulltextFetcher.findFullText.

Doc from org.jabref.logic.importer.FulltextFetcher.findFullText.

Tries to find a fulltext URL for a given BibTex entry.

Parameters
entry:BibEntry

The Bibtex entry

Returns:Optional<URL>

The fulltext PDF URL Optional, if found, or an empty Optional if not found.

Annotations
@Override
Exceptions
IOException:
if an IO operation has failed
FetcherException:
if a fetcher specific error occurred
getAbstractback to summary
private String getAbstract(String descriptiveHtml) throws FetcherException
getDateback to summary
private String getDate(String descriptiveHtml) throws FetcherException
getHtmlback to summary
private String getHtml(String url) throws FetcherException
getNameback to summary
public String getName()

Implements org.jabref.logic.importer.WebFetcher.getName.

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

Returns the localized name of this fetcher. The title can be used to display the fetcher in the menu and in the side pane.

Returns:String

the localized name

Annotations
@Override
getRequiredValueBetweenback to summary
private String getRequiredValueBetween(String from, String to, String haystack) throws FetcherException
getTrustLevelback to summary
public TrustLevel getTrustLevel()

Overrides default org.jabref.logic.importer.FulltextFetcher.getTrustLevel.

Doc from org.jabref.logic.importer.FulltextFetcher.getTrustLevel.

Returns the level of trust for this fetcher. We distinguish between publishers and meta search engines for example.

Returns:TrustLevel

The trust level of the fetcher, the higher the better

Annotations
@Override
getVersionback to summary
private String getVersion(String identifier, String versionHtml) throws FetcherException
isFromOrAfterYear2000back to summary
private boolean isFromOrAfterYear2000(BibEntry entry) throws FetcherException
performSearchByIdback to summary
public Optional<BibEntry> performSearchById(String identifier) throws FetcherException

Implements org.jabref.logic.importer.IdBasedFetcher.performSearchById.

Doc from org.jabref.logic.importer.IdBasedFetcher.performSearchById.

Looks for bibliographic information associated to the given identifier.

Parameters
identifier:String

a string which uniquely identifies the item

Returns:Optional<BibEntry>

a BibEntry containing the bibliographic information (or an empty optional if no data was found)

Annotations
@Override
setAdditionalFieldsback to summary
private void setAdditionalFields(BibEntry entry, String identifier) throws FetcherException