Package edu.harvard.hul.ois.jhove
Class RepInfo
java.lang.Object
edu.harvard.hul.ois.jhove.RepInfo
- All Implemented Interfaces:
Cloneable
This class encapsulates representation information, as defined
by ISO/IEC 14721, about a content stream.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intValues for _validstatic final intValues for _validstatic final intValues for _valid -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones the RepInfo one level deep, making fresh copies of the checksum, message, profile, signature match, and property fields.voidCopies all the information out of the parameter object.Return property by name, regardless of its position in the property hierarchy.Returns this object's list of ChecksumsReturns the creation date stored in this object.Return the format identifierReturns the last modified date stored in this object.Returns the message list stored in this objectReturns the MIME type string stored in this objectReturn the module.getNote()Returns the note property stored in this objectReturns the list of profiles (Strings) stored in this objectReturns the Property map stored in this object.getProperty(String name) Returns a named Property from the Property mapReturns the list of matching signatures.longgetSize()Returns the size property stored in this object.getUri()Returns the URI property stored in this object.booleanReturns a flag which, iftrue, indicates the object is a URL.intgetValid()Returns the value of the validity flag.Returns the version property stored in this objectintReturns the value of the well-formed flag.booleanReturns the value of the consistency flag.voidsetChecksum(Checksum checksum) Append a Checksum object to the checksum list.voidsetConsistent(boolean consistent) Set the value of the consistency flagvoidsetCreated(Date created) Set the creation datevoidSet the format identifiervoidsetLastModified(Date lastModified) Set the last modified datevoidsetMessage(Message message) Append a Message object to the message listvoidsetMimeType(String mimeType) Set the MIME type stringvoidAdd the module.voidSet the note stringvoidsetProfile(String profile) Append a profile String to the profile listvoidsetProperty(Property property) Add a Property to the property map.voidsetSigMatch(String modname) Adds the name of a module, signifying that the document signature matched the module's requirements.voidsetSigMatch(List<String> modnames) Adds a list of module names, signifying that the document signature matched the module's requirements.voidsetSize(long size) Set the size propertyvoidsetURLFlag(boolean flag) Set the flag to indicate whether this is a URL (true) or a file (false)voidsetValid(boolean valid) Set the validity flagvoidsetValid(int valid) Set the validity flagvoidsetVersion(String version) Set the version stringvoidsetWellFormed(boolean wellFormed) Set the well-formed flagvoidsetWellFormed(int wellFormed) Set the wellFormed flag.voidshow(OutputHandler handler) Output the information in this object.
-
Field Details
-
TRUE
public static final int TRUEValues for _valid- See Also:
-
FALSE
public static final int FALSEValues for _valid- See Also:
-
UNDETERMINED
public static final int UNDETERMINEDValues for _valid- See Also:
-
-
Constructor Details
-
RepInfo
Creates a RepInfo with a URI reference- Parameters:
uri- Object file pathname or URI
-
RepInfo
Creates a RepInfo with a URI reference and an external RepInfo. By default, urlFlag isfalse.- Parameters:
uri- Object file pathname or URIexternal- External representation information
-
-
Method Details
-
clone
Clones the RepInfo one level deep, making fresh copies of the checksum, message, profile, signature match, and property fields. The external RepInfo (if any) is not cloned, but is attached directly to the clone. -
copy
Copies all the information out of the parameter object. This is a "shallow" copy; it is assumed that the parameter object is a temporary one that will not be further modified. -
getChecksum
Returns this object's list of Checksums -
getCreated
Returns the creation date stored in this object. A creation date is not automatically generated, but must be explicitly stored. -
getFormat
Return the format identifier -
getLastModified
Returns the last modified date stored in this object. A date is not automatically generated, but must be explicitly stored. -
getMessage
Returns the message list stored in this object -
getMimeType
Returns the MIME type string stored in this object -
getModule
Return the module. -
getProfile
Returns the list of profiles (Strings) stored in this object -
getProperty
Returns the Property map stored in this object. The Property map contains key-value pairs whose key is aStringand whose value is aProperty. -
getProperty
Returns a named Property from the Property map- Parameters:
name- The name of the Property.
-
getSize
public long getSize()Returns the size property stored in this object. -
getUri
Returns the URI property stored in this object. -
getURLFlag
public boolean getURLFlag()Returns a flag which, iftrue, indicates the object is a URL. -
isConsistent
public boolean isConsistent()Returns the value of the consistency flag. -
getWellFormed
public int getWellFormed()Returns the value of the well-formed flag. Can return TRUE, FALSE, or UNDETERMINED. -
getValid
public int getValid()Returns the value of the validity flag. Can return TRUE, FALSE, or UNDETERMINED. -
getVersion
Returns the version property stored in this object -
getNote
Returns the note property stored in this object -
getSigMatch
Returns the list of matching signatures. JhoveBase will make this value persistent across module invocations for a given document, so the list returned will reflect all modules that have looked at the document so far. -
getByName
Return property by name, regardless of its position in the property hierarchy.- Parameters:
name- Property name- Returns:
- Named property (or null)
-
setChecksum
Append a Checksum object to the checksum list. -
setConsistent
public void setConsistent(boolean consistent) Set the value of the consistency flag -
setCreated
Set the creation date -
setFormat
Set the format identifier -
setLastModified
Set the last modified date -
setMessage
Append a Message object to the message list -
setMimeType
Set the MIME type string -
setModule
Add the module. -
setProfile
Append a profile String to the profile list -
setProperty
Add a Property to the property map. The name of the Property becomes its key in the map. -
setSize
public void setSize(long size) Set the size property -
setURLFlag
public void setURLFlag(boolean flag) Set the flag to indicate whether this is a URL (true) or a file (false) -
setWellFormed
public void setWellFormed(boolean wellFormed) Set the well-formed flag- Parameters:
wellFormed- Boolean argument that maps to an integer value: true maps to TRUE, and false to FALSE.
-
setWellFormed
public void setWellFormed(int wellFormed) Set the wellFormed flag. Setting wellFormed to false forces the consistent and valid flags to be false as well. -
setValid
public void setValid(boolean valid) Set the validity flag- Parameters:
valid- Boolean argument that maps to an integer value: true maps to TRUE, and false to FALSE.
-
setValid
public void setValid(int valid) Set the validity flag- Parameters:
valid- Permitted values are TRUE, FALSE, AND UNDETERMINED. The effect of using other values is undefined.
-
setVersion
Set the version string -
setNote
Set the note string -
setSigMatch
Adds the name of a module, signifying that the document signature matched the module's requirements. JhoveBase will make this value persistent across module invocations for a given document. -
setSigMatch
Adds a list of module names, signifying that the document signature matched the module's requirements. Any previous list is lost. JhoveBase will make this value persistent across module invocations for a given document. -
show
Output the information in this object. The format and destination of the output are determined by the OutputHandler.
-