Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/code-howtos/fetchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Fetchers are the implementation of the [search using online services](https://do
| [SAO/NASA Astrophysics Data System](https://docs.jabref.org/collect/import-using-online-bibliographic-database#sao-nasa-astrophysics-data-system) | [ADS UI](https://ui.adsabs.harvard.edu/user/settings/token) | `AstrophysicsDataSystemAPIKey` | 5000 calls/day |
| [ScienceDirect](https://www.sciencedirect.com) | | `ScienceDirectApiKey` | |
| [SemanticScholar](https://www.semanticscholar.org/) | <https://www.semanticscholar.org/product/api#api-key-form> | `SemanticScholarApiKey` | |
| [Springer Nature](https://docs.jabref.org/collect/import-using-online-bibliographic-database#springer) | [Springer Nature API Portal](https://dev.springernature.com) | `SpringerNatureAPIKey` | 5000 calls/day |
| [Springer Nature](https://docs.jabref.org/collect/import-using-online-bibliographic-database#springer) | [Springer Nature API Portal](https://dev.springernature.com). Use the "Meta API" API key. | `SpringerNatureAPIKey` | 5000 calls/day |
| [Zentralblatt Math](https://www.zbmath.org) | (none) | (none) | Depending on the current network |
| [Biodiversity Heritage Library](https://www.biodiversitylibrary.org/) | [Biodiversitylibrary](https://about.biodiversitylibrary.org/tools-and-services/developer-and-data-tools/#APIs) | `BiodiversityHeritageApiKey` | - |

Expand Down
11 changes: 8 additions & 3 deletions jablib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -431,25 +431,30 @@ jmh {
zip64 = true
}

val testSourceSet = sourceSets["test"]

tasks.register<Test>("fetcherTest") {
group = LifecycleBasePlugin.VERIFICATION_GROUP
testClassesDirs = testSourceSet.output.classesDirs
classpath = testSourceSet.runtimeClasspath
useJUnitPlatform {
includeTags("FetcherTest")
}

maxParallelForks = 1
}

tasks.register<Test>("databaseTest") {
group = LifecycleBasePlugin.VERIFICATION_GROUP
testClassesDirs = testSourceSet.output.classesDirs
classpath = testSourceSet.runtimeClasspath
useJUnitPlatform {
includeTags("DatabaseTest")
}

testLogging {
// set options for log level LIFECYCLE
events("FAILED")
exceptionFormat = TestExceptionFormat.FULL
}

maxParallelForks = 1
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public class SpringerNatureFullTextFetcher implements FulltextFetcher, Customiza

private static final Logger LOGGER = LoggerFactory.getLogger(SpringerNatureFullTextFetcher.class);

// TODO: Update to the new [fulltext API](https://dev.springernature.com/docs/api-endpoints/fulltext-api/?source=jabref)
// as well as [Open Access API](https://dev.springernature.com/docs/api-endpoints/open-access/?source=jabref)
// Both APIs also [require separate API keys](https://dev.springernature.com/subscription/).
private static final String API_URL = "https://api.springer.com/meta/v1/json";
private static final String CONTENT_HOST = "link.springer.com";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,17 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Fetches data from the Springer
*
* @see <a href="https://dev.springernature.com/">API documentation</a> for more details
*/
/// Fetches data from Springer Nature
///
/// See <https://dev.springernature.com/docs/api-endpoints/meta-api/?source=jabref> for more information
public class SpringerNatureWebFetcher implements PagedSearchBasedParserFetcher, CustomizableKeyFetcher {
public static final String FETCHER_NAME = "Springer";

private static final Logger LOGGER = LoggerFactory.getLogger(SpringerNatureWebFetcher.class);

private static final String API_URL = "https://api.springernature.com/meta/v1/json";
private static final String API_URL = "https://api.springernature.com/meta/v2/json";
// Springer query using the parameter 'q=doi:10.1007/s11276-008-0131-4s=1' will respond faster
private static final String TEST_URL_WITHOUT_API_KEY = "https://api.springernature.com/meta/v1/json?q=doi:10.1007/s11276-008-0131-4s=1&p=1&api_key=";
private static final String TEST_URL_WITHOUT_API_KEY = "https://api.springernature.com/meta/v2/json?q=doi:10.1007/s11276-008-0131-4s=1&p=1&api_key=";

private final ImporterPreferences importerPreferences;

Expand All @@ -53,7 +51,7 @@ public SpringerNatureWebFetcher(ImporterPreferences importerPreferences) {
}

/**
* Convert a JSONObject obtained from <a href="http://api.springer.com/metadata/json">http://api.springer.com/metadata/json</a> to a BibEntry
* Convert a JSONObject obtained from <a href="https://dev.springernature.com/docs/api-endpoints/metadata-api/?source=jabref">the Metadata API</a> to a BibEntry
*
* @param springerJsonEntry the JSONObject from search results
* @return the converted BibEntry
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package org.jabref.logic.importer.fetcher.transformers;

/**
* This class converts a query string written in lucene syntax into a complex query.
*
* For simplicity this is currently limited to fielded data and the boolean AND operator.
*/
/// This class converts a query string written in lucene syntax into a complex query.
///
/// For simplicity this is currently limited to fielded data and the boolean AND operator.
///
/// See <https://dev.springernature.com/docs/supported-query-params/?source=data-solutions> for a complete list of supported fields.
/// `handleUnFieldedTerm` is not overridden, because the API handles unfielded terms.
public class SpringerQueryTransformer extends AbstractQueryTransformer {

@Override
Expand Down
Loading