public class ValidationResults extends Object
| Modifier and Type | Method and Description |
|---|---|
static TestAssertion |
assertionFromValues(int ordinal,
RuleId ruleId,
TestAssertion.Status status,
String message,
Location location)
Creates an immutable TestAssertion instance from the passed parameter
values.
|
static TestAssertion |
defaultAssertion()
Returns an immutable default instance of a TestAssertion.
|
static Location |
defaultLocation()
Returns an immutable default instance of a Location.
|
static ValidationResult |
defaultResult()
Returns an immutable default instance of a ValidationResult.
|
static Location |
locationFromValues(String level,
String context)
TODO: Better explanation of level and context.
|
static ValidationResult |
resultFromValues(ValidationProfile validationProfile,
Set<TestAssertion> assertions) |
static ValidationResult |
resultFromValues(ValidationProfile validationProfile,
Set<TestAssertion> assertions,
boolean isCompliant) |
static ValidationResult |
resultFromValues(ValidationProfile validationProfile,
Set<TestAssertion> assertions,
boolean isCompliant,
int totalAssertions) |
static ValidationResult |
resultFromXmlString(String xmlSource) |
static ValidationResult |
stripPassedTests(ValidationResult toStrip)
Strips any
TestAssertions where
assertion.getStatus() == TestAssertion.Status.PASSED from
toStrip and returns a new ValidationResult without the
passed assertions. |
public static ValidationResult resultFromValues(ValidationProfile validationProfile, Set<TestAssertion> assertions, boolean isCompliant)
validationProfile - a ValidationProfile instance indicating the validation type
performedassertions - the Set of TestAssertions reported by during validationisCompliant - a boolean that indicating whether the validated PDF/A data was
compliant with the indicated flavourpublic static ValidationResult resultFromValues(ValidationProfile validationProfile, Set<TestAssertion> assertions, boolean isCompliant, int totalAssertions)
validationProfile - a ValidationProfile instance indicating the validation type
performedassertions - the Set of TestAssertions reported by during validationisCompliant - a boolean that indicating whether the validated PDF/A data was
compliant with the indicated flavourtotalAssertions - public static ValidationResult resultFromValues(ValidationProfile validationProfile, Set<TestAssertion> assertions)
validationProfile - a ValidationProfile instance indicating the validation type
performedassertions - the Set of TestAssertions reported by during validationpublic static ValidationResult resultFromXmlString(String xmlSource) throws JAXBException
xmlSource - XML representation of a ValidationResult to deserialiseJAXBException - when the passed String is not a valid XML representationpublic static ValidationResult defaultResult()
ValidationResults.defaultResult() == ValidationResults.defaultResult()
is always true.public static TestAssertion assertionFromValues(int ordinal, RuleId ruleId, TestAssertion.Status status, String message, Location location)
ordinal - the integer ordinal for the instanceruleId - the RuleId value for
Rule the assertion refers
to.status - the TestAssertion.Status of the assertion.message - any String message to be associated with the assertion.location - a Location instance indicating the location within the
PDF document where the test was performed.public static TestAssertion defaultAssertion()
ValidationResults.defaultAssertion() == ValidationResults.defaultAssertion()
is always true.public static Location locationFromValues(String level, String context)
Location instance.level - the Locations level, represented as a Stringcontext - the Locations context, represented as a Stringpublic static Location defaultLocation()
ValidationResults.defaultLocation() == ValidationResults.defaultLocation()
is always true.public static ValidationResult stripPassedTests(ValidationResult toStrip)
TestAssertions where
assertion.getStatus() == TestAssertion.Status.PASSED from
toStrip and returns a new ValidationResult without the
passed assertions.toStrip - a ValidationResult to clone without passed
TestAssertionstoStrip, but
without passed TestAssertions.Copyright © 2015–2019 The veraPDF Consortium. All rights reserved.