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

public Class SpringerFetcher

extends Object
implements PagedSearchBasedParserFetcher, CustomizableKeyFetcher
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.fetcher.CustomizableKeyFetcher, org.jabref.logic.importer.WebFetcher, org.jabref.logic.importer.PagedSearchBasedParserFetcher, org.jabref.logic.importer.ParserFetcher, org.jabref.logic.importer.PagedSearchBasedFetcher, org.jabref.logic.importer.SearchBasedFetcher, org.jabref.logic.importer.SearchBasedParserFetcher
Imports
java.io.BufferedReader, .InputStreamReader, java.net.MalformedURLException, .URISyntaxException, .URL, java.util.ArrayList, .List, .Optional, java.util.stream.Collectors, org.jabref.logic.help.HelpFile, org.jabref.logic.importer.FetcherException, .ImporterPreferences, .PagedSearchBasedParserFetcher, .Parser, org.jabref.logic.importer.fetcher.transformers.SpringerQueryTransformer, org.jabref.logic.util.BuildInfo, .OS, org.jabref.model.entry.BibEntry, .LinkedFile, .Month, org.jabref.model.entry.field.Field, .StandardField, org.jabref.model.entry.types.StandardEntryType, com.google.common.base.Strings, kong.unirest.core.json.JSONArray, kong.unirest.core.json.JSONObject, org.apache.hc.core5.net.URIBuilder, org.apache.lucene.queryparser.flexible.core.nodes.QueryNode, org.slf4j.Logger, .LoggerFactory

Fetches data from the Springer
See Also
API documentation for more details

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
public static final String
private final ImporterPreferences
private static final Logger
private static final String

Constructor Summary

AccessConstructor and Description
public
SpringerFetcher(ImporterPreferences importerPreferences)

Method Summary

Modifier and TypeMethod and Description
private String
public Optional<HelpFile>
getHelpPage()

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

Returns the help page for this fetcher.

public String
getName()

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

Returns the localized name of this fetcher.

public Parser
getParser()

Implements org.jabref.logic.importer.SearchBasedParserFetcher.getParser.

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

public String
public URL

Returns:

URL
getURLForQuery
(org.apache.lucene.queryparser.flexible.core.nodes.QueryNode
the search query
luceneQuery
,
int
the number of the page indexed from 0
pageNumber
)

Implements org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForQuery.

Gets the query URL

public static BibEntry

Returns:

the converted BibEntry
parseSpringerJSONtoBibtex
(kong.unirest.core.json.JSONObject
the JSONObject from search results
springerJsonEntry
)

Convert a JSONObject obtained from http://api.springer.com/metadata/json to a BibEntry

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

API_KEYback to summary
private static final String API_KEY
API_URLback to summary
private static final String API_URL
FETCHER_NAMEback to summary
public static final String FETCHER_NAME
importerPreferencesback to summary
private final ImporterPreferences importerPreferences
LOGGERback to summary
private static final Logger LOGGER
TEST_URL_WITHOUT_API_KEYback to summary
private static final String TEST_URL_WITHOUT_API_KEY

Constructor Detail

SpringerFetcherback to summary
public SpringerFetcher(ImporterPreferences importerPreferences)

Method Detail

constructComplexQueryStringback to summary
private String constructComplexQueryString(ComplexSearchQuery complexSearchQuery)
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
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
getParserback to summary
public Parser getParser()

Implements org.jabref.logic.importer.SearchBasedParserFetcher.getParser.

Doc from org.jabref.logic.importer.SearchBasedParserFetcher.getParser.

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

Annotations
@Override
getTestUrlback to summary
public String getTestUrl()

Overrides default org.jabref.logic.importer.fetcher.CustomizableKeyFetcher.getTestUrl.

Annotations
@Override
getURLForQueryback to summary
public URL getURLForQuery(org.apache.lucene.queryparser.flexible.core.nodes.QueryNode luceneQuery, int pageNumber) throws URISyntaxException, MalformedURLException, FetcherException

Implements org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForQuery.

Gets the query URL

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

the search query

pageNumber:int

the number of the page indexed from 0

Returns:URL

URL

Annotations
@Override
parseSpringerJSONtoBibtexback to summary
public static BibEntry parseSpringerJSONtoBibtex(kong.unirest.core.json.JSONObject springerJsonEntry)

Convert a JSONObject obtained from http://api.springer.com/metadata/json to a BibEntry

Parameters
springerJsonEntry:kong.unirest.core.json.JSONObject

the JSONObject from search results

Returns:BibEntry

the converted BibEntry