Class Report

  • Direct Known Subclasses:
    FullReport, JSONReport, XmlReport

    public abstract class Report
    extends Object
    This class is a visitor pattern where the Report uses the abstract methods to define what the visitee should do. While this is not exactly a visitor pattern this implementation was chosen to minimize changes throughout the system as everyone in the universe does not have to pass a visitee now. It is simply embedded in the concrete extension of this class.
    • Constructor Detail

      • Report

        public Report()
    • Method Detail

      • append

        protected abstract void append​(Status status,
                                       String target)
      • append

        protected abstract void append​(String title)
      • appendConfig

        protected abstract void appendConfig​(String label,
                                             String message,
                                             String value)
      • appendParam

        protected abstract void appendParam​(String label,
                                            String message,
                                            String value)
      • begin

        protected abstract void begin​(Report.Block block)
      • summarizeAddMessage

        protected abstract void summarizeAddMessage​(String msg,
                                                    long count)
      • summarizeDepWarn

        protected abstract void summarizeDepWarn​(String msg)
      • summarizeProds

        protected abstract void summarizeProds​(int failed,
                                               int passed,
                                               int skipped,
                                               int total)
      • summarizeRefs

        protected abstract void summarizeRefs​(int failed,
                                              int passed,
                                              int skipped,
                                              int total)
      • summarizeTotals

        protected abstract void summarizeTotals​(int errors,
                                                int total,
                                                int warnings)
      • addConfiguration

        public final void addConfiguration​(String label,
                                           String msg,
                                           String value)
      • addParameter

        public final void addParameter​(String label,
                                       String msg,
                                       String value)
      • getTotalIntegrityChecks

        public final int getTotalIntegrityChecks()
      • getTotalProducts

        public final int getTotalProducts()
      • getType

        protected final String getType​(String systemId)
      • printFooter

        public final void printFooter()
      • printHeader

        public final void printHeader()
      • record

        public final Status record​(URI sourceUri,
                                   ValidationProblem problem)
        Allow single call that turns it into many.
        Parameters:
        sourceUri -
        problem -
        Returns:
      • record

        public final Status record​(URI sourceUri,
                                   List<ValidationProblem> problems)
        Allows a report to change how they manage reporting on a given file that has been parsed and validated. Also handles generating a status for a file and generating some summary statistics.
        Parameters:
        sourceUri - reference to the file that is being reported on
        problems - the set of issues found with the file. to be reported on
        Returns:
        status of the file (i.e. PASS, FAIL, or SKIP)
      • setDeprecatedFlagWarning

        public final void setDeprecatedFlagWarning​(boolean deprecatedFlagWarning)
      • setWriter

        public final void setWriter​(PrintWriter writer)
      • startBody

        public final void startBody​(String title)
      • stopBody

        public final void stopBody()