Package edu.harvard.hul.ois.jhove
Class Message
- java.lang.Object
-
- edu.harvard.hul.ois.jhove.Message
-
- Direct Known Subclasses:
ErrorMessage,InfoMessage
public abstract class Message extends Object
This class encapsulates a message to be displayed.
-
-
Field Summary
Fields Modifier and Type Field Description protected long_offsetByte offset to which message applies.protected String_subMessageAdditional information.protected JhoveMessagemessagePRIVATE INSTANCE FIELDS.static longNULLValue indicating a null offset.
-
Constructor Summary
Constructors Modifier Constructor Description protectedMessage(JhoveMessage message)Creates a Message with an identifier.protectedMessage(JhoveMessage message, long offset)Creates a Message with an identifier.protectedMessage(JhoveMessage message, String subMessage)Creates a Message with an identifier.protectedMessage(JhoveMessage message, String subMessage, long offset)Creates a Message with an identifier.protectedMessage(String message)Creates a Message with an unknown identifier for backward compatibility.protectedMessage(String message, long offset)Creates a Message.protectedMessage(String message, String subMessage)Creates a Message.protectedMessage(String message, String subMessage, long offset)Creates a Message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()Returns the message's identifier.JhoveMessagegetJhoveMessage()StringgetMessage()Returns the message text.longgetOffset()Returns the offset to which this message is related.StringgetPrefix()StringgetSubMessage()Returns the submessage text.
-
-
-
Field Detail
-
NULL
public static final long NULL
Value indicating a null offset.- See Also:
- Constant Field Values
-
message
protected final JhoveMessage message
PRIVATE INSTANCE FIELDS.
-
_subMessage
protected final String _subMessage
Additional information.
-
_offset
protected final long _offset
Byte offset to which message applies.
-
-
Constructor Detail
-
Message
protected Message(String message)
Creates a Message with an unknown identifier for backward compatibility. This constructor cannot be invoked directly, since Message is abstract.- Parameters:
message- Human-readable message text.
-
Message
protected Message(JhoveMessage message)
Creates a Message with an identifier. This constructor cannot be invoked directly, since Message is abstract.- Parameters:
message- The message text and its identifier.
-
Message
protected Message(String message, String subMessage)
Creates 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 message text.subMessage- Human-readable additional information.
-
Message
protected Message(JhoveMessage message, String subMessage)
Creates a Message with an identifier. 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- The message text and its identifier.subMessage- Human-readable additional information.
-
Message
protected Message(String message, long offset)
Creates 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 message text.offset- Byte offset associated with the message.
-
Message
protected Message(JhoveMessage message, long offset)
Creates a Message with an identifier. 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- The message text and its identifier.offset- Byte offset associated with the message.
-
Message
protected Message(String message, String subMessage, long offset)
Creates 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 message text.subMessage- Human-readable additional information.offset- Byte offset associated with the message.
-
Message
protected Message(JhoveMessage message, String subMessage, long offset)
Creates a Message with an identifier. 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- The message text and its identifier.subMessage- Human-readable additional information.offset- Byte offset associated with the message.
-
-
Method Detail
-
getMessage
public String getMessage()
Returns the message text.
-
getSubMessage
public String getSubMessage()
Returns the submessage text.
-
getOffset
public long getOffset()
Returns the offset to which this message is related.
-
getId
public String getId()
Returns the message's identifier.
-
getJhoveMessage
public JhoveMessage getJhoveMessage()
-
getPrefix
public String getPrefix()
-
-