public final class ValidatorFactory extends Object
PDFAValidators.| Modifier and Type | Method and Description |
|---|---|
static String |
configToXml(ValidatorConfig source)
Serialises a
ValidatorConfig to XML |
static void |
configToXml(ValidatorConfig source,
OutputStream dest)
Serialises a
ValidatorConfig instance to its XML representation
that's output to the passed OutputStream. |
static ValidatorConfig |
createConfig(InputStream source)
De-serialises a
ValidatorConfig instance from it's XML
representation |
static ValidatorConfig |
createConfig(PDFAFlavour flavour,
boolean recordPasses,
int maxFails)
Create a
ValidatorConfig instance from the passed values. |
static PDFAValidator |
createValidator(PDFAFlavour flavour,
boolean logPassedChecks)
Creates a new
PDFAValidator instance that uses one of the
ValidationProfiles packaged as a core library resource. |
static PDFAValidator |
createValidator(PDFAFlavour flavour,
boolean logPassedChecks,
int maxFailures)
Creates a new
PDFAValidator instance that uses one of the
ValidationProfiles packaged as a core library resource, see
Validators#createValidator(PDFAFlavour, boolean). |
static PDFAValidator |
createValidator(PDFAFlavour flavour,
int maxFailures)
Creates a new
PDFAValidator initialised with the passed profile,
requested fast failing behaviour and configured NOT to log passed checks. |
static PDFAValidator |
createValidator(ValidationProfile profile)
Creates a new
PDFAValidator initialised with the passed profile
and configured NOT to log passed checks. |
static PDFAValidator |
createValidator(ValidationProfile profile,
boolean logPassedChecks)
Creates a new
PDFAValidator initialised with the passed profile
and chosen passed test logging. |
static PDFAValidator |
createValidator(ValidationProfile profile,
boolean logPassedChecks,
int maxFailures)
Creates a new
PDFAValidator initialised with the passed profile,
chosen passed test logging and requested fast failing behaviour. |
static PDFAValidator |
createValidator(ValidationProfile profile,
int maxFailures)
Creates a new
PDFAValidator initialised with the passed profile,
requested fast failing behaviour and configured NOT to log passed checks. |
static ValidatorConfig |
defaultConfig() |
public static PDFAValidator createValidator(PDFAFlavour flavour, boolean logPassedChecks)
PDFAValidator instance that uses one of the
ValidationProfiles packaged as a core library resource. While
these profiles are not guaranteed to be up to date, they are available
when offline. A ProfileDirectory populated with the pre-loaded
profiles can be obtained by calling
Profiles.getVeraProfileDirectory().flavour - the PDFAFlavour that's associated with the
ValidationProfile to used to initialise the
PDFAValidator.logPassedChecks - boolean used to configure logging of passed tests by
the PDFAValidator. Pass true to log passed
tests, false to only log tests that don't pass.PDFAValidator instance initialised from the passed
parameterspublic static PDFAValidator createValidator(PDFAFlavour flavour, boolean logPassedChecks, int maxFailures)
PDFAValidator instance that uses one of the
ValidationProfiles packaged as a core library resource, see
Validators#createValidator(PDFAFlavour, boolean).flavour - the PDFAFlavour that's associated with the
ValidationProfile to used to initialise the
PDFAValidator.logPassedChecks - boolean used to configure logging of passed tests by
the PDFAValidator. Pass true to log passed
tests, false to only log tests that don't pass.maxFailures - an int value that configures the PDFAValidator
to abort validation after maxFailures failed tests. If
maxFailures is less than 1 then the
PDFAValidator will complete the full validation
process.PDFAValidator instance initialised from the passed
parameterspublic static PDFAValidator createValidator(ValidationProfile profile)
PDFAValidator initialised with the passed profile
and configured NOT to log passed checks.profile - the ValidationProfile to be enforced by the returned
PDFAValidator.PDFAValidator instance initialised from the passed
parameterspublic static PDFAValidator createValidator(ValidationProfile profile, boolean logPassedChecks)
PDFAValidator initialised with the passed profile
and chosen passed test logging.profile - the ValidationProfile to be enforced by the returned
PDFAValidator.logPassedChecks - boolean used to configure logging of passed tests by
the PDFAValidator. Pass true to log passed
tests, false to only log tests that don't pass.PDFAValidator instance initialised from the passed
parameterspublic static PDFAValidator createValidator(ValidationProfile profile, int maxFailures)
PDFAValidator initialised with the passed profile,
requested fast failing behaviour and configured NOT to log passed checks.profile - the ValidationProfile to be enforced by the returned
PDFAValidator.maxFailures - an int value that configures the PDFAValidator
to abort validation after maxFailures failed tests. If
maxFailures is less than 1 then the
PDFAValidator will complete the full validation
process.PDFAValidator instance initialised from the passed
parameterspublic static PDFAValidator createValidator(PDFAFlavour flavour, int maxFailures)
PDFAValidator initialised with the passed profile,
requested fast failing behaviour and configured NOT to log passed checks.flavour - the PDFAFlavour that's associated with the
ValidationProfile to used to initialise the
PDFAValidator.maxFailures - an int value that configures the PDFAValidator
to abort validation after maxFailures failed tests. If
maxFailures is less than 1 then the
PDFAValidator will complete the full validation
process.PDFAValidator instance initialised from the passed
parameterspublic static PDFAValidator createValidator(ValidationProfile profile, boolean logPassedChecks, int maxFailures)
PDFAValidator initialised with the passed profile,
chosen passed test logging and requested fast failing behaviour.profile - the ValidationProfile to be enforced by the returned
PDFAValidator.logPassedChecks - boolean used to configure logging of passed tests by
the PDFAValidator. Pass true to log passed
tests, false to only log tests that don't pass.maxFailures - an int value that configures the PDFAValidator
to abort validation after maxFailures failed tests. If
maxFailures is less than 1 then the
PDFAValidator will complete the full validation
process.PDFAValidator instance initialised from the passed
parameterspublic static ValidatorConfig defaultConfig()
ValidatorConfig instancepublic static ValidatorConfig createConfig(PDFAFlavour flavour, boolean recordPasses, int maxFails)
ValidatorConfig instance from the passed values.flavour - the PDFAFlavour used for validationrecordPasses - a boolean parameter, set true to record passed
checks, false to only record failed checks.maxFails - an int value for the number of failed checks
encountered before ending validation.ValidatorConfig instance created from the passed
values.public static ValidatorConfig createConfig(InputStream source) throws JAXBException
ValidatorConfig instance from it's XML
representationsource - an InputStream that is an XML representation of a
ValidatorConfigValidatorConfig instance created from the passed XML
streamJAXBException - when there's an error de-serialisingpublic static String configToXml(ValidatorConfig source) throws JAXBException
ValidatorConfig to XMLsource - a ValidatorConfig instance to serialiseString containing the XML representation of the passed
ValidatorConfig instance.JAXBException - when there's an error serialisingpublic static void configToXml(ValidatorConfig source, OutputStream dest) throws JAXBException
ValidatorConfig instance to its XML representation
that's output to the passed OutputStream.source - the ValidatorConfig instance to serialisedest - an OutputStream to which the serialised instance will
be writtenJAXBException - when there's an error serialisingCopyright © 2015–2019 The veraPDF Consortium. All rights reserved.