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

public Class ArXivFetcher

extends Object
implements FulltextFetcher, PagedSearchBasedFetcher, IdBasedFetcher, IdFetcher<ArXivIdentifier>
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.IdFetcher, org.jabref.logic.importer.WebFetcher, org.jabref.logic.importer.IdBasedFetcher, org.jabref.logic.importer.PagedSearchBasedFetcher, org.jabref.logic.importer.SearchBasedFetcher, org.jabref.logic.importer.FulltextFetcher
Imports
java.io.IOException, java.net.HttpURLConnection, .MalformedURLException, .URISyntaxException, .URL, java.util.ArrayList, .Collection, .Collections, .List, .Map, .Objects, .Optional, .Set, java.util.concurrent.CompletableFuture, .CompletionException, .ExecutorService, .Executors, java.util.stream.Collectors, javax.xml.parsers.DocumentBuilder, .DocumentBuilderFactory, .ParserConfigurationException, org.jabref.logic.cleanup.EprintCleanup, org.jabref.logic.help.HelpFile, org.jabref.logic.importer.FetcherException, .FulltextFetcher, .IdBasedFetcher, .IdFetcher, .ImportFormatPreferences, .PagedSearchBasedFetcher, org.jabref.logic.importer.fetcher.transformers.ArXivQueryTransformer, org.jabref.logic.util.io.XMLUtil, org.jabref.logic.util.strings.StringSimilarity, org.jabref.model.entry.BibEntry, .KeywordList, .LinkedFile, org.jabref.model.entry.field.Field, .InternalField, .StandardField, org.jabref.model.entry.identifier.ArXivIdentifier, .DOI, org.jabref.model.entry.types.StandardEntryType, org.jabref.model.paging.Page, org.jabref.model.strings.StringUtil, org.jabref.model.util.OptionalUtil, org.apache.hc.core5.net.URIBuilder, org.apache.lucene.queryparser.flexible.core.nodes.QueryNode, org.slf4j.Logger, .LoggerFactory, org.w3c.dom.Document, .Node, org.xml.sax.SAXException

Fetcher for ArXiv that merges fields from arXiv-issued DOIs (and user-issued ones when applicable) to get more information overall.

These are the post-processing steps applied to the original fetch from ArXiv's API:

  1. Use ArXiv-issued DOI to get more merge more data with original entry, overwriting some of those fields;
  2. Use user-issued DOI (if it was provided) to merge even more data with the result of the previous step, overwriting some of those fields;
  3. Modify keywords: remove repetitions and adapt some edge cases (commas in keyword transformed into forward slashes).
See Also
arXiv.org blog for more info about arXiv-issued DOIs, ArXiv API for an overview of the API, ArXiv API User's Manual for a detailed description on how to use the API

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
ArXivFetcher.ArXiv

Fetcher for the arXiv.

Field Summary

Modifier and TypeField and Description
private final ArXivFetcher.ArXiv
private static final Map<String, String>
private static final Set<Field>
private static final Set<Field>
private static final String
private final DoiFetcher
private final ImportFormatPreferences
private static final Logger

Constructor Summary

AccessConstructor and Description
public
ArXivFetcher(ImportFormatPreferences importFormatPreferences)

public
ArXivFetcher(ImportFormatPreferences importFormatPreferences, DoiFetcher
The fetcher, maybe be NULL if no additional search is desired.
doiFetcher
)

Method Summary

Modifier and TypeMethod and Description
private void
adaptKeywordsFrom(BibEntry
A BibEntry to modify
bibEntry
)

Remove duplicate values on "KEYWORD" field, if any.

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.

public Optional<ArXivIdentifier>
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.

private static String

Returns:

ArXiv-issued DOI
getAutomaticDoi
(String
An ArXiv ID
arXivId
)

Get ArXiv-issued DOI from the entry's arXiv ID ArXiv-issued DOIs are identifiers associated with every ArXiv entry.

private static Optional<String>

Returns:

ArXiv-issued DOI, or Empty, if method could not retrieve it
getAutomaticDoi
(BibEntry
A Bibtex Entry, formatted as a ArXiv entry. Must contain an EPRINT field
arXivBibEntry
)

Get ArXiv-issued DOI from the arXiv entry itself.

private static String

Returns:

ArXiv-issued DOI
getAutomaticDoi
(ArXivIdentifier
An ArXiv ID as internal object
arXivId
)

Get ArXiv-issued DOI from ArXiv Identifier object ArXiv-issued DOIs are identifiers associated with every ArXiv entry.

public Optional<HelpFile>
getHelpPage()

Overrides default org.jabref.logic.importer.WebFetcher.getHelpPage.

Returns the help page for this fetcher.

public String
getIdentifierName()

Implements org.jabref.logic.importer.IdFetcher.getIdentifierName.

Returns the name of the identifier that is returned by this fetcher.

private static Optional<String>

Returns:

User-issued DOI, if any field exists and if it's not an automatic one (see getAutomaticDoi(ArXivIdentifier))
getManualDoi
(BibEntry
An ArXiv Bibtex entry from where the DOI is extracted
arXivBibEntry
)

Get user-issued DOI from ArXiv Bibtex entry, if any User-issued DOIs are identifiers associated with some ArXiv entries that can associate an entry with an external service, like Springer Link.

public String
getName()

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

Returns the localized name of this fetcher.

public TrustLevel
getTrustLevel()

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

Returns the level of trust for this fetcher.

private void
inplaceAsyncInfuseArXivWithDoi(BibEntry
An existing entry to be updated with new/modified fields
arXivBibEntry
)

Infuse arXivBibEntryPromise with additional fields in an asynchronous way

private void
inplaceAsyncInfuseArXivWithDoi(CompletableFuture<Optional<BibEntry>>
A future entry that (if it exists) will be updated with new/modified fields
arXivBibEntryFuture
,
Optional<ArXivIdentifier>
An ArXiv ID for the main reference (from ArXiv), so that the retrieval of ArXiv-issued DOI metadata can be faster
arXivId
)

Infuse arXivBibEntryFuture with additional fields in an asynchronous way, accelerating the process by providing a valid ArXiv ID

private static boolean
isManualDoi(String doi)

Check if a specific DOI is user-assigned.

private void
mergeArXivEntryWithFutureDoiEntry(BibEntry
The entry to merge into
arXivEntry
,
CompletableFuture<Optional<BibEntry>>
A future result of the fetching process
bibEntryFuture
,
Set<Field>
Which fields from "bibEntryFuture" to prioritize, replacing them on "arXivEntry"
priorityFields
,
String
Identifier used in initiating the "bibEntryFuture" future (for logging). This is usually a DOI, but can be anything.
id
)

Eventually merge the ArXiv Bibtex entry with a Future Bibtex entry (ArXiv/user-assigned DOIs)

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.

public Page<BibEntry>

Returns:

A list of entries matching the complex query
performSearchPaged
(org.apache.lucene.queryparser.flexible.core.nodes.QueryNode
the root node of the lucene query
luceneQuery
,
int
requested site number indexed from 0
pageNumber
)

Implements org.jabref.logic.importer.PagedSearchBasedFetcher.performSearchPaged.

Constructs a complex query string using the field prefixes specified at https://arxiv.org/help/api/user-manual and modify resulting BibEntries with additional info from the ArXiv-issued DOI

private static Optional<BibEntry>

Returns:

the fetch result
waitForBibEntryRetrieval
(CompletableFuture<Optional<BibEntry>>
A CompletableFuture that parallelize the API fetching process
bibEntryFuture
)

Get the Bibtex Entry from a Future API request (uses blocking) and treat exceptions.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arXivback to summary
private final ArXivFetcher.ArXiv arXiv
ARXIV_KEYWORDS_WITH_COMMA_REPLACEMENTSback to summary
private static final Map<String, String> ARXIV_KEYWORDS_WITH_COMMA_REPLACEMENTS
CHOSEN_AUTOMATIC_DOI_FIELDSback to summary
private static final Set<Field> CHOSEN_AUTOMATIC_DOI_FIELDS
CHOSEN_MANUAL_DOI_FIELDSback to summary
private static final Set<Field> CHOSEN_MANUAL_DOI_FIELDS
DOI_PREFIXback to summary
private static final String DOI_PREFIX
doiFetcherback to summary
private final DoiFetcher doiFetcher
importFormatPreferencesback to summary
private final ImportFormatPreferences importFormatPreferences
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

ArXivFetcherback to summary
public ArXivFetcher(ImportFormatPreferences importFormatPreferences)
ArXivFetcherback to summary
public ArXivFetcher(ImportFormatPreferences importFormatPreferences, DoiFetcher doiFetcher)
Parameters
doiFetcher:DoiFetcher

The fetcher, maybe be NULL if no additional search is desired.

Method Detail

adaptKeywordsFromback to summary
private void adaptKeywordsFrom(BibEntry bibEntry)

Remove duplicate values on "KEYWORD" field, if any. Al

Parameters
bibEntry:BibEntry

A BibEntry to modify

findFullTextback to summary
public Optional<URL> findFullText(BibEntry entry) throws IOException

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
findIdentifierback to summary
public Optional<ArXivIdentifier> 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<ArXivIdentifier>

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

Annotations
@Override
getAutomaticDoiback to summary
private static String getAutomaticDoi(String arXivId)

Get ArXiv-issued DOI from the entry's arXiv ID

ArXiv-issued DOIs are identifiers associated with every ArXiv entry. They are composed of a fixed DOI_PREFIX + the entry's ArXiv ID

Parameters
arXivId:String

An ArXiv ID

Returns:String

ArXiv-issued DOI

getAutomaticDoiback to summary
private static Optional<String> getAutomaticDoi(BibEntry arXivBibEntry)

Get ArXiv-issued DOI from the arXiv entry itself.

ArXiv-issued DOIs are identifiers associated with every ArXiv entry. They are composed of a fixed DOI_PREFIX + the entry's ArXiv ID

Parameters
arXivBibEntry:BibEntry

A Bibtex Entry, formatted as a ArXiv entry. Must contain an EPRINT field

Returns:Optional<String>

ArXiv-issued DOI, or Empty, if method could not retrieve it

getAutomaticDoiback to summary
private static String getAutomaticDoi(ArXivIdentifier arXivId)

Get ArXiv-issued DOI from ArXiv Identifier object

ArXiv-issued DOIs are identifiers associated with every ArXiv entry. They are composed of a fixed DOI_PREFIX + the entry's ArXiv ID

Parameters
arXivId:ArXivIdentifier

An ArXiv ID as internal object

Returns:String

ArXiv-issued DOI

getHelpPageback to summary
public Optional<HelpFile> getHelpPage()

Overrides default org.jabref.logic.importer.WebFetcher.getHelpPage.

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

Returns the help page for this fetcher.

Returns:Optional<HelpFile>

the HelpFile enum constant for the help page

Annotations
@Override
getIdentifierNameback to summary
public String getIdentifierName()

Implements org.jabref.logic.importer.IdFetcher.getIdentifierName.

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

Returns the name of the identifier that is returned by this fetcher.

Annotations
@Override
getManualDoiback to summary
private static Optional<String> getManualDoi(BibEntry arXivBibEntry)

Get user-issued DOI from ArXiv Bibtex entry, if any

User-issued DOIs are identifiers associated with some ArXiv entries that can associate an entry with an external service, like Springer Link.

Parameters
arXivBibEntry:BibEntry

An ArXiv Bibtex entry from where the DOI is extracted

Returns:Optional<String>

User-issued DOI, if any field exists and if it's not an automatic one (see getAutomaticDoi(ArXivIdentifier))

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
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
inplaceAsyncInfuseArXivWithDoiback to summary
private void inplaceAsyncInfuseArXivWithDoi(BibEntry arXivBibEntry)

Infuse arXivBibEntryPromise with additional fields in an asynchronous way

Parameters
arXivBibEntry:BibEntry

An existing entry to be updated with new/modified fields

inplaceAsyncInfuseArXivWithDoiback to summary
private void inplaceAsyncInfuseArXivWithDoi(CompletableFuture<Optional<BibEntry>> arXivBibEntryFuture, Optional<ArXivIdentifier> arXivId) throws FetcherException

Infuse arXivBibEntryFuture with additional fields in an asynchronous way, accelerating the process by providing a valid ArXiv ID

Parameters
arXivBibEntryFuture:CompletableFuture<Optional<BibEntry>>

A future entry that (if it exists) will be updated with new/modified fields

arXivId:Optional<ArXivIdentifier>

An ArXiv ID for the main reference (from ArXiv), so that the retrieval of ArXiv-issued DOI metadata can be faster

Exceptions
FetcherException:
when failed to fetch the main ArtXiv Bibtex entry ('arXivBibEntryFuture').
isManualDoiback to summary
private static boolean isManualDoi(String doi)

Check if a specific DOI is user-assigned.

mergeArXivEntryWithFutureDoiEntryback to summary
private void mergeArXivEntryWithFutureDoiEntry(BibEntry arXivEntry, CompletableFuture<Optional<BibEntry>> bibEntryFuture, Set<Field> priorityFields, String id)

Eventually merge the ArXiv Bibtex entry with a Future Bibtex entry (ArXiv/user-assigned DOIs)

Parameters
arXivEntry:BibEntry

The entry to merge into

bibEntryFuture:CompletableFuture<Optional<BibEntry>>

A future result of the fetching process

priorityFields:Set<Field>

Which fields from "bibEntryFuture" to prioritize, replacing them on "arXivEntry"

id:String

Identifier used in initiating the "bibEntryFuture" future (for logging). This is usually a DOI, but can be anything.

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
performSearchPagedback to summary
public Page<BibEntry> performSearchPaged(org.apache.lucene.queryparser.flexible.core.nodes.QueryNode luceneQuery, int pageNumber) throws FetcherException

Implements org.jabref.logic.importer.PagedSearchBasedFetcher.performSearchPaged.

Constructs a complex query string using the field prefixes specified at https://arxiv.org/help/api/user-manual and modify resulting BibEntries with additional info from the ArXiv-issued DOI

Parameters
luceneQuery:org.apache.lucene.queryparser.flexible.core.nodes.QueryNode

the root node of the lucene query

pageNumber:int

Doc from org.jabref.logic.importer.PagedSearchBasedFetcher.performSearchPaged.

requested site number indexed from 0

Returns:Page<BibEntry>

A list of entries matching the complex query

Annotations
@Override
waitForBibEntryRetrievalback to summary
private static Optional<BibEntry> waitForBibEntryRetrieval(CompletableFuture<Optional<BibEntry>> bibEntryFuture) throws FetcherException

Get the Bibtex Entry from a Future API request (uses blocking) and treat exceptions.

Parameters
bibEntryFuture:CompletableFuture<Optional<BibEntry>>

A CompletableFuture that parallelize the API fetching process

Returns:Optional<BibEntry>

the fetch result

org.jabref.logic.importer.fetcher back to summary

protected Class ArXivFetcher.ArXiv

extends Object
implements FulltextFetcher, PagedSearchBasedFetcher, IdBasedFetcher, IdFetcher<ArXivIdentifier>
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.IdFetcher, org.jabref.logic.importer.WebFetcher, org.jabref.logic.importer.IdBasedFetcher, org.jabref.logic.importer.PagedSearchBasedFetcher, org.jabref.logic.importer.SearchBasedFetcher, org.jabref.logic.importer.FulltextFetcher

Fetcher for the arXiv.
See Also
ArXiv API for an overview of the API, ArXiv API User's Manual for a detailed description on how to use the API

Similar implementions: arxiv2bib which is live dspace-portalmec

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final String
private static final DocumentBuilderFactory
private final ImportFormatPreferences
private static final Logger

Constructor Summary

AccessConstructor and Description
public
ArXiv(ImportFormatPreferences importFormatPreferences)

Method Summary

Modifier and TypeMethod and Description
protected CompletableFuture<Optional<BibEntry>>
private Document

Returns:

the response from the API as a XML document (Atom 1.0)
callApi
(String
the search query used to find articles; details
searchQuery
,
List<ArXivIdentifier>
a list of arXiv identifiers
ids
,
int
the index of the first returned result (zero-based)
start
,
int
the number of maximal results (has to be smaller than 2000)
maxResults
)

Queries the API.

private List<BibEntry>
filterYears(List<BibEntry> searchResult, ArXivQueryTransformer transformer)

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.

public Optional<ArXivIdentifier>
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.

private FetcherException
public Optional<HelpFile>
getHelpPage()

Overrides default org.jabref.logic.importer.WebFetcher.getHelpPage.

Returns the help page for this fetcher.

public String
getIdentifierName()

Implements org.jabref.logic.importer.IdFetcher.getIdentifierName.

Returns the name of the identifier that is returned by this fetcher.

public String
getName()

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

Returns the localized name of this fetcher.

public TrustLevel
getTrustLevel()

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

Returns the level of trust for this fetcher.

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.

public Page<BibEntry>

Returns:

A list of entries matching the complex query
performSearchPaged
(org.apache.lucene.queryparser.flexible.core.nodes.QueryNode
the root node of the lucene query
luceneQuery
,
int
requested site number indexed from 0
pageNumber
)

Implements org.jabref.logic.importer.PagedSearchBasedFetcher.performSearchPaged.

Constructs a complex query string using the field prefixes specified at https://arxiv.org/help/api/user-manual

private List<ArXivFetcher.ArXiv.ArXivEntry>
queryApi(String searchQuery, List<ArXivIdentifier> ids, int start, int maxResults)

private List<ArXivFetcher.ArXiv.ArXivEntry>
searchForEntries(BibEntry originalEntry)

private List<ArXivFetcher.ArXiv.ArXivEntry>
searchForEntries(String searchQuery, int pageNumber)

private Optional<ArXivFetcher.ArXiv.ArXivEntry>
searchForEntry(String searchQuery)

private Optional<ArXivFetcher.ArXiv.ArXivEntry>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

API_URLback to summary
private static final String API_URL
DOCUMENT_BUILDER_FACTORYback to summary
private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY
importFormatPreferencesback to summary
private final ImportFormatPreferences importFormatPreferences
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

ArXivback to summary
public ArXiv(ImportFormatPreferences importFormatPreferences)

Method Detail

asyncPerformSearchByIdback to summary
protected CompletableFuture<Optional<BibEntry>> asyncPerformSearchById(String identifier) throws CompletionException
callApiback to summary
private Document callApi(String searchQuery, List<ArXivIdentifier> ids, int start, int maxResults) throws FetcherException

Queries the API.

If only searchQuery is given, then the API will return results for each article that matches the query. If only ids is given, then the API will return results for each article in the list. If both searchQuery and ids are given, then the API will return each article in ids that matches searchQuery. This allows the API to act as a results filter.

Parameters
searchQuery:String

the search query used to find articles; details

ids:List<ArXivIdentifier>

a list of arXiv identifiers

start:int

the index of the first returned result (zero-based)

maxResults:int

the number of maximal results (has to be smaller than 2000)

Returns:Document

the response from the API as a XML document (Atom 1.0)

Exceptions
FetcherException:
if there was a problem while building the URL or the API was not accessible
filterYearsback to summary
private List<BibEntry> filterYears(List<BibEntry> searchResult, ArXivQueryTransformer transformer)
findFullTextback to summary
public Optional<URL> findFullText(BibEntry entry) throws IOException

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
findIdentifierback to summary
public Optional<ArXivIdentifier> 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<ArXivIdentifier>

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

Annotations
@Override
getExceptionback to summary
private FetcherException getException(Document error)
getHelpPageback to summary
public Optional<HelpFile> getHelpPage()

Overrides default org.jabref.logic.importer.WebFetcher.getHelpPage.

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

Returns the help page for this fetcher.

Returns:Optional<HelpFile>

the HelpFile enum constant for the help page

Annotations
@Override
getIdentifierNameback to summary
public String getIdentifierName()

Implements org.jabref.logic.importer.IdFetcher.getIdentifierName.

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

Returns the name of the identifier that is returned by this fetcher.

Annotations
@Override
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
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
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
performSearchPagedback to summary
public Page<BibEntry> performSearchPaged(org.apache.lucene.queryparser.flexible.core.nodes.QueryNode luceneQuery, int pageNumber) throws FetcherException

Implements org.jabref.logic.importer.PagedSearchBasedFetcher.performSearchPaged.

Constructs a complex query string using the field prefixes specified at https://arxiv.org/help/api/user-manual

Parameters
luceneQuery:org.apache.lucene.queryparser.flexible.core.nodes.QueryNode

the root node of the lucene query

pageNumber:int

Doc from org.jabref.logic.importer.PagedSearchBasedFetcher.performSearchPaged.

requested site number indexed from 0

Returns:Page<BibEntry>

A list of entries matching the complex query

Annotations
@Override
queryApiback to summary
private List<ArXivFetcher.ArXiv.ArXivEntry> queryApi(String searchQuery, List<ArXivIdentifier> ids, int start, int maxResults) throws FetcherException
searchForEntriesback to summary
private List<ArXivFetcher.ArXiv.ArXivEntry> searchForEntries(BibEntry originalEntry) throws FetcherException
searchForEntriesback to summary
private List<ArXivFetcher.ArXiv.ArXivEntry> searchForEntries(String searchQuery, int pageNumber) throws FetcherException
searchForEntryback to summary
private Optional<ArXivFetcher.ArXiv.ArXivEntry> searchForEntry(String searchQuery) throws FetcherException
searchForEntryByIdback to summary
private Optional<ArXivFetcher.ArXiv.ArXivEntry> searchForEntryById(String id) throws FetcherException
org.jabref.logic.importer.fetcher back to summary

private Class ArXivFetcher.ArXiv.ArXivEntry

extends Object
Class Inheritance
  • java.lang.Object
  • org.jabref.logic.importer.fetcher.ArXivFetcher.ArXiv.ArXivEntry

Field Summary

Modifier and TypeField and Description
private final Optional<String>
private final List<String>
private final List<String>
private final Optional<String>
private final Optional<String>
private final Optional<URL>
private final Optional<String>
private final Optional<String>
private final Optional<String>
private final Optional<String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static String
public Optional<String>
getDate()

Returns the date when the first version was put on the arXiv

public Optional<ArXivIdentifier>
public Optional<String>
getIdString()

Returns the arXiv identifier

public Optional<URL>
getPdfUrl()

Returns the url of the linked pdf

public BibEntry
toBibEntry(Character keywordDelimiter)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

abstractTextback to summary
private final Optional<String> abstractText
authorNamesback to summary
private final List<String> authorNames
categoriesback to summary
private final List<String> categories
doiback to summary
private final Optional<String> doi
journalReferenceTextback to summary
private final Optional<String> journalReferenceText
pdfUrlback to summary
private final Optional<URL> pdfUrl
primaryCategoryback to summary
private final Optional<String> primaryCategory
publishedDateback to summary
private final Optional<String> publishedDate
titleback to summary
private final Optional<String> title
urlAbstractPageback to summary
private final Optional<String> urlAbstractPage

Constructor Detail

ArXivEntryback to summary
public ArXivEntry(Node item)

Method Detail

correctLineBreaksback to summary
public static String correctLineBreaks(String s)
getDateback to summary
public Optional<String> getDate()

Returns the date when the first version was put on the arXiv

getIdback to summary
public Optional<ArXivIdentifier> getId()
getIdStringback to summary
public Optional<String> getIdString()

Returns the arXiv identifier

getPdfUrlback to summary
public Optional<URL> getPdfUrl()

Returns the url of the linked pdf

toBibEntryback to summary
public BibEntry toBibEntry(Character keywordDelimiter)