public interface Module
ModuleBase
Modifier and Type | Field and Description |
---|---|
static int |
MAXIMUM_VERBOSITY |
static int |
MINIMUM_VERBOSITY |
Modifier and Type | Method and Description |
---|---|
void |
applyDefaultParams()
Applies the default parameters.
|
void |
checkSignatures(File file,
InputStream stream,
RepInfo info)
Check if the digital object conforms to this Module's
internal signature information.
|
void |
checkSignatures(File file,
RandomAccessFile raf,
RepInfo info)
Check if the digital object conforms to this Module's
internal signature information.
|
String |
getCoverage()
Return details as to the specific format versions or
variants that are supported by this Module
|
Date |
getDate()
Return the last modification date of the Module, as a
Java Date object
|
List<String> |
getDefaultParams()
Returns the list of default parameters.
|
List<String> |
getFeatures()
Returns the full list of features.
|
String[] |
getFormat()
Return the array of format names supported by this Module
|
String[] |
getMimeType()
Return the array of MIME type strings for formats supported
by this Module
|
String |
getName()
Return the name of this Module.
|
String |
getNote()
Return the Module note
|
String |
getRelease()
Return the release identifier
|
String |
getRepInfoNote()
Returns the RepInfo note
|
String |
getRights()
Return the copyright information string
|
List<Signature> |
getSignature()
Return the List of Signatures recognized by this Module
|
List<Document> |
getSpecification()
Returns a list of
Document objects (one for each
specification document of the format). |
String |
getValidityNote()
Returns the string describing validity criteria
|
Agent |
getVendor()
Return the vendor information
|
String |
getWellFormedNote()
Return the string describing well-formedness criteria
|
boolean |
hasFeature(String feature)
Returns
true if the module supports a given
named feature, and false if the feature is
unsupported or unknown. |
void |
init(String init)
Per-instantiation initialization.
|
boolean |
isRandomAccess()
Returns the random access flag (true if the module operates
on random access files, false if it operates on streams)
|
void |
param(String param)
Per-action initialization.
|
int |
parse(InputStream stream,
RepInfo info,
int parseIndex)
Parse the content of a stream digital object and store the
results in RepInfo.
|
void |
parse(RandomAccessFile file,
RepInfo info)
Parse the content of a random access digital object and store the
results in RepInfo.
|
void |
resetParams()
Reset parameter settings.
|
void |
setApp(App app)
Pass the associated App object to this Module.
|
void |
setBase(JhoveBase je)
Pass the JHOVE engine object to this Module.
|
void |
setDefaultParams(List<String> params)
Sets list of default parameters.
|
void |
setVerbosity(int verbosity)
Set the degree of verbosity desired from the module.
|
void |
show(OutputHandler handler)
Generates information about this Module.
|
static final int MAXIMUM_VERBOSITY
static final int MINIMUM_VERBOSITY
void init(String init) throws Exception
init
- Initialization parameter. This is typically obtained
from the configuration file.Exception
void setDefaultParams(List<String> params)
params
- A List whose elements are Strings.
May be empty.void applyDefaultParams() throws Exception
Exception
void resetParams() throws Exception
Exception
void param(String param) throws Exception
param
- Initialization parameter.Exception
void setApp(App app)
void setBase(JhoveBase je)
void setVerbosity(int verbosity)
verbosity
- The requested verbosity value.String getName()
String getRelease()
Date getDate()
Agent getVendor()
String getRights()
String getNote()
String[] getFormat()
String[] getMimeType()
String getCoverage()
List<Document> getSpecification()
Document
objects (one for each
specification document of the format). The specification
list is generated by the Module, and specifications cannot
be added by callers.Document
String getWellFormedNote()
String getRepInfoNote()
String getValidityNote()
boolean isRandomAccess()
boolean hasFeature(String feature)
true
if the module supports a given
named feature, and false
if the feature is
unsupported or unknown.int parse(InputStream stream, RepInfo info, int parseIndex) throws IOException
stream
- An InputStream, positioned at its beginning,
which is generated from the object to be parsed.
If multiple calls to parse
are made
on the basis of a nonzero value being returned,
a new InputStream must be provided each time.info
- A fresh (on the first call) RepInfo object
which will be modified
to reflect the results of the parsing
If multiple calls to parse
are made
on the basis of a nonzero value being returned,
the same RepInfo object should be passed with each
call.parseIndex
- Must be 0 in first call to parse
. If
parse
returns a nonzero value, it must be
called again with parseIndex
equal to that return value.IOException
void parse(RandomAccessFile file, RepInfo info) throws IOException
file
- A RandomAccessFile, positioned at its beginning,
which is generated from the object to be parsedinfo
- A fresh RepInfo object which will be modified
to reflect the results of the parsingIOException
void checkSignatures(File file, InputStream stream, RepInfo info) throws IOException
file
- A File object for the object being parsedstream
- An InputStream, positioned at its beginning,
which is generated from the object to be parsedinfo
- A fresh RepInfo object which will be modified
to reflect the results of the testIOException
void checkSignatures(File file, RandomAccessFile raf, RepInfo info) throws IOException
file
- A File object for the object being parsedraf
- A RandomAccessFile, positioned at its beginning,
which is generated from the object to be parsedinfo
- A fresh RepInfo object which will be modified
to reflect the results of the testIOException
void show(OutputHandler handler)
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.