edu.harvard.hul.ois.jhove
Class Message

java.lang.Object
  extended by edu.harvard.hul.ois.jhove.Message
Direct Known Subclasses:
ErrorMessage, InfoMessage

public abstract class Message
extends java.lang.Object

This class encapsulates a String to be displayed.


Field Summary
protected  java.lang.String _message
          Message text.
protected  long _offset
          Byte offset to which message applies.
protected  java.lang.String _subMessage
          Additional information.
static long NULL
          Value indicating a null offset.
 
Constructor Summary
protected Message(java.lang.String message)
          Create a Message.
protected Message(java.lang.String message, long offset)
          Create a Message.
protected Message(java.lang.String message, java.lang.String subMessage)
          Create a Message.
protected Message(java.lang.String message, java.lang.String subMessage, long offset)
          Create a Message.
 
Method Summary
 java.lang.String getMessage()
          Get the message string.
 long getOffset()
          Return the offset to which the information is related.
 java.lang.String getSubMessage()
          Get the submessage string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final long NULL
Value indicating a null offset.

See Also:
Constant Field Values

_message

protected java.lang.String _message
Message text.


_subMessage

protected java.lang.String _subMessage
Additional information.


_offset

protected long _offset
Byte offset to which message applies.

Constructor Detail

Message

protected Message(java.lang.String message)
Create a Message. This constructor cannot be invoked directly, since Message is abstract.

Parameters:
message - Human-readable string.

Message

protected Message(java.lang.String message,
                  java.lang.String subMessage)
Create a Message. This constructor cannot be invoked directly, since Message is abstract. The second argument adds secondary details to the primary message; the message will typically be displayed in the form "message:subMessage".

Parameters:
message - Human-readable string.
subMessage - Human-readable additional information.

Message

protected Message(java.lang.String message,
                  long offset)
Create a Message. This constructor cannot be invoked directly, since Message is abstract. The second argument adds secondary details to the primary message; the message will typically be displayed in the form "message:subMessage".

Parameters:
message - Human-readable string.
offset - Byte offset associated with the message.

Message

protected Message(java.lang.String message,
                  java.lang.String subMessage,
                  long offset)
Create a Message. This constructor cannot be invoked directly, since Message is abstract. The second argument adds secondary details to the primary message; the message will typically be displayed in the form "message:subMessage".

Parameters:
message - Human-readable string.
subMessage - Human-readable additional information.
offset - Byte offset associated with the message.
Method Detail

getMessage

public java.lang.String getMessage()
Get the message string.


getSubMessage

public java.lang.String getSubMessage()
Get the submessage string.


getOffset

public long getOffset()
Return the offset to which the information is related.