Verified Owner
Top Description Constructors Methods
org.jabref.logic.importer.fetcher.transformers

public Class ScopusQueryTransformer

extends YearRangeByFilteringQueryTransformer
Class Inheritance
Imports
java.util.Optional

Query transformer for the Scopus Search API.

Scopus uses specific field codes for advanced search:

Scopus supports AND, OR, AND NOT as boolean operators.

See: https://dev.elsevier.com/sc_search_tips.html.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected String
getLogicalAndOperator()

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.getLogicalAndOperator.

Returns the logical AND operator used by the library Note: whitespaces have to be included around the operator

Example: " AND "

protected String
getLogicalNotOperator()

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.getLogicalNotOperator.

Returns the logical NOT operator used by the library

Example: "!"

protected String
getLogicalOrOperator()

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.getLogicalOrOperator.

Returns the logical OR operator used by the library Note: whitespaces have to be included around the operator

Example: " OR "

protected String
handleAuthor(String author)

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleAuthor.

Return a string representation of the author fielded term

protected String
protected String
handleJournal(String journalTitle)

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleJournal.

Return a string representation of the journal fielded term

protected Optional<String>
handleOtherField(String fieldAsString, String term)

Overrides org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleOtherField.

Return a string representation of the provided field If it is not supported return an empty optional.

protected String
handleTitle(String title)

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleTitle.

Return a string representation of the title fielded term

protected Optional<String>
handleUnFieldedTerm(String term)

Overrides org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleUnFieldedTerm.

Return a string representation of the un-fielded (default fielded) term

Default implementation: just return the term (in quotes if a space is contained)

protected String
handleYear(String year)

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleYear.

Return a string representation of the year fielded term

protected String
Inherited from org.jabref.logic.importer.fetcher.transformers.YearRangeByFilteringQueryTransformer:
getEndYeargetStartYear

Constructor Detail

ScopusQueryTransformerback to summary
public ScopusQueryTransformer()

Method Detail

getLogicalAndOperatorback to summary
protected String getLogicalAndOperator()

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.getLogicalAndOperator.

Doc from org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.getLogicalAndOperator.

Returns the logical AND operator used by the library Note: whitespaces have to be included around the operator

Example: " AND "

Annotations
@Override
getLogicalNotOperatorback to summary
protected String getLogicalNotOperator()

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.getLogicalNotOperator.

Doc from org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.getLogicalNotOperator.

Returns the logical NOT operator used by the library

Example: "!"

Annotations
@Override
getLogicalOrOperatorback to summary
protected String getLogicalOrOperator()

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.getLogicalOrOperator.

Doc from org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.getLogicalOrOperator.

Returns the logical OR operator used by the library Note: whitespaces have to be included around the operator

Example: " OR "

Annotations
@Override
handleAuthorback to summary
protected String handleAuthor(String author)

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleAuthor.

Doc from org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleAuthor.

Return a string representation of the author fielded term

Annotations
@Override
handleDoiback to summary
protected String handleDoi(String doi)

Overrides org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleDoi.

Annotations
@Override
handleJournalback to summary
protected String handleJournal(String journalTitle)

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleJournal.

Doc from org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleJournal.

Return a string representation of the journal fielded term

Annotations
@Override
handleOtherFieldback to summary
protected Optional<String> handleOtherField(String fieldAsString, String term)

Overrides org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleOtherField.

Doc from org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleOtherField.

Return a string representation of the provided field If it is not supported return an empty optional.

Annotations
@Override
handleTitleback to summary
protected String handleTitle(String title)

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleTitle.

Doc from org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleTitle.

Return a string representation of the title fielded term

Annotations
@Override
handleUnFieldedTermback to summary
protected Optional<String> handleUnFieldedTerm(String term)

Overrides org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleUnFieldedTerm.

Doc from org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleUnFieldedTerm.

Return a string representation of the un-fielded (default fielded) term

Default implementation: just return the term (in quotes if a space is contained)

Annotations
@Override
handleYearback to summary
protected String handleYear(String year)

Implements abstract org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleYear.

Doc from org.jabref.logic.importer.fetcher.transformers.AbstractQueryTransformer.handleYear.

Return a string representation of the year fielded term

Annotations
@Override
handleYearRangeback to summary
protected String handleYearRange(String yearRange)

Overrides org.jabref.logic.importer.fetcher.transformers.YearRangeByFilteringQueryTransformer.handleYearRange.

Doc from org.jabref.logic.importer.fetcher.transformers.YearRangeByFilteringQueryTransformer.handleYearRange.

The API does not support querying for a year range. Nevertheless, we store the start year and end year, because we filter it after fetching all results

Annotations
@Override