Package org.verapdf.cli.commands
Class VeraCliArgParser
java.lang.Object
org.verapdf.cli.commands.VeraCliArgParser
This class holds all command-line options used by VeraPDF application.
- Author:
- Timur Kamalov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classJCommander parameter validator forFile, seeIParameterValidator.static final classJCommander parameter converter forPDFAFlavour, seeIStringConverterandPDFAFlavour.byFlavourId(String).static final classJCommander parameter converter forFormatOption, seeIStringConverterandFormatOption.fromOption(String). -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddLogs()appConfig(VeraAppConfig base) voidbooleanbooleangetBaseVeraPDFParameters(VeraCliArgParser cliArgParser) intgetLoggerLevel(Level level) intintbooleanbooleanisDebug()booleanbooleanisHelp()booleanbooleanisPolicy()booleanbooleanbooleanbooleanbooleanbooleanintintbooleanprefix()processorConfig(ProcessType procType, PluginsCollectionConfig plugConfig) voidsetValuesFromConfig(ConfigManager configManager) booleanboolean
-
Field Details
-
USE_CONFIG
- See Also:
-
-
Constructor Details
-
VeraCliArgParser
public VeraCliArgParser()
-
-
Method Details
-
showVersion
public boolean showVersion()- Returns:
- true if version information requested
-
listProfiles
public boolean listProfiles()- Returns:
- true if list of supported profiles requested
-
isVerbose
public boolean isVerbose()- Returns:
- true if to output failed rules to text output
-
isDebug
public boolean isDebug()- Returns:
- true if to output file names of all processed files
-
maxFailuresDisplayed
public int maxFailuresDisplayed()- Returns:
- maximum amount of failed checks displayed for each rule
-
maxFailures
public int maxFailures()- Returns:
- maximum amount of failed checks
-
fixMetadata
public boolean fixMetadata()- Returns:
- true if metadata fix is enabled
-
addLogs
public boolean addLogs()- Returns:
- true if adding logs to xml report is enabled
-
getLogLevel
public int getLogLevel()- Returns:
- logging level set by user: 0 - OFF 1 - SEVERE 2 - WARNING, SEVERE (default) 3 - CONFIG, INFO, WARNING, SEVERE 4 - ALL
-
getLoggerLevel
-
getLoggerLevel
-
getShowProgress
public boolean getShowProgress()- Returns:
- number of checks per which set by user:
-
prefix
- Returns:
- the prefix of the saved file
-
saveFolder
- Returns:
- the folder to save the fixed file to
-
nonPdfExt
public boolean nonPdfExt() -
isRecurse
public boolean isRecurse()- Returns:
- true if to recursively process sub-dirs
-
isServerMode
public boolean isServerMode()- Returns:
- true if server mode enabled
-
isHelp
public boolean isHelp()- Returns:
- true if help requested
-
getFormat
- Returns:
- format if policy file is not specified, otherwise ignore all report format settings and always use xml (mrr) report
-
logPassed
public boolean logPassed()- Returns:
- true if log passed checks requested
-
extractFeatures
public boolean extractFeatures()- Returns:
- true if PDF Feature extraction requested
-
getDefaultFlavour
-
getFlavour
- Returns:
- the validation flavour string id
-
getProfileFile
- Returns:
- the
Fileobject for the validation profile
-
getPolicyFile
- Returns:
- the
Fileobject for the validation profile
-
isPolicy
public boolean isPolicy() -
getPolicyFileName
-
getVeraCLIPath
-
getNumberOfProcesses
public int getNumberOfProcesses() -
useConfig
public boolean useConfig() -
getPdfPaths
- Returns:
- the list of file paths
-
getProfilesWikiPath
- Returns:
- path to validation profiles wiki
-
isValidationOff
public boolean isValidationOff() -
isDisableErrorMessages
public boolean isDisableErrorMessages() -
getPassword
-
setValuesFromConfig
-
isMultiprocessing
public boolean isMultiprocessing() -
validatorConfig
-
featureExtractorConfig
-
fixerConfig
-
appConfig
-
processorConfig
public ProcessorConfig processorConfig(ProcessType procType, PluginsCollectionConfig plugConfig) throws VeraPDFException - Throws:
VeraPDFException
-
getBaseVeraPDFParameters
-
checkParametersCompatibility
public void checkParametersCompatibility()
-