Package org.verapdf.pdfa
Interface VeraPDFFoundry
- All Superinterfaces:
AutoCloseable,Closeable,Component
- All Known Implementing Classes:
AbstractFoundry
The veraPDFFoundry interface provides methods for creating implementations of
the classes provided by a PDF/A Parser and Metadata Fixer implementations.
- Version:
- 0.1 Created 21 Sep 2016:12:37:55
- Author:
- Carl Wilson carlwilson AT github
-
Method Summary
Modifier and TypeMethodDescriptioncreateFailFastValidator(List<PDFAFlavour> flavours, int maxFailures, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters, requested fast failing behaviour.createFailFastValidator(PDFAFlavour flavour, int maxFailures, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters.createFailFastValidator(ValidationProfile profile, int maxFailures, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters, requested fast failing behaviour.Obtain a newMetadataFixerinstance.createParser(File pdfFile) Method that returns a PDFAParser instance, parsing file passed as parameter.createParser(File pdfFile, PDFAFlavour flavour) Method that returns a PDFAParser instance, parsing file passed as parameter.createParser(File pdfFile, PDFAFlavour flavour, String password) createParser(File pdfFile, PDFAFlavour flavour, PDFAFlavour defaultFlavour) createParser(File pdfFile, PDFAFlavour flavour, PDFAFlavour defaultFlavour, String password) createParser(InputStream pdfStream) Method that returns a PDFAParser instance, parsing the passed parameter.createParser(InputStream pdfStream, PDFAFlavour flavour) Method that returns a PDFAParser instance, parsing the passed parameter.createParser(InputStream pdfStream, PDFAFlavour flavour, String password) createParser(InputStream pdfStream, PDFAFlavour flavour, PDFAFlavour defaultFlavour) createParser(InputStream pdfStream, PDFAFlavour flavour, PDFAFlavour defaultFlavour, String password) createValidator(List<PDFAFlavour> flavours) Creates a newPDFAValidatorinstance that usesValidationProfiles packaged as a core library resource.createValidator(List<PDFAFlavour> flavour, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters.createValidator(PDFAFlavour flavour, boolean logSuccess) Creates a newPDFAValidatorinstance that uses one of theValidationProfiles packaged as a core library resource.createValidator(PDFAFlavour flavour, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters.createValidator(ValidationProfile profile, boolean logSuccess) Creates a newPDFAValidatorinitialised with the passed profile and chosen passed test logging.createValidator(ValidationProfile profile, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters.createValidator(ValidatorConfig config) Obtain a newPDFAValidatorinstance.createValidator(ValidatorConfig config, List<PDFAFlavour> flavours) Obtain a newPDFAValidatorinstance that uses the list of a customPDFAFlavours.createValidator(ValidatorConfig config, PDFAFlavour flavour) Obtain a newPDFAValidatorinstance that uses a customPDFAFlavour.createValidator(ValidatorConfig config, ValidationProfile profile) Obtain a newPDFAValidatorinstance that uses a customValidationProfileinstance.Methods inherited from interface org.verapdf.component.Component
getDetails
-
Method Details
-
createParser
Method that returns a PDFAParser instance, parsing the passed parameter. The parser or parser provider will detect the flavour of the PDF document stream and provide an appropriate parser.- Parameters:
pdfStream-InputStreamfor the PDF document to be parsed.- Returns:
- a
PDFAParserinstance created from the supplied InputStream. - Throws:
ModelParsingException- when there's a problem parsing the PDF fileEncryptedPdfException- if the PDF to be parsed is encrypted
-
createParser
PDFAParser createParser(InputStream pdfStream, PDFAFlavour flavour) throws ModelParsingException, EncryptedPdfException Method that returns a PDFAParser instance, parsing the passed parameter. The caller must explicitly state the flavour of the PDF document stream.- Parameters:
pdfStream-InputStreamfor the PDF document to be parsed.flavour- aPDFAFlavourinstance indicating parser configuration to be assumed when parsing the document.- Returns:
- a
PDFAParserinstance created from the supplied InputStream. - Throws:
ModelParsingException- when there's a problem parsing the PDF fileEncryptedPdfException- if the PDF to be parsed is encrypted
-
createParser
PDFAParser createParser(InputStream pdfStream, PDFAFlavour flavour, PDFAFlavour defaultFlavour) throws ModelParsingException, EncryptedPdfException -
createParser
PDFAParser createParser(InputStream pdfStream, PDFAFlavour flavour, String password) throws ModelParsingException, EncryptedPdfException -
createParser
PDFAParser createParser(InputStream pdfStream, PDFAFlavour flavour, PDFAFlavour defaultFlavour, String password) throws ModelParsingException, EncryptedPdfException -
createParser
PDFAParser createParser(File pdfFile, PDFAFlavour flavour) throws ModelParsingException, EncryptedPdfException Method that returns a PDFAParser instance, parsing file passed as parameter. The caller must explicitly state the flavour of the PDF document stream.- Parameters:
pdfFile-Filewith PDF document to be parsed.flavour- aPDFAFlavourinstance indicating parser configuration to be assumed when parsing the document.- Returns:
- a
PDFAParserinstance created from the supplied InputStream. - Throws:
ModelParsingException- when there's a problem parsing the PDF fileEncryptedPdfException- if the PDF to be parsed is encrypted
-
createParser
PDFAParser createParser(File pdfFile, PDFAFlavour flavour, PDFAFlavour defaultFlavour) throws ModelParsingException, EncryptedPdfException -
createParser
PDFAParser createParser(File pdfFile, PDFAFlavour flavour, String password) throws ModelParsingException, EncryptedPdfException -
createParser
PDFAParser createParser(File pdfFile, PDFAFlavour flavour, PDFAFlavour defaultFlavour, String password) throws ModelParsingException, EncryptedPdfException -
createParser
Method that returns a PDFAParser instance, parsing file passed as parameter. The parser or parser provider will detect the flavour of the PDF document stream and provide an appropriate parser.- Parameters:
pdfFile-Filewith the PDF document to be parsed.- Returns:
- a
PDFAParserinstance created from the supplied InputStream. - Throws:
ModelParsingException- when there's a problem parsing the PDF fileEncryptedPdfException- if the PDF to be parsed is encrypted
-
createValidator
Obtain a newPDFAValidatorinstance.- Parameters:
config- aValidatorConfiginstance used to configure thePDFAValidator- Returns:
- an appropriately configured
PDFAValidatorinstance.
-
createValidator
Obtain a newPDFAValidatorinstance that uses a customValidationProfileinstance.- Parameters:
config- aValidatorConfiginstance used to configure thePDFAValidatorprofile- a validation profile- Returns:
- an appropriately configured
PDFAValidatorinstance.
-
createValidator
Obtain a newPDFAValidatorinstance that uses a customPDFAFlavour.- Parameters:
config- aValidatorConfiginstance used to configure thePDFAValidatorflavour- the particularPDFAFlavourto validated against.- Returns:
- an appropriately configured
PDFAValidatorinstance.
-
createValidator
Obtain a newPDFAValidatorinstance that uses the list of a customPDFAFlavours.- Parameters:
config- aValidatorConfiginstance used to configure thePDFAValidatorflavours- the list of particularPDFAFlavours to validated against.- Returns:
- an appropriately configured
PDFAValidatorinstance.
-
createValidator
Creates a newPDFAValidatorinstance that uses one of theValidationProfiles packaged as a core library resource.- Parameters:
flavour- thePDFAFlavourthat's associated with theValidationProfileto used to initialise thePDFAValidator.logSuccess-booleanused to configure logging of passed tests by thePDFAValidator. Passtrueto log passed tests,falseto only log tests that don't pass.- Returns:
- a
PDFAValidatorinstance initialised from the passed parameters
-
createValidator
Creates a newPDFAValidatorinstance that usesValidationProfiles packaged as a core library resource.- Parameters:
flavours- list of thePDFAFlavourthat are associated with theValidationProfileto used to initialise thePDFAValidator.- Returns:
- a
PDFAValidatorinstance initialised from the passed parameters
-
createValidator
Creates a newPDFAValidatorinitialised with the passed profile and chosen passed test logging.- Parameters:
profile- theValidationProfileto be enforced by the returnedPDFAValidator.logSuccess-booleanused to configure logging of passed tests by thePDFAValidator. Passtrueto log passed tests,falseto only log tests that don't pass.- Returns:
- a
PDFAValidatorinstance initialised from the passed parameters
-
createValidator
PDFAValidator createValidator(PDFAFlavour flavour, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters.- Parameters:
flavour- thePDFAFlavourthat's associated with theValidationProfileto used to initialise thePDFAValidator.maxNumberOfDisplayedFailedChecks- a max checks number to showlogSuccess-booleanused to configure logging of passed tests by thePDFAValidator. Passtrueto log passed tests,falseto only log tests that don't pass.showErrorMessages- a flag to show error messagesshowProgress- a flag to show validation progress- Returns:
- a
PDFAValidatorinstance initialised from the passed parameters
-
createValidator
PDFAValidator createValidator(List<PDFAFlavour> flavour, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters.- Parameters:
flavour- thePDFAFlavourthat's associated with theValidationProfileto used to initialise thePDFAValidator.maxNumberOfDisplayedFailedChecks- a max checks number to showlogSuccess-booleanused to configure logging of passed tests by thePDFAValidator. Passtrueto log passed tests,falseto only log tests that don't pass.showErrorMessages- a flag to show error messagesshowProgress- a flag to show validation progress- Returns:
- a
PDFAValidatorinstance initialised from the passed parameters
-
createValidator
PDFAValidator createValidator(ValidationProfile profile, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters.- Parameters:
profile- theValidationProfileto be enforced by the returnedPDFAValidator.maxNumberOfDisplayedFailedChecks- a max checks number to showlogSuccess-booleanused to configure logging of passed tests by thePDFAValidator. Passtrueto log passed tests,falseto only log tests that don't pass.showErrorMessages- a flag to show error messagesshowProgress- a flag to show validation progress- Returns:
- a
PDFAValidatorinstance initialised from the passed parameters
-
createFailFastValidator
PDFAValidator createFailFastValidator(PDFAFlavour flavour, int maxFailures, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters.- Parameters:
flavour- thePDFAFlavourthat's associated with theValidationProfileto used to initialise thePDFAValidator.maxFailures- anintvalue that configures thePDFAValidatorto abort validation aftermaxFailuresfailed tests. IfmaxFailuresis less than 1 then thePDFAValidatorwill complete the full validation process.maxNumberOfDisplayedFailedChecks- a max checks number to showlogSuccess- a flag to show success logsshowErrorMessages- a flag to show error messageshowProgress- a flag to show validation progress- Returns:
- a
PDFAValidatorinstance initialised from the passed parameters
-
createFailFastValidator
PDFAValidator createFailFastValidator(List<PDFAFlavour> flavours, int maxFailures, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters, requested fast failing behaviour.- Parameters:
flavours- the list ofPDFAFlavourthat's associated with theValidationProfileto used to initialise thPDFAValidator.maxFailures- anintvalue that configures thePDFAValidatorto abort validation aftermaxFailuresfailed tests. IfmaxFailuresis less than 1 then thePDFAValidatorwill complete the full validation process.maxNumberOfDisplayedFailedChecks- a max checks number to showlogSuccess- a flag to show success logsshowErrorMessages- a flag to show error messageshowProgress- a flag to show validation progress- Returns:
- a
PDFAValidatorinstance initialised from the passed parameters
-
createFailFastValidator
PDFAValidator createFailFastValidator(ValidationProfile profile, int maxFailures, int maxNumberOfDisplayedFailedChecks, boolean logSuccess, boolean showErrorMessages, boolean showProgress) Creates a newPDFAValidatorinitialised with the passed profile and parameters, requested fast failing behaviour.- Parameters:
profile- theValidationProfileto be enforced by the returnedPDFAValidator.maxFailures- anintvalue that configures thePDFAValidatorto abort validation aftermaxFailuresfailed tests. IfmaxFailuresis less than 1 then thePDFAValidatorwill complete the full validation process.maxNumberOfDisplayedFailedChecks- a max checks number to showlogSuccess- a flag to show success logsshowErrorMessages- a flag to show error messageshowProgress- a flag to show validation progress- Returns:
- a
PDFAValidatorinstance initialised from the passed parameters
-
createMetadataFixer
MetadataFixer createMetadataFixer()Obtain a newMetadataFixerinstance.- Returns:
- a
MetadataFixerinstance.
-
defaultFlavour
PDFAFlavour defaultFlavour()- Returns:
- the default
PDFAFlavourset for thisVeraPDFFoundry
-
getParserId
String getParserId()
-