Verified Owner
Top Fields Constructors Methods
org.jabref.toolkit.commands

pack-priv Class CheckIntegrity

extends Object
implements Callable<Integer>
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Callable
Annotations
@Command
name:integrity
description:Check integrity of the library.
Imports
java.io.IOException, .OutputStreamWriter, .Writer, java.nio.file.Path, java.util.List, .Locale, java.util.concurrent.Callable, java.util.stream.Collectors, org.jabref.logic.importer.ParserResult, org.jabref.logic.integrity.IntegrityCheck, .IntegrityCheckResultCsvWriter, .IntegrityCheckResultErrorFormatWriter, .IntegrityCheckResultGitHubActionsWriter, .IntegrityCheckResultWriter, .IntegrityMessage, org.jabref.logic.journals.JournalAbbreviationLoader, org.jabref.logic.l10n.Localization, org.jabref.model.database.BibDatabaseContext, org.jabref.toolkit.exception.ImportServiceException, org.jabref.toolkit.service.ImportService, org.slf4j.Logger, .LoggerFactory, picocli.CommandLine

Field Summary

Modifier and TypeField and Description
private boolean
private Check
private InputOption
private static final Logger
private String
private JabKit.SharedOptions

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Integer
call()

Implements java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

pack-priv static int

Returns:

the exit code (0 = no findings, 1 = integrity findings present, 2/3 = error)
execute
(Path inputFile, String outputFormat, boolean allowIntegerEdition, boolean porcelain, JabKit jabKit)

Runs the integrity check on inputFile and writes the findings to System.out.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allowIntegerEditionback to summary
private boolean allowIntegerEdition
Annotations
@Option
names:--allow-integer-edition
description:Allows Integer edition
negatable:true
defaultValue:true
fallbackValue:true
checkback to summary
private Check check
Annotations
@ParentCommand
inputOptionback to summary
private InputOption inputOption
Annotations
@Mixin
LOGGERback to summary
private static final Logger LOGGER
outputFormatback to summary
private String outputFormat
Annotations
@Option
names:--output-format
description:Output format: csv, errorformat, github-actions or txt
defaultValue:errorformat
sharedOptionsback to summary
private JabKit.SharedOptions sharedOptions
Annotations
@Mixin

Constructor Detail

CheckIntegrityback to summary
pack-priv CheckIntegrity()

Method Detail

callback to summary
public Integer call() throws ImportServiceException

Implements java.util.concurrent.Callable.call.

Doc from java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

Annotations
@Override
executeback to summary
pack-priv static int execute(Path inputFile, String outputFormat, boolean allowIntegerEdition, boolean porcelain, JabKit jabKit) throws ImportServiceException

Runs the integrity check on inputFile and writes the findings to System.out.

Shared with the parent check command, which runs both checks at once.

Returns:int

the exit code (0 = no findings, 1 = integrity findings present, 2/3 = error)