Class Reports

java.lang.Object
org.verapdf.processor.reports.Reports

public final class Reports extends Object
Version:
0.1 Created 10 Nov 2016:08:12:36
Author:
Carl Wilson carlwilson AT github
  • Method Details

    • createBatchSummary

      public static final BatchSummary createBatchSummary(Components.Timer timer, ValidationBatchSummary validationSummary, FeaturesBatchSummary featureSummary, MetadataRepairBatchSummary repairSummary, int totalJobs, int failedToParse, int encrypted, int outOfMemory, int veraExceptions)
      Parameters:
      timer - a Components.Timer instance which is stopped to measure the duration of the batch process
      jobs - the number of jobs in the batch
      failedJobs - the number o failed jobs in the batch
      valid - the number of valid PDF/A documents in the batch
      inValid - the number of invalid PDF/A documents in the batch
      validExcep - the number of validation jobs that threw exceptions
      features - the number of feature extraction jobs run
      Returns:
      a new BatchSummary instance created using the passed values
    • createValidationReport

      public static final ValidationReport createValidationReport(ValidationDetails details, String profileName, String statement, boolean isCompliant, String jobEndStatus)
      Creates a new ValidationReport instance from the passed parameters
      Parameters:
      details - the ValidationDetails instance to add to the report
      profileName - the name of the ValidationProfile used to validation the PDF/A
      statement - a String statement, should indicate whether the file was valid or invalid
      isCompliant - boolean value, set true if PDF/A document complied with the validation profile rules
      Returns:
      a new ValidationReport instance
    • createValidationReport

      public static final ValidationReport createValidationReport(ValidationResult validationResult, boolean logPassed)
    • validationReportFromXml

      public static final ValidationReport validationReportFromXml(String xmlSource) throws jakarta.xml.bind.JAXBException
      Deserialise a ValidationReport from an XML string
      Parameters:
      xmlSource - a String value which is the XML representation of the ValidationReport
      Returns:
      a new ValidationReport instance deserialised from the source string
      Throws:
      jakarta.xml.bind.JAXBException - when the passed String is not a valid ValidationReport representation
    • fromValues

      public static final ValidationDetails fromValues(ValidationResult result, boolean logPassedChecks)
      Creates a new ValidationDetails instance from the passed parameters
      Parameters:
      result - the ValidationResult produced by the validation task
      logPassedChecks - boolean indicating whether passed checks were logged
      Returns:
      a new ValidationDetails instance
    • fromValues

      public static final MetadataFixerReport fromValues(String status, int fixCount, List<String> fixes, List<String> errors)
    • fromValues

      public static final ValidationDetails fromValues(ValidationResult result, boolean logPassedChecks, int maxFailedChecks)
    • fromValues

      public static final MetadataFixerReport fromValues(MetadataFixerResult fixerResult)