com.isti.quakewatch.message
Class QWStatusMsgRecord

java.lang.Object
  extended by com.isti.quakewatch.message.QWRecord
      extended by com.isti.quakewatch.message.QWStatusMsgRecord

public class QWStatusMsgRecord
extends QWRecord

Class QWStatusMsgRecord manages a status-message record.


Field Summary
 java.lang.String msgData
          Optional Data string for message, or null if no data.
 long msgNumber
          Message number from the 'QWmessage' element for this message.
 java.lang.String msgType
          Type string for message.
 org.jdom.Element qwMsgElement
          QWmessage 'Element' object used to construct this object.
 long receivedTimeMs
          Local time that the message was received.
 org.jdom.Element statusMsgElement
          StatusMessage 'Element' object used to construct this object.
 java.util.Date timeGenerated
          Time that message was created by server (or null if not given).
 
Fields inherited from class com.isti.quakewatch.message.QWRecord
currentElement
 
Constructor Summary
QWStatusMsgRecord(long receivedTimeMs, org.jdom.Element qwMsgElement, org.jdom.Element statusMsgElement)
          Creates a record of data from a QuakeWatch XML StatusMessage.
 
Method Summary
 long getReceivedTimeOffsetMs()
          Returns the difference between the given local time that the message was received and the time-generated value for the message.
 
Methods inherited from class com.isti.quakewatch.message.QWRecord
equals, getAttribDouble, getAttribInteger, getAttribLong, getAttribStr, getAttribTime, getChildElementDouble, getChildElementDouble, getChildElementInteger, getChildElementInteger, getChildElementStr, getChildElementStr, getCurrentElement, getDefAttribBoolean, getDefElementBoolean, getElementDouble, getElementInteger, getElementLong, getElementStr, getElementTime, getElementValueDouble, getElementValueStr, getElementValueTime, getNonNullOptAttribStr, getNonNullOptElementStr, getOptAttribBoolean, getOptAttribDouble, getOptAttribInteger, getOptAttribStr, getOptAttribTime, getOptElementBoolean, getOptElementDouble, getOptElementInteger, getOptElementStr, getOptElementTime, getOptElementValueDouble, getOptTextDouble, parseDataBoolean, parseDataDouble, parseDataInteger, parseDataLong, parseDataTime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

qwMsgElement

public final org.jdom.Element qwMsgElement
QWmessage 'Element' object used to construct this object.


msgNumber

public final long msgNumber
Message number from the 'QWmessage' element for this message.


timeGenerated

public final java.util.Date timeGenerated
Time that message was created by server (or null if not given).


statusMsgElement

public final org.jdom.Element statusMsgElement
StatusMessage 'Element' object used to construct this object.


msgType

public final java.lang.String msgType
Type string for message.


msgData

public final java.lang.String msgData
Optional Data string for message, or null if no data.


receivedTimeMs

public final long receivedTimeMs
Local time that the message was received.

Constructor Detail

QWStatusMsgRecord

public QWStatusMsgRecord(long receivedTimeMs,
                         org.jdom.Element qwMsgElement,
                         org.jdom.Element statusMsgElement)
                  throws QWRecordException
Creates a record of data from a QuakeWatch XML StatusMessage.

Parameters:
receivedTimeMs - local time that the message was received.
qwMsgElement - the XML "QWmessage" element object.
statusMsgElement - the XML "StatusMessage" element object.
Throws:
QWRecordException - if an error occurs while creating the data record.
Method Detail

getReceivedTimeOffsetMs

public long getReceivedTimeOffsetMs()
Returns the difference between the given local time that the message was received and the time-generated value for the message.

Returns:
The time difference, in milliseconds.