Class VeraCliArgParser

java.lang.Object
org.verapdf.cli.commands.VeraCliArgParser

public class VeraCliArgParser extends Object
This class holds all command-line options used by VeraPDF application.
Author:
Timur Kamalov
  • Field Details

  • 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

      public Level getLoggerLevel()
    • getLoggerLevel

      public int getLoggerLevel(Level level)
    • getShowProgress

      public boolean getShowProgress()
      Returns:
      number of checks per which set by user:
    • prefix

      public String prefix()
      Returns:
      the prefix of the saved file
    • saveFolder

      public String 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

      public FormatOption 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

      public PDFAFlavour getDefaultFlavour()
    • getFlavour

      public PDFAFlavour getFlavour()
      Returns:
      the validation flavour string id
    • getProfileFile

      public File getProfileFile()
      Returns:
      the File object for the validation profile
    • getPolicyFile

      public File getPolicyFile()
      Returns:
      the File object for the validation profile
    • isPolicy

      public boolean isPolicy()
    • getPolicyFileName

      public String getPolicyFileName()
    • getVeraCLIPath

      public File getVeraCLIPath()
    • getNumberOfProcesses

      public int getNumberOfProcesses()
    • useConfig

      public boolean useConfig()
    • getPdfPaths

      public List<String> getPdfPaths()
      Returns:
      the list of file paths
    • getProfilesWikiPath

      public String getProfilesWikiPath()
      Returns:
      path to validation profiles wiki
    • isValidationOff

      public boolean isValidationOff()
    • isDisableErrorMessages

      public boolean isDisableErrorMessages()
    • getPassword

      public String getPassword()
    • setValuesFromConfig

      public void setValuesFromConfig(ConfigManager configManager)
    • isMultiprocessing

      public boolean isMultiprocessing()
    • validatorConfig

      public ValidatorConfig validatorConfig()
    • featureExtractorConfig

      public FeatureExtractorConfig featureExtractorConfig()
    • fixerConfig

      public MetadataFixerConfig fixerConfig()
    • appConfig

      public VeraAppConfig appConfig(VeraAppConfig base)
    • processorConfig

      public ProcessorConfig processorConfig(ProcessType procType, PluginsCollectionConfig plugConfig) throws VeraPDFException
      Throws:
      VeraPDFException
    • getBaseVeraPDFParameters

      public static List<String> getBaseVeraPDFParameters(VeraCliArgParser cliArgParser)
    • checkParametersCompatibility

      public void checkParametersCompatibility()