public final class Config extends Object
| Modifier and Type | Field and Description |
|---|---|
static Path |
DEFAULT_FEATURES_CONFIG_PATH |
static Path |
DEFAULT_FIX_METADATA_PATH_FOLDER |
static PDFAFlavour |
DEFAULT_FLAVOUR |
static boolean |
DEFAULT_IS_FIX_METADATA |
static boolean |
DEFAULT_IS_OVERWRITE_REPORT_FILE |
static int |
DEFAULT_MAX_NUMBER_OF_DISPLAYED_FAILED_CHECKS |
static int |
DEFAULT_MAX_NUMBER_OF_FAILED_CHECKS |
static String |
DEFAULT_METADATA_FIXER_PREFIX |
static Path |
DEFAULT_PLUGINS_CONFIG_PATH |
static Path |
DEFAULT_POLICY_PROFILE |
static ProcessingType |
DEFAULT_PROCESSING_TYPE |
static String |
DEFAULT_PROFILES_WIKI_PATH |
static String |
DEFAULT_REPORT_FILE_PATH |
static String |
DEFAULT_REPORT_FOLDER_PATH |
static FormatOption |
DEFAULT_REPORT_TYPE |
static boolean |
DEFAULT_SHOW_PASSED_RULES |
static Path |
DEFAULT_VALIDATION_PROFILE_PATH |
static boolean |
DEFAULT_VERBOSE_CLI |
| Constructor and Description |
|---|
Config() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static Config |
fromXml(InputStream toConvert)
Converts XML file to Config,
|
static Config |
fromXml(String toConvert)
Converts XML file to Config,
|
Path |
getFeaturesConfigFilePath() |
Path |
getFixMetadataFolder() |
PDFAFlavour |
getFlavour() |
int |
getMaxNumberOfDisplayedFailedChecks() |
int |
getMaxNumberOfFailedChecks() |
String |
getMetadataFixerPrefix() |
Path |
getPluginsConfigFilePath() |
Path |
getPolicyProfile() |
ProcessingType |
getProcessingType() |
String |
getProfileWikiPath() |
String |
getReportFile() |
String |
getReportFolder() |
FormatOption |
getReportType() |
Path |
getValidationProfile() |
int |
hashCode() |
boolean |
isFixMetadata() |
boolean |
isOverwriteReportFile() |
boolean |
isShowPassedRules() |
static boolean |
isValidFileNameCharacter(char c)
Checks is the character valid for file name
|
static boolean |
isValidFolderPath(Path path)
Checks is the parameter path a valid for saving fixed file
|
static boolean |
isValidProfilePath(Path path)
Checks is the parameter path a valid validation profile
|
boolean |
isVerboseCli() |
void |
setFeaturesConfigPath(Path featuresConfigPath)
Changes settings parameters
|
void |
setFixMetadata(boolean fixMetadata)
Changes settings parameters
|
void |
setFixMetadataPathFolder(Path fixMetadataPathFolder)
Changes settings parameters
|
void |
setFlavour(PDFAFlavour flavour)
Changes settings parameters
|
void |
setMaxNumberOfDisplayedFailedChecks(int maxNumberOfDisplayedFailedChecks)
Changes settings parameter
|
void |
setMaxNumberOfFailedChecks(int maxNumberOfFailedChecks)
Changes settings parameter
|
void |
setMetadataFixerPrefix(String metadataFixerPrefix)
Changes settings parameters
|
void |
setOverwriteReportFile(boolean overwriteReportFile)
Changes settings parameters
|
void |
setPluginsConfigPath(Path pluginsConfigPath)
Changes settings parameters
|
void |
setPolicyProfilePath(Path policyProfilePath)
Changes settings parameters
|
void |
setProcessingType(ProcessingType processingType)
Changes settings parameters
|
void |
setProfileWikiPath(String profileWikiPath)
Changes settings parameters
|
void |
setReportFilePath(String reportFile)
Changes settings parameters
|
void |
setReportFolderPath(String reportFolder)
Changes settings parameters
|
void |
setReportType(FormatOption reportType)
Changes settings parameters
|
void |
setShowPassedRules(boolean showPassedRules)
Changes settings parameter
|
void |
setValidationProfilePath(Path validationProfilePath)
Changes settings parameters
|
void |
setVerboseCli(boolean verboseCli)
Changes settings parameters
|
static String |
toXml(Config toConvert,
Boolean prettyXml)
Converts Config to XML,
|
static void |
toXml(Config toConvert,
OutputStream stream,
Boolean prettyXml)
Converts Config to XML,
|
public static final int DEFAULT_MAX_NUMBER_OF_FAILED_CHECKS
public static final boolean DEFAULT_SHOW_PASSED_RULES
public static final int DEFAULT_MAX_NUMBER_OF_DISPLAYED_FAILED_CHECKS
public static final String DEFAULT_METADATA_FIXER_PREFIX
public static final Path DEFAULT_FIX_METADATA_PATH_FOLDER
public static final String DEFAULT_PROFILES_WIKI_PATH
public static final boolean DEFAULT_IS_FIX_METADATA
public static final ProcessingType DEFAULT_PROCESSING_TYPE
public static final FormatOption DEFAULT_REPORT_TYPE
public static final Path DEFAULT_VALIDATION_PROFILE_PATH
public static final PDFAFlavour DEFAULT_FLAVOUR
public static final boolean DEFAULT_VERBOSE_CLI
public static final Path DEFAULT_POLICY_PROFILE
public static final Path DEFAULT_PLUGINS_CONFIG_PATH
public static final Path DEFAULT_FEATURES_CONFIG_PATH
public static final String DEFAULT_REPORT_FOLDER_PATH
public static final String DEFAULT_REPORT_FILE_PATH
public static final boolean DEFAULT_IS_OVERWRITE_REPORT_FILE
public int getMaxNumberOfDisplayedFailedChecks()
public int getMaxNumberOfFailedChecks()
public boolean isShowPassedRules()
public String getMetadataFixerPrefix()
public Path getFixMetadataFolder()
public ProcessingType getProcessingType()
public boolean isFixMetadata()
public String getProfileWikiPath()
public FormatOption getReportType()
public Path getPolicyProfile()
public Path getValidationProfile()
public PDFAFlavour getFlavour()
public boolean isVerboseCli()
public Path getPluginsConfigFilePath()
public Path getFeaturesConfigFilePath()
public String getReportFolder()
public String getReportFile()
public boolean isOverwriteReportFile()
public static String toXml(Config toConvert, Boolean prettyXml) throws JAXBException, IOException
JAXBExceptionIOExceptionfor more detailspublic static Config fromXml(String toConvert) throws JAXBException
JAXBExceptionfor more detailspublic static void toXml(Config toConvert, OutputStream stream, Boolean prettyXml) throws JAXBException
JAXBExceptionfor more detailspublic static Config fromXml(InputStream toConvert) throws JAXBException
JAXBExceptionfor more detailspublic void setMetadataFixerPrefix(String metadataFixerPrefix)
metadataFixerPrefix - a prefix which will be added to the fixed fileIllegalArgumentException - parameter can not be nullpublic void setShowPassedRules(boolean showPassedRules)
showPassedRules - true for show passed rules at the reportpublic void setMaxNumberOfFailedChecks(int maxNumberOfFailedChecks)
maxNumberOfFailedChecks - a natural number that indicates maximum number of failed checks for rule or -1 for unlimitedIllegalArgumentException - if parameter is not a natural number or -1public void setMaxNumberOfDisplayedFailedChecks(int maxNumberOfDisplayedFailedChecks)
maxNumberOfDisplayedFailedChecks - a non negative integer number that indicates maximum number of displayed
failed checks for rule or -1 for infiniteIllegalArgumentException - if parameter is less than -1public void setFixMetadataPathFolder(Path fixMetadataPathFolder)
fixMetadataPathFolder - a path to the folder in which fixed files will be savedIllegalArgumentException - parameter should be an empty path or a path to an existing and write acceptable directorypublic void setProfileWikiPath(String profileWikiPath)
profileWikiPath - a link to wiki about validation rulespublic void setFixMetadata(boolean fixMetadata)
fixMetadata - true if metadata fixes should be performedpublic void setProcessingType(ProcessingType processingType)
processingType - type of operation to be performedpublic void setReportType(FormatOption reportType)
reportType - type of report to be generatedpublic void setValidationProfilePath(Path validationProfilePath)
validationProfilePath - a path to the validation profile to be used in validationIllegalArgumentException - parameter should be an empty path or a path to an existing and write acceptable filepublic void setPolicyProfilePath(Path policyProfilePath)
policyProfilePath - a path to the policy profile to be used in policy checksIllegalArgumentException - parameter should be an empty path or a path to an existing and write acceptable filepublic void setPluginsConfigPath(Path pluginsConfigPath)
pluginsConfigPath - a path to the plugins config filepublic void setFeaturesConfigPath(Path featuresConfigPath)
featuresConfigPath - a path to the features config filepublic void setFlavour(PDFAFlavour flavour)
flavour - validation flavour to be usedpublic void setVerboseCli(boolean verboseCli)
verboseCli - true if cli text report should be verbosepublic void setReportFolderPath(String reportFolder)
reportFolder - path to folder where results will be savedpublic void setReportFilePath(String reportFile)
reportFile - path to report filepublic void setOverwriteReportFile(boolean overwriteReportFile)
overwriteReportFile - report file overwriting flagpublic static boolean isValidFolderPath(Path path)
path - path for checkpublic static boolean isValidProfilePath(Path path)
path - path for checkpublic static boolean isValidFileNameCharacter(char c)
c - character to be checkedCopyright © 2015–2016 The veraPDF Consortium. All rights reserved.