Package edu.harvard.hul.ois.jhove
Interface OutputHandler
- All Known Implementing Classes:
AuditHandler,HandlerBase,JsonHandler,TextHandler,XmlHandler
public interface OutputHandler
Public interface for Jhove output handlers.
All output handlers must implement OutputHandler, and in
normal cases should subclass HandlerBase.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCallback allowing post-parse, pre-show analysis of object representation information.voidApplies the default parameters.voidclose()Do appropriate finalization after all output is complete.voidCallback indicating a directory is finished being processed.getDate()Returns the last modification date of this handlerReturns this handler's encoding.getName()Returns the name of this handlergetNote()Returns this handler's noteReturns release information for this handlerReturns this handler's copyright informationReturns a List of Document objects giving the format specification documentationReturns a List of Agent objects giving the vendor(s) of this handler.voidPer-instantiation initialization.booleanokToProcess(String filepath) Callback to give the handler the opportunity to decide whether or not to process a file.voidPer-action initialization.voidreset()Reset the handler.voidReset parameter settings.voidAssigns an application object to provide services to this handlervoidAssigns the JHOVE engine object to provide services to this handlervoidsetDefaultParams(List<String> params) Sets list of default parameters.voidsetEncoding(String encoding) Assigns the encoding to be used by this OutputHandlervoidsetWriter(PrintWriter output) Assigns a PrintWriter to do output for this OutputHandlervoidshow()Outputs minimal information about the applicationvoidOutputs detailed information about the application, including configuration, available modules and handlers, etc.voidOutputs information about a Modulevoidshow(OutputHandler handler) Outputs information about the OutputHandler specified in the parametervoidOutputs the information contained in a RepInfo objectvoidDo the final output.voidDo the initial output.voidstartDirectory(String directory) Callback indicating a new directory is being processed.
-
Method Details
-
reset
void reset()Reset the handler. This needs to be called before each invocation. -
analyze
Callback allowing post-parse, pre-show analysis of object representation information.- Parameters:
info- Object representation information
-
endDirectory
void endDirectory()Callback indicating a directory is finished being processed. Most handlers will do nothing. -
getName
String getName()Returns the name of this handler -
getRelease
String getRelease()Returns release information for this handler -
getDate
Date getDate()Returns the last modification date of this handler -
getSpecification
Returns a List of Document objects giving the format specification documentation- See Also:
-
getVendor
Agent getVendor()Returns a List of Agent objects giving the vendor(s) of this handler. -
getNote
String getNote()Returns this handler's note -
getRights
String getRights()Returns this handler's copyright information -
getEncoding
String getEncoding()Returns this handler's encoding. -
init
Per-instantiation initialization.- Parameters:
init- Initialization parameter. This is typically obtained from the configuration file.- Throws:
Exception
-
okToProcess
Callback to give the handler the opportunity to decide whether or not to process a file. Most handlers will always return true.- Parameters:
filepath- File pathname
-
setDefaultParams
Sets list of default parameters.- Parameters:
params- A List whose elements are Strings. May be empty.
-
applyDefaultParams
Applies the default parameters.- Throws:
Exception
-
resetParams
Reset parameter settings. Returns to a default state without any parameters.- Throws:
Exception
-
param
Per-action initialization.- Parameters:
param- Initialization parameter.- Throws:
Exception
-
setApp
Assigns an application object to provide services to this handler -
setBase
Assigns the JHOVE engine object to provide services to this handler -
setEncoding
Assigns the encoding to be used by this OutputHandler -
setWriter
Assigns a PrintWriter to do output for this OutputHandler -
show
Outputs information about a Module -
show
Outputs the information contained in a RepInfo object -
show
Outputs information about the OutputHandler specified in the parameter -
show
void show()Outputs minimal information about the application -
show
Outputs detailed information about the application, including configuration, available modules and handlers, etc. -
showHeader
void showHeader()Do the initial output. This should be in a suitable format for including multiple files between the header and the footer. -
close
void close()Do appropriate finalization after all output is complete. -
startDirectory
Callback indicating a new directory is being processed. Most handlers will do nothing.- Parameters:
directory- Directory path
-