Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.harvard.hul.ois.jhove
Class RepInfo

    java.lang.Object
      edu.harvard.hul.ois.jhove.RepInfo

All Implemented Interfaces:
  java.lang.Cloneable

    public class RepInfo

extends java.lang.Object
implements java.lang.Cloneable

This class encapsulates representation information, as defined by ISO/IEC 14721, about a content stream.

See Also:
  ISO/IEC 14721 (PDF)

Field Summary
`static int` | `FALSE` Values for _valid
`static int` | `TRUE` Values for _valid
`static int` | `UNDETERMINED` Values for _valid

Constructor Summary
`RepInfo(java.lang.String uri)` Creates a RepInfo with a URI reference
`RepInfo(java.lang.String uri, RepInfo external)` Creates a RepInfo with a URI reference and an external RepInfo.

Method Summary
`java.lang.Object` | `clone()` Clones the RepInfo one level deep, making fresh copies of the checksum, message, profile, signature match, and property fields.
`void` | `copy(RepInfo info)` Copies all the information out of the parameter object.
`Property` | `getByName(java.lang.String name)` Return property by name, regardless of its position in the property hierarchy.
`java.util.List<Checksum>` | `getChecksum()` Returns this object's list of Checksums
`java.util.Date` | `getCreated()` Returns the creation date stored in this object.
`java.lang.String` | `getFormat()` Return the format identifier
`java.util.Date` | `getLastModified()` Returns the last modified date stored in this object.
`java.util.List<Message>` | `getMessage()` Returns the message list stored in this object
`java.lang.String` | `getMimeType()` Returns the MIME type string stored in this object
`Module` | `getModule()` Return the module.
`java.lang.String` | `getNote()` Returns the note property stored in this object
`java.util.List<java.lang.String>` | `getProfile()` Returns the list of profiles (Strings) stored in this object
`java.util.Map<java.lang.String,Property>` | `getProperty()` Returns the Property map stored in this object.
`Property` | `getProperty(java.lang.String name)` Returns a named Property from the Property map
`java.util.List<java.lang.String>` | `getSigMatch()` Returns the list of matching signatures.
`long` | `getSize()` Returns the size property stored in this object.
`java.lang.String` | `getUri()` Returns the URI property stored in this object.
`boolean` | `getURLFlag()` Returns a flag which, if `true`, indicates the object is a URL.
`int` | `getValid()` Returns the value of the validity flag.
`java.lang.String` | `getVersion()` Returns the version property stored in this object
`int` | `getWellFormed()` Returns the value of the well-formed flag.
`boolean` | `isConsistent()` Returns the value of the consistency flag.
`void` | `setChecksum(Checksum checksum)` Append a Checksum object to the checksum list.
`void` | `setConsistent(boolean consistent)` Set the value of the consistency flag
`void` | `setCreated(java.util.Date created)` Set the creation date
`void` | `setFormat(java.lang.String format)` Set the format identifier
`void` | `setLastModified(java.util.Date lastModified)` Set the last modified date
`void` | `setMessage(Message message)` Append a Message object to the message list
`void` | `setMimeType(java.lang.String mimeType)` Set the MIME type string
`void` | `setModule(Module module)` Add the module.
`void` | `setNote(java.lang.String note)` Set the note string
`void` | `setProfile(java.lang.String profile)` Append a profile String to the profile list
`void` | `setProperty(Property property)` Add a Property to the property map.
`void` | `setSigMatch(java.util.List<java.lang.String> modnames)` Adds a list of module names, signifying that the document signature matched the module's requirements.
`void` | `setSigMatch(java.lang.String modname)` Adds the name of a module, signifying that the document signature matched the module's requirements.
`void` | `setSize(long size)` Set the size property
`void` | `setURLFlag(boolean flag)` Set the flag to indicate whether this is a URL (true) or a file (false)
`void` | `setValid(boolean valid)` Set the validity flag
`void` | `setValid(int valid)` Set the validity flag
`void` | `setVersion(java.lang.String version)` Set the version string
`void` | `setWellFormed(boolean wellFormed)` Set the well-formed flag
`void` | `setWellFormed(int wellFormed)` Set the wellFormed flag.
`void` | `show(OutputHandler handler)` Output the information in this object.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TRUE

    public static final int TRUE

  Values for _valid

  See Also:
    Constant Field Values

### FALSE

    public static final int FALSE

  Values for _valid

  See Also:
    Constant Field Values

### UNDETERMINED

    public static final int UNDETERMINED

  Values for _valid

  See Also:
    Constant Field Values

Constructor Detail

### RepInfo

    public RepInfo(java.lang.String uri)

  Creates a RepInfo with a URI reference

  Parameters:
    `uri` - Object file pathname or URI

### RepInfo

    public RepInfo(java.lang.String uri,
                   RepInfo external)

  Creates a RepInfo with a URI reference and an external RepInfo. By default, urlFlag is `false`.

  Parameters:
    `uri` - Object file pathname or URI
    `external` - External representation information

Method Detail

### clone

    public java.lang.Object 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.

  Overrides:
    `clone` in class `java.lang.Object`

### copy

    public void copy(RepInfo info)

  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

    public java.util.List<Checksum> getChecksum()

  Returns this object's list of Checksums

### getCreated

    public java.util.Date getCreated()

  Returns the creation date stored in this object. A creation date is not automatically generated, but must be explicitly stored.

### getFormat

    public java.lang.String getFormat()

  Return the format identifier

### getLastModified

    public java.util.Date getLastModified()

  Returns the last modified date stored in this object. A date is not automatically generated, but must be explicitly stored.

### getMessage

    public java.util.List<Message> getMessage()

  Returns the message list stored in this object

### getMimeType

    public java.lang.String getMimeType()

  Returns the MIME type string stored in this object

### getModule

    public Module getModule()

  Return the module.

### getProfile

    public java.util.List<java.lang.String> getProfile()

  Returns the list of profiles (Strings) stored in this object

### getProperty

    public java.util.Map<java.lang.String,Property> getProperty()

  Returns the Property map stored in this object. The Property map contains key-value pairs whose key is a `String` and whose value is a `Property`.

### getProperty

    public Property getProperty(java.lang.String name)

  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

    public java.lang.String getUri()

  Returns the URI property stored in this object.

### getURLFlag

    public boolean getURLFlag()

  Returns a flag which, if `true`, 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

    public java.lang.String getVersion()

  Returns the version property stored in this object

### getNote

    public java.lang.String getNote()

  Returns the note property stored in this object

### getSigMatch

    public java.util.List<java.lang.String> 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

    public Property getByName(java.lang.String name)

  Return property by name, regardless of its position in the property hierarchy.

  Parameters:
    `name` - Property name
  Returns:
    Named property (or null)

### setChecksum

    public void setChecksum(Checksum checksum)

  Append a Checksum object to the checksum list.

### setConsistent

    public void setConsistent(boolean consistent)

  Set the value of the consistency flag

### setCreated

    public void setCreated(java.util.Date created)

  Set the creation date

### setFormat

    public void setFormat(java.lang.String format)

  Set the format identifier

### setLastModified

    public void setLastModified(java.util.Date lastModified)

  Set the last modified date

### setMessage

    public void setMessage(Message message)

  Append a Message object to the message list

### setMimeType

    public void setMimeType(java.lang.String mimeType)

  Set the MIME type string

### setModule

    public void setModule(Module module)

  Add the module.

### setProfile

    public void setProfile(java.lang.String profile)

  Append a profile String to the profile list

### setProperty

    public void setProperty(Property property)

  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

    public void setVersion(java.lang.String version)

  Set the version string

### setNote

    public void setNote(java.lang.String note)

  Set the note string

### setSigMatch

    public void setSigMatch(java.lang.String modname)

  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

    public void setSigMatch(java.util.List<java.lang.String> modnames)

  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

    public void show(OutputHandler handler)

  Output the information in this object. The format and destination of the output are determined by the OutputHandler.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD