Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.exporter

public Class SearchRxivExporter

extends Object
Class Inheritance
Imports
java.io.IOException, java.nio.file.Files, .Path, java.util.LinkedHashMap, .List, .Locale, .Map, org.jabref.logic.util.io.FileNameCleaner, .FileUtil, org.jabref.model.study.Study, .StudyCatalog, .StudyQuery, tools.jackson.databind.ObjectMapper

Exports study search queries in the SearchRxiv / search-query JSON format. One file is created per query and database combination, as the format uses a single platform string per record.

The JSON format follows the search-query library's SearchFile specification.

See Also
search-query library, search-query format documentation, SearchRxiv

Field Summary

Modifier and TypeField and Description
private static final ObjectMapper
public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String
buildFileName(String query, String catalogName, int index)

private String
buildJson(Study study, String query, String platform)

Builds a JSON string following the search-query format.

public void
export(Study
The study containing queries, catalogs, and authors
study
,
Path
The target directory to write the JSON files into
directory
)

Exports the study's search queries as JSON files to the given directory.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

OBJECT_MAPPERback to summary
private static final ObjectMapper OBJECT_MAPPER
SEARCHRXIV_URLback to summary
public static final String SEARCHRXIV_URL

Constructor Detail

SearchRxivExporterback to summary
public SearchRxivExporter()

Method Detail

buildFileNameback to summary
private String buildFileName(String query, String catalogName, int index)
buildJsonback to summary
private String buildJson(Study study, String query, String platform) throws IOException

Builds a JSON string following the search-query format. Format spec: search-query

exportback to summary
public void export(Study study, Path directory) throws IOException

Exports the study's search queries as JSON files to the given directory. One file per query and catalog combination is created.

Parameters
study:Study

The study containing queries, catalogs, and authors

directory:Path

The target directory to write the JSON files into

Exceptions
IOException:
if a file cannot be written