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 Details

    • NULL

      public static final long NULL
      Value indicating a null offset.
      See Also:
    • jhoveMessage

      protected final JhoveMessage jhoveMessage
      PRIVATE INSTANCE FIELDS.
    • subMessage

      protected final String subMessage
      Additional information.
    • offset

      protected final long offset
      Byte offset to which message applies.
    • prefix

      protected final String prefix
  • Constructor Details

    • Message

      protected Message(JhoveMessage message, String subMessage, long offset, String prefix)
      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 Details

    • 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()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object