Class AuditHandler
- java.lang.Object
-
- edu.harvard.hul.ois.jhove.HandlerBase
-
- edu.harvard.hul.ois.jhove.handler.XmlHandler
-
- edu.harvard.hul.ois.jhove.handler.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().
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.harvard.hul.ois.jhove.HandlerBase
HandlerBase.SynchronizedDateFormat
-
-
Field Summary
Fields Modifier and Type Field Description protected String_homeHome directory of the audit.protected Map<String,AuditCount>_mimeTypeNumber of files processed by MIME type.protected int_nAuditNumber of files audited.protected Map<String,AuditState>_stateMapState map.protected Stack<AuditState>_stateStackState stack.protected long_t0Initial time.
-
Constructor Summary
Constructors Constructor Description AuditHandler()Instantiate anAuditHandlerobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendDirectory()Callback indicating a directory is finished being processed.voidendDirectoryImpl()Local extension to the standard callback indicating a directory is finished being processed.voidshow(RepInfo info)Outputs the information contained in a RepInfo object.voidshowFooter()Do the final output.voidshowFooterImpl()Local extension to the standard callback that does the final output.voidshowHeader()Do the initial output.AuditStateshowHeaderImpl(String directory)Local extension to the standard callback that does the initial output.voidshowImpl(RepInfo info)Local extension to the standard callback that outputs the information contained in a RepInfo object.voidstartDirectory(String directory)Callback indicating a new directory is being processed.voidstartDirectoryImpl(AuditState state)Local extension to the standard callback indicating a new directory is being processed.-
Methods inherited from class edu.harvard.hul.ois.jhove.handler.XmlHandler
rationalToString, show, show, show, show, showAESAudioMetadata, showAgent, showArrayProperty, showChangeHistory10, showChangeHistory20, showChecksum, showDocument, showIdentifier, showMessage, showNisoBasicDigitalObjectInformation10, showNisoBasicDigitalObjectInformation20, showNisoBasicImageInformation10, showNisoBasicImageInformation20, showNisoBasicImageParameters02, showNisoChangeHistory02, showNisoImageAssessmentMetadata10, showNisoImageAssessmentMetadata20, showNisoImageCaptureMetadata10, showNisoImageCaptureMetadata20, showNisoImageCreation02, showNisoImageMetadata, showNisoImageMetadata02, showNisoImageMetadata10, showNisoImageMetadata20, showNisoImagingPerformanceAssessment02, showProperty, showSignature, showTextMDMetadata, valueToString
-
Methods inherited from class edu.harvard.hul.ois.jhove.HandlerBase
analyze, applyDefaultParams, close, doctype, doctype, doubleArray, element, element, element, element, elementEnd, elementStart, elementStart, getDate, getEncoding, getIndent, getName, getNote, getRelease, getRights, getSpecification, getVendor, init, integerArray, integerArray, longArray, okToProcess, param, rationalArray, rationalArray10, reset, resetParams, setApp, setBase, setDefaultParams, setEncoding, setWriter, toDateTime, xmlDecl, xmlDecl
-
-
-
-
Field Detail
-
_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.
-
-
Method Detail
-
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:
endDirectoryin interfaceOutputHandler- Overrides:
endDirectoryin classHandlerBase
-
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:
showin interfaceOutputHandler- Overrides:
showin classXmlHandler- 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:
showFooterin interfaceOutputHandler- Overrides:
showFooterin classXmlHandler
-
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:
showHeaderin interfaceOutputHandler- Overrides:
showHeaderin classXmlHandler
-
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:
startDirectoryin interfaceOutputHandler- Overrides:
startDirectoryin classHandlerBase- 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
-
-