Class AuditHandler

All Implemented Interfaces:
OutputHandler

public class AuditHandler extends XmlHandler
JHOVE audit output handler, derived from the standard JHOVE XML handler. It is expected that this class will be used as the parent for other, more interesting output handlers. Subclasses should override the implementations of the Impl methods, e.g. endDirectoryImpl().
  • Field Details

    • _home

      protected String _home
      Home directory of the audit.
    • _mimeType

      protected Map<String,AuditCount> _mimeType
      Number of files processed by MIME type.
    • _stateMap

      protected Map<String,AuditState> _stateMap
      State map.
    • _stateStack

      protected Stack<AuditState> _stateStack
      State stack.
    • _t0

      protected long _t0
      Initial time.
    • _nAudit

      protected int _nAudit
      Number of files audited.
  • Constructor Details

    • AuditHandler

      public AuditHandler()
      Instantiate an AuditHandler object.
  • Method Details

    • endDirectory

      public final void endDirectory()
      Callback indicating a directory is finished being processed. Pop the state stack and place the current directory file count into the directory hash.
      Specified by:
      endDirectory in interface OutputHandler
      Overrides:
      endDirectory in class HandlerBase
    • endDirectoryImpl

      public void endDirectoryImpl()
      Local extension to the standard callback indicating a directory is finished being processed.
    • show

      public void show(RepInfo info)
      Outputs the information contained in a RepInfo object.
      Specified by:
      show in interface OutputHandler
      Overrides:
      show in class XmlHandler
      Parameters:
      info - Object representation information
    • showImpl

      public void showImpl(RepInfo info)
      Local extension to the standard callback that outputs the information contained in a RepInfo object.
      Parameters:
      info - Object representation information
    • showFooter

      public void showFooter()
      Do the final output. This should be in a suitable format for including multiple files between the header and the footer, and the XML of the header and footer must balance out.
      Specified by:
      showFooter in interface OutputHandler
      Overrides:
      showFooter in class XmlHandler
    • showFooterImpl

      public void showFooterImpl()
      Local extension to the standard callback that does the final output. This should be in a suitable format for including multiple files between the header and the footer, and the XML of the header and footer must balance out.
    • showHeader

      public void showHeader()
      Do the initial output. This should be in a suitable format for including multiple files between the header and the footer, and the XML of the header and footer must balance out.
      Specified by:
      showHeader in interface OutputHandler
      Overrides:
      showHeader in class XmlHandler
    • showHeaderImpl

      public AuditState showHeaderImpl(String directory)
      Local extension to the standard callback that does the initial output. This should be in a suitable format for including multiple files between the header and the footer, and the XML of the header and footer must balance out.
      Parameters:
      directory - Current directory filepath
    • startDirectory

      public void startDirectory(String directory)
      Callback indicating a new directory is being processed. Additional state information can be added to the AuditState object in the showHeaderImpl() method before it is pushed onto the stack.
      Specified by:
      startDirectory in interface OutputHandler
      Overrides:
      startDirectory in class HandlerBase
      Parameters:
      directory - Directory path
    • startDirectoryImpl

      public void startDirectoryImpl(AuditState state)
      Local extension to the standard callback indicating a new directory is being processed.
      Parameters:
      state - Audit handler state