Class BaseValidator
java.lang.Object
org.verapdf.pdfa.validation.validators.BaseValidator
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Component
,PDFAValidator
- Author:
- Carl Wilson
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
static final int
protected boolean
protected JobEndStatus
protected final boolean
protected final int
protected final List<TestAssertion>
protected String
protected int
protected ValidationProgress
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseValidator
(ValidationProfile profile) protected
BaseValidator
(ValidationProfile profile, boolean logPassedChecks) protected
BaseValidator
(ValidationProfile profile, int maxNumberOfDisplayedFailedChecks, boolean logPassedChecks, boolean showErrorMessages, boolean showProgress) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelValidation
(JobEndStatus endStatus) void
close()
Returns the completeValidationProfile
enforced by this PDFAValidator.protected void
protected void
processAssertionResult
(boolean assertionResult, String locationContext, Rule rule, org.verapdf.model.baselayer.Object obj) protected ValidationResult
validate
(org.verapdf.model.baselayer.Object root) validate
(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:PDFAValidator
Returns the completeValidationProfile
enforced by this PDFAValidator.- Specified by:
getProfile
in interfacePDFAValidator
- Returns:
- this PDFAValidator instance's ValiationProfile
-
validate
Description copied from interface:PDFAValidator
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.- Specified by:
validate
in interfacePDFAValidator
- Parameters:
toValidate
- aInputStream
to be validated- Returns:
- a
ValidationResult
containing the result of valdiation and details of failed checks and possibly passed checks, dependent upon configuration. - Throws:
ValidationException
-
getDetails
- Specified by:
getDetails
in interfaceComponent
-
getValidationProgressString
- Specified by:
getValidationProgressString
in interfacePDFAValidator
-
cancelValidation
- Specified by:
cancelValidation
in interfacePDFAValidator
-
validate
protected ValidationResult validate(org.verapdf.model.baselayer.Object root) throws ValidationException - Throws:
ValidationException
-
initialise
protected void initialise() -
processAssertionResult
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-