com.isti.quakewatch.message
Class QWMagnitudeRecord

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

public class QWMagnitudeRecord
extends QWRecord

QWMagnitudeRecord defines a record of magnitude data.


Field Summary
 java.lang.String firstMagCommentText
          Contents of first "Comment|Text" element, or null if none.
 java.lang.Double magError
          Standard-error value, or null if none given.
 java.lang.String magMethod
          Magnitude method code string, or null if none given.
 double magnitude
          Magnitude value.
 java.lang.Integer numStations
          Number-of-stations value, or null if none given.
 java.lang.Boolean preferredFlag
          'PreferredFlag' value for ANSS-EQ-XML element, or null if none.
 java.lang.String type
          Type code string, or null if none given.
 java.lang.String version
          'Version' value for ANSS-EQ-XML element, or null if none.
 
Fields inherited from class com.isti.quakewatch.message.QWRecord
currentElement
 
Constructor Summary
QWMagnitudeRecord(org.jdom.Element elementObj)
          Creates a magnitude data record, built from an XML "Magnitude" message element.
QWMagnitudeRecord(org.jdom.Element elementObj, boolean anssEQFlag)
          Deprecated. Use version with 'messageFormatSpec' parameter.
QWMagnitudeRecord(org.jdom.Element elementObj, int messageFormatSpec)
          Creates a magnitude data record, built from an XML "Magnitude" message element.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 boolean equals(QWMagnitudeRecord obj)
          Indicates whether some other object is "equal to" this one.
 
Methods inherited from class com.isti.quakewatch.message.QWRecord
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

magnitude

public final double magnitude
Magnitude value.


type

public final java.lang.String type
Type code string, or null if none given.


numStations

public final java.lang.Integer numStations
Number-of-stations value, or null if none given.


magMethod

public final java.lang.String magMethod
Magnitude method code string, or null if none given.


magError

public final java.lang.Double magError
Standard-error value, or null if none given.


firstMagCommentText

public final java.lang.String firstMagCommentText
Contents of first "Comment|Text" element, or null if none.


version

public final java.lang.String version
'Version' value for ANSS-EQ-XML element, or null if none.


preferredFlag

public final java.lang.Boolean preferredFlag
'PreferredFlag' value for ANSS-EQ-XML element, or null if none.

Constructor Detail

QWMagnitudeRecord

public QWMagnitudeRecord(org.jdom.Element elementObj,
                         int messageFormatSpec)
                  throws QWRecordException
Creates a magnitude data record, built from an XML "Magnitude" message element.

Parameters:
elementObj - the XML "Magnitude" message element.
messageFormatSpec - specifier for message-format type (one of the 'QWIdentDataMsgRecord.MFMT_...' values).
Throws:
QWRecordException - if an error occurs while creating the data record.

QWMagnitudeRecord

public QWMagnitudeRecord(org.jdom.Element elementObj,
                         boolean anssEQFlag)
                  throws QWRecordException
Deprecated. Use version with 'messageFormatSpec' parameter.

Creates a magnitude data record, built from an XML "Magnitude" message element.

Parameters:
elementObj - the XML "Magnitude" message element.
anssEQFlag - true to interpret message element as ANSS-EQ-XML format; false interpret message element as "QuakeWatch" format.
Throws:
QWRecordException - if an error occurs while creating the data record.

QWMagnitudeRecord

public QWMagnitudeRecord(org.jdom.Element elementObj)
                  throws QWRecordException
Creates a magnitude data record, built from an XML "Magnitude" message element.

Parameters:
elementObj - the XML "Magnitude" message element.
Throws:
QWRecordException - if an error occurs while creating the data record.
Method Detail

equals

public boolean equals(QWMagnitudeRecord obj)
Indicates whether some other object is "equal to" this one.

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class QWRecord
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.