Class BaseValidator
java.lang.Object
org.verapdf.pdfa.validation.validators.BaseValidator
- All Implemented Interfaces:
Closeable,AutoCloseable,Component,PDFAValidator
- Author:
- Carl Wilson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final intprotected booleanprotected JobEndStatusprotected final booleanprotected final intprotected final List<TestAssertion>protected Stringprotected intprotected ValidationProgress -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseValidator(ValidationProfile profile) protectedBaseValidator(ValidationProfile profile, boolean logPassedChecks) protectedBaseValidator(ValidationProfile profile, int maxNumberOfDisplayedFailedChecks, boolean logPassedChecks, boolean showErrorMessages, boolean showProgress) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelValidation(JobEndStatus endStatus) voidclose()Returns the completeValidationProfileenforced by this PDFAValidator.protected voidprotected voidprocessAssertionResult(boolean assertionResult, String locationContext, Rule rule, Object obj) protected ValidationResultvalidate(PDFAParser toValidate) This method validates an InputStream, presumably believed to be a PDF/A document of a specific flavour that matches the ValidationProfile supported by the PDFAValidator instance.
-
Field Details
-
DEFAULT_MAX_NUMBER_OF_DISPLAYED_FAILED_CHECKS
public static final int DEFAULT_MAX_NUMBER_OF_DISPLAYED_FAILED_CHECKS- See Also:
-
results
-
testCounter
protected int testCounter -
abortProcessing
protected volatile boolean abortProcessing -
logPassedChecks
protected final boolean logPassedChecks -
maxNumberOfDisplayedFailedChecks
protected final int maxNumberOfDisplayedFailedChecks -
isCompliant
protected boolean isCompliant -
validationProgress
-
jobEndStatus
-
rootType
-
-
Constructor Details
-
BaseValidator
-
BaseValidator
-
BaseValidator
protected BaseValidator(ValidationProfile profile, int maxNumberOfDisplayedFailedChecks, boolean logPassedChecks, boolean showErrorMessages, boolean showProgress)
-
-
Method Details
-
getProfile
Description copied from interface:PDFAValidatorReturns the completeValidationProfileenforced by this PDFAValidator.- Specified by:
getProfilein interfacePDFAValidator- Returns:
- this PDFAValidator instance's ValiationProfile
-
validate
Description copied from interface:PDFAValidatorThis method validates an InputStream, presumably believed to be a PDF/A document of a specific flavour that matches the ValidationProfile supported by the PDFAValidator instance.- Specified by:
validatein interfacePDFAValidator- Parameters:
toValidate- aInputStreamto be validated- Returns:
- a
ValidationResultcontaining the result of valdiation and details of failed checks and possibly passed checks, dependent upon configuration. - Throws:
ValidationException
-
getDetails
- Specified by:
getDetailsin interfaceComponent
-
getValidationProgressString
- Specified by:
getValidationProgressStringin interfacePDFAValidator
-
cancelValidation
- Specified by:
cancelValidationin interfacePDFAValidator
-
validate
- Throws:
ValidationException
-
initialise
protected void initialise() -
processAssertionResult
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-