Package org.verapdf.pdfa
Class AbstractFoundry
- java.lang.Object
-
- org.verapdf.pdfa.AbstractFoundry
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Component
,VeraPDFFoundry
public abstract class AbstractFoundry extends Object implements VeraPDFFoundry
- Version:
- 0.1 Created 26 Oct 2016:21:25:17
- Author:
- Carl Wilson carlwilson AT github
-
-
Constructor Summary
Constructors Constructor Description AbstractFoundry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
PDFAValidator
createFailFastValidator(PDFAFlavour flavour, int maxFailures)
Creates a newPDFAValidator
initialised with the passed profile, requested fast failing behaviour and configured NOT to log passed checks.PDFAValidator
createFailFastValidator(ValidationProfile profile, int maxFailures)
Creates a newPDFAValidator
initialised with the passed profile, requested fast failing behaviour and configured NOT to log passed checks.PDFAValidator
createValidator(PDFAFlavour flavour, boolean logSuccess)
Creates a newPDFAValidator
instance that uses one of theValidationProfile
s packaged as a core library resource.PDFAValidator
createValidator(PDFAFlavour flavour, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages)
PDFAValidator
createValidator(ValidationProfile profile, boolean logSuccess)
Creates a newPDFAValidator
initialised with the passed profile and chosen passed test logging.PDFAValidator
createValidator(ValidationProfile profile, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages)
PDFAValidator
createValidator(ValidatorConfig config)
Obtain a newPDFAValidator
instance.PDFAValidator
createValidator(ValidatorConfig config, PDFAFlavour flavour)
Obtain a newPDFAValidator
instance that uses a customPDFAFlavour
.PDFAValidator
createValidator(ValidatorConfig config, ValidationProfile profile)
Obtain a newPDFAValidator
instance that uses a customValidationProfile
instance.PDFAFlavour
defaultFlavour()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.verapdf.component.Component
getDetails
-
Methods inherited from interface org.verapdf.pdfa.VeraPDFFoundry
createMetadataFixer, createParser, createParser, createParser, createParser, createParser, getParserId
-
-
-
-
Method Detail
-
createValidator
public PDFAValidator createValidator(ValidatorConfig config)
Description copied from interface:VeraPDFFoundry
Obtain a newPDFAValidator
instance.- Specified by:
createValidator
in interfaceVeraPDFFoundry
- Parameters:
config
- aValidatorConfig
instance used to configure thePDFAValidator
- Returns:
- an appropriately configured
PDFAValidator
instance.
-
createValidator
public PDFAValidator createValidator(ValidatorConfig config, PDFAFlavour flavour)
Description copied from interface:VeraPDFFoundry
Obtain a newPDFAValidator
instance that uses a customPDFAFlavour
.- Specified by:
createValidator
in interfaceVeraPDFFoundry
- Parameters:
config
- aValidatorConfig
instance used to configure thePDFAValidator
flavour
- the particularPDFAFlavour
to validated against.- Returns:
- an appropriately configured
PDFAValidator
instance.
-
createValidator
public PDFAValidator createValidator(ValidatorConfig config, ValidationProfile profile)
Description copied from interface:VeraPDFFoundry
Obtain a newPDFAValidator
instance that uses a customValidationProfile
instance.- Specified by:
createValidator
in interfaceVeraPDFFoundry
- Parameters:
config
- aValidatorConfig
instance used to configure thePDFAValidator
- Returns:
- an appropriately configured
PDFAValidator
instance.
-
createValidator
public PDFAValidator createValidator(PDFAFlavour flavour, boolean logSuccess)
Description copied from interface:VeraPDFFoundry
Creates a newPDFAValidator
instance that uses one of theValidationProfile
s packaged as a core library resource. While these profiles are not guaranteed to be up to date, they are available when offline. AProfileDirectory
populated with the pre-loaded profiles can be obtained by callingProfiles#getVeraProfileDirectory()
.- Specified by:
createValidator
in interfaceVeraPDFFoundry
- Parameters:
flavour
- thePDFAFlavour
that's associated with theValidationProfile
to used to initialise thePDFAValidator
.logSuccess
-boolean
used to configure logging of passed tests by thePDFAValidator
. Passtrue
to log passed tests,false
to only log tests that don't pass.- Returns:
- a
PDFAValidator
instance initialised from the passed parameters
-
createValidator
public PDFAValidator createValidator(ValidationProfile profile, boolean logSuccess)
Description copied from interface:VeraPDFFoundry
Creates a newPDFAValidator
initialised with the passed profile and chosen passed test logging.- Specified by:
createValidator
in interfaceVeraPDFFoundry
- Parameters:
profile
- theValidationProfile
to be enforced by the returnedPDFAValidator
.logSuccess
-boolean
used to configure logging of passed tests by thePDFAValidator
. Passtrue
to log passed tests,false
to only log tests that don't pass.- Returns:
- a
PDFAValidator
instance initialised from the passed parameters
-
createValidator
public PDFAValidator createValidator(PDFAFlavour flavour, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages)
- Specified by:
createValidator
in interfaceVeraPDFFoundry
-
createValidator
public PDFAValidator createValidator(ValidationProfile profile, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages)
- Specified by:
createValidator
in interfaceVeraPDFFoundry
-
createFailFastValidator
public PDFAValidator createFailFastValidator(PDFAFlavour flavour, int maxFailures)
Description copied from interface:VeraPDFFoundry
Creates a newPDFAValidator
initialised with the passed profile, requested fast failing behaviour and configured NOT to log passed checks.- Specified by:
createFailFastValidator
in interfaceVeraPDFFoundry
- Parameters:
flavour
- thePDFAFlavour
that's associated with theValidationProfile
to used to initialise thePDFAValidator
.maxFailures
- anint
value that configures thePDFAValidator
to abort validation aftermaxFailures
failed tests. IfmaxFailures
is less than 1 then thePDFAValidator
will complete the full validation process.- Returns:
- a
PDFAValidator
instance initialised from the passed parameters
-
createFailFastValidator
public PDFAValidator createFailFastValidator(ValidationProfile profile, int maxFailures)
Description copied from interface:VeraPDFFoundry
Creates a newPDFAValidator
initialised with the passed profile, requested fast failing behaviour and configured NOT to log passed checks.- Specified by:
createFailFastValidator
in interfaceVeraPDFFoundry
- Parameters:
profile
- theValidationProfile
to be enforced by the returnedPDFAValidator
.maxFailures
- anint
value that configures thePDFAValidator
to abort validation aftermaxFailures
failed tests. IfmaxFailures
is less than 1 then thePDFAValidator
will complete the full validation process.- Returns:
- a
PDFAValidator
instance initialised from the passed parameters
-
defaultFlavour
public PDFAFlavour defaultFlavour()
- Specified by:
defaultFlavour
in interfaceVeraPDFFoundry
- Returns:
- the default
PDFAFlavour
set for thisVeraPDFFoundry
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-