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
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
FieldsModifier and TypeFieldDescriptionprotected StringHome directory of the audit.protected Map<String,AuditCount> Number of files processed by MIME type.protected intNumber of files audited.protected Map<String,AuditState> State map.protected Stack<AuditState>State stack.protected longInitial time. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidCallback indicating a directory is finished being processed.voidLocal extension to the standard callback indicating a directory is finished being processed.voidOutputs the information contained in a RepInfo object.voidDo the final output.voidLocal extension to the standard callback that does the final output.voidDo the initial output.showHeaderImpl(String directory) Local extension to the standard callback that does the initial output.voidLocal 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, valueToStringMethods 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 Details
-
_home
Home directory of the audit. -
_mimeType
Number of files processed by MIME type. -
_stateMap
State map. -
_stateStack
State stack. -
_t0
protected long _t0Initial time. -
_nAudit
protected int _nAuditNumber of files audited.
-
-
Constructor Details
-
AuditHandler
public AuditHandler()Instantiate anAuditHandlerobject.
-
-
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:
endDirectoryin interfaceOutputHandler- Overrides:
endDirectoryin classHandlerBase
-
endDirectoryImpl
public void endDirectoryImpl()Local extension to the standard callback indicating a directory is finished being processed. -
show
Outputs the information contained in a RepInfo object.- Specified by:
showin interfaceOutputHandler- Overrides:
showin classXmlHandler- Parameters:
info- Object representation information
-
showImpl
Local extension to the standard callback that outputs the information contained in a RepInfo object.- Parameters:
info- Object representation information
-
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
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
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
Local extension to the standard callback indicating a new directory is being processed.- Parameters:
state- Audit handler state
-