com.isti.quakewatch.message
Class QWEQEventMsgRecord

java.lang.Object
  extended by com.isti.quakewatch.message.QWRecord
      extended by com.isti.quakewatch.message.QWMsgRecord
          extended by com.isti.quakewatch.message.QWDataMsgRecord
              extended by com.isti.quakewatch.message.QWIdentDataMsgRecord
                  extended by com.isti.quakewatch.message.QWEQEventMsgRecord
All Implemented Interfaces:
QWEventMsgRecord, QWMsgNumTimeRec, Archivable, ExtendedComparable, java.lang.Comparable

public class QWEQEventMsgRecord
extends QWIdentDataMsgRecord
implements QWEventMsgRecord, java.lang.Comparable, ExtendedComparable

QWEQEventMsgRecord defines a record of data for one event.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.isti.util.Archivable
Archivable.Marker
 
Field Summary
 java.lang.Boolean authoritative
          Authoritative flag value for event, or null if none given.
 java.lang.Double depth
          Depth value for event, or null if none given.
 org.jdom.Element eventElement
          Handle to 'Element' object used to construct this object.
 java.lang.String firstMagCommentText
          Contents of first "Comment|Text" for magnitude, or null if none.
 double latitude
          Latitude value for event.
 double longitude
          Longitude value for event.
 java.lang.String magnitudeType
          Primary magnitude type for event, or null if none given.
 java.lang.Double magnitudeVal
          Primary magnitude value for event, or null if none given.
 java.lang.Integer magNumStationsVal
          Number-of-stations value, or null if none given.
 java.lang.Double magStandardErrorVal
          Standard-error value for primary magnitude, or null if none given.
 java.lang.String msgTypeCode
          Message type code string received from feeder module.
static java.lang.String NO_VALUE_STR
          Text to display when there is no value
protected  FifoHashtable productRecTable
          Table of 'QWProductMsgRecord' objects for this event (or null).
 boolean quarry
          Quarry flag value for event, or false if none given.
protected  QWEventMsgRecord supersededRecordObj
          Handle to record that this record superseded, or null for none.
 java.util.Date time
          Date object specifying date/time for event.
 java.lang.String type
          Message type string set by QWServer.
 boolean verified
          Verified flag value for event, or false if none given.
 
Fields inherited from class com.isti.quakewatch.message.QWIdentDataMsgRecord
dataSource, eventID, eventIDKey, lcEventIDKeyStr, messageFormatSpec, MFMT_ANSSEQXML, MFMT_QUAKEML, MFMT_QWMESSAGE, version
 
Fields inherited from class com.isti.quakewatch.message.QWDataMsgRecord
action, alarmTriggeredFlag, dataMsgElement, displayObject, locationNote, relayTimeGen, requestedFlag, showMapSymbolFlag, timeReceived, updateFlag, utilityObject
 
Fields inherited from class com.isti.quakewatch.message.QWMsgRecord
archiveFormStr, msgNumber, origTimeGenerated, qwMsgElement, timeGenerated
 
Fields inherited from class com.isti.quakewatch.message.QWRecord
currentElement
 
Fields inherited from interface com.isti.quakewatch.message.QWEventMsgRecord
DATE_SORT_TYPE, DEF_SORT_TYPE, MAX_SORT_TYPE, PROD_SORT_TYPE, VALUE_SORT_TYPE
 
Fields inherited from interface com.isti.util.ExtendedComparable
NO_SORT_TYPE
 
Constructor Summary
QWEQEventMsgRecord(org.jdom.Element qwMsgElement, org.jdom.Element dataMsgElement, org.jdom.Element eventElement)
          Creates a data record for one event, built from a "QuakeWatch" format XML "Event" message element.
QWEQEventMsgRecord(org.jdom.Element qwMsgElement, org.jdom.Element dataMsgElement, org.jdom.Element eventElement, org.jdom.Element originElement, boolean anssEQMsgFormatFlag)
          Deprecated. Use version with 'messageFormatSpec' parameter.
QWEQEventMsgRecord(org.jdom.Element qwMsgElement, org.jdom.Element dataMsgElement, org.jdom.Element eventElement, org.jdom.Element originElement, int messageFormatSpec)
          Creates a data record for one event, built from the given XML elements.
 
Method Summary
 void addProductMsgRecord(QWProductMsgRecord productMsgObj)
          Adds a 'QWProductMsgRecord' object to this event record, to be stored in a table using the record's 'type' as the key value.
 void addToProductRecTable(FifoHashtable tableObj, boolean keepCurrentFlag)
          Appends the given table of 'QWProductMsgRecord' objects for products associated with this event.
static java.lang.String buildDistanceDispStr(double val)
          Returns a display string for the given distance value, including the units tag.
static java.lang.String buildDistanceDispStr(java.lang.Double valObj)
          Returns a display string for the given distance value, including the units tag.
static java.lang.String buildDistanceDispStr(double val, java.lang.String zeroValStr)
          Returns a display string for the given distance value, including the units tag.
static java.lang.String buildDistanceDispStr(java.lang.Double valObj, java.lang.String zeroValStr)
          Returns a display string for the given distance value, including the units tag.
 int compareTo(java.lang.Object obj)
          Compares the given 'QWEventMsgRecord' object to this one.
 int compareTo(java.lang.Object obj, int sortType)
          Compares this object with the specified object and index for order.
 boolean containsShakeMapProduct()
          Returns a flag indicating whether or not this event contains a ShakeMap product.
 boolean containsTsunamiProduct()
          Returns a flag indicating whether or not this event contains a Tsunami product.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 boolean equals(QWEventMsgRecord obj)
          Indicates whether some other object is "equal to" this one.
 java.lang.String getAuthoritativeString()
          Gets the authoritative flag as a string.
 java.lang.String getAzimuthalGapDispStr()
          Returns a display string for the event's azimuthal-gap value, including the units tag.
 java.lang.String getAzimuthalGapDispStr(java.lang.String zeroValStr)
          Returns a display string for the event's azimuthal-gap value, including the units tag.
 java.lang.Double getAzimuthalGapObj()
          Returns a 'Double' containing the event's azimuthal-gap value.
 java.lang.String getDateString()
          Returns a display string representation of the date.
 java.lang.String getDateTimeString()
          Returns a display string representation of the date/time.
 java.lang.String getDateTimeString(boolean oneSpaceFlag)
          Returns a display string representation of the date/time.
 java.lang.Double getDepthObj()
          Returns the event depth value.
 java.lang.String getDepthString()
          Returns a display string representation of the depth.
 java.lang.String getDepthString(boolean milesFlag)
          Returns a display string representation of the depth.
 double[] getDirCos()
           
 java.lang.String getDisplayString()
          Returns a display string representation of this object (not including the location note string).
 java.lang.String getEventScope()
          Returns the 'Event'|'Scope' value for the event.
 java.lang.String getEventUsage()
          Returns the 'Event'|'Usage' value for the event.
 java.lang.String getFirstMagCommentText()
          Returns a the contents of the first "Comment|Text" child-element for the current magnitude.
 java.lang.String getHorizontalErrorDispStr()
          Returns a display string for the event's horizontal-error value, including the units tag.
 java.lang.String getHorizontalErrorDispStr(java.lang.String zeroValStr)
          Returns a display string for the event's horizontal-error value, including the units tag.
 java.lang.Double getHorizontalErrorValObj()
          Returns the event's horizontal-error value (kilometers).
 double getLatitude()
          Returns the event latitude.
 java.lang.String getLatitudeString()
          Returns a display string representation of the latitude.
 java.lang.String getLatitudeString(boolean nsFormatFlag)
          Returns a display string representation of the latitude.
 java.lang.String getLatitudeString(boolean nsFormatFlag, boolean degMinFlag)
          Returns a display string representation of the latitude.
 java.lang.String getLocationMethod()
          Returns the location-method string for the event.
 double getLongitude()
          Returns the event longitude.
 java.lang.String getLongitudeString()
          Returns a display string representation of the longitude.
 java.lang.String getLongitudeString(boolean ewFormatFlag)
          Returns a display string representation of the longitude.
 java.lang.String getLongitudeString(boolean ewFormatFlag, boolean degMinFlag)
          Returns a display string representation of the longitude.
 double getMagnitude()
          Returns the event magnitude.
 java.lang.Double getMagnitudeObj()
          Returns a 'Double' object containing the event magnitude.
 java.lang.String getMagnitudeType()
          Returns a string representing the type code for the primary magnitude.
 java.lang.String getMagnitudeValueString()
          Returns a display string representation of the magnitude.
 java.lang.Integer getMagNumStationsObj()
          Returns an 'Integer' object containing the number of stations for the current magnitude.
 java.lang.Double getMagStandardErrorObj()
          Returns an 'Double' object containing the standard error for the current magnitude.
 java.lang.String getMethodCommentText()
          Returns the contents of the QuakeML "origin | comment | text" element (with 'id' attribute ending with "CUBE_Code#locMeth" or the first ANSS-EQ-XML first "Origin | Method | Comment | Text" element for the event.
 java.lang.String getMinimumDistanceDispStr()
          Returns a display string for the event's minimum-distance value (in kilometers), including the units tag.
 java.lang.String getMinimumDistanceDispStr(java.lang.String zeroValStr)
          Returns a display string for the event's minimum-distance value (in kilometers), including the units tag.
 java.lang.Double getMinimumDistanceObj()
          Returns a 'Double' object containing the event's minimum-distance value (in kilometers).
 org.jdom.Element getMsgRecChildElement()
          Returns the child "Event" element used to build this message record.
 java.lang.String getNetID()
          Returns the event network ID in lower case.
 java.lang.String getNumPhasesDispStr()
          Returns a display string for the event's number-of-phases value.
 java.lang.String getNumPhasesDispStr(java.lang.String zeroValStr)
          Returns a display string for the event's number-of-phases value.
 java.lang.Integer getNumPhasesObj()
          Returns an 'Integer' object containing the event's number-of-phases value.
 java.lang.String getNumStationsDispStr()
          Returns a display string for the event's number-of-stations value.
 java.lang.String getNumStationsDispStr(java.lang.String zeroValStr)
          Returns a display string for the event's number-of-stations value.
 java.lang.Integer getNumStationsObj()
          Returns an 'Integer' object containing the event's number-of-stations value.
 Point getPoint()
           
 int getProductCount()
          Returns the number of products associated with this event.
 QWProductMsgRecord getProductMsgRecord(java.lang.String typeStr)
          Returns a 'QWProductMsgRecord' object for this event record.
 FifoHashtable getProductRecTable()
          Returns the table of 'QWProductMsgRecord' objects for products associated with this event.
 java.lang.String getRMSTimeErrorDispStr()
          Returns a display string for the event's RMS-time-error value, including the units tag.
 java.lang.String getRMSTimeErrorDispStr(java.lang.String zeroValStr)
          Returns a display string for the event's RMS-time-error value, including the units tag.
 java.lang.Double getRMSTimeErrorObj()
          Returns a 'Double' object containing the event's RMS-time-error value.
 long getSelectedTimeVal()
          Returns the time that this message record was last selected.
 java.lang.String getShakeMapInfo()
          Returns the ShakeMap information for the event.
 QWProductMsgRecord getShakeMapProductMsgRecord()
          Gets the shake map product message record for the event.
 QWEventMsgRecord getSupersededRecordObj()
          Returns the handle to the record that this record superseded.
 java.util.Date getTime()
          Returns the event time.
 java.lang.String getTimeString()
          Returns a display string representation of the time.
 java.lang.String getToolTipString()
          Returns a string representation of this record to be used for its tooltip text.
 boolean getTrump()
          Returns true if the event should trump other events.
 int getValueSortRankSpecifier()
          Returns the value-sort rank specifier.
 java.lang.String getVerticalErrorDispStr()
          Returns a display string for the event's vertical-error value, including the units tag.
 java.lang.String getVerticalErrorDispStr(java.lang.String zeroValStr)
          Returns a display string for the event's vertical-error value, including the units tag.
 java.lang.Double getVerticalErrorValObj()
          Returns the event's vertical-error value (kilometers).
 boolean isAuthor()
          Returns true if the event is authoritative.
 boolean isEventDataValid()
          Determines if the event's basic data values are valid.
 boolean isQuarry()
          Returns true if the "quarry" flag is set.
 boolean isVerified()
          Returns true if the event is verified.
 QWProductMsgRecord matchProductMsgRecType(java.lang.String typeStr)
          Returns a matching 'QWProductMsgRecord' object for this event record.
 QWProductMsgRecord removeProductMsgRecord(java.lang.String prodTypeStr)
          Removes a 'QWProductMsgRecord' object from this event record.
 void setProductRecTable(FifoHashtable tableObj)
          Enters a new table of 'QWProductMsgRecord' objects for products associated with this event.
 void setSelectedTimeVal(long timeVal)
          Sets the time that this message record was last selected.
 void setSupersededRecordObj(QWEventMsgRecord recObj)
          Sets the handle to the record that this record superseded.
 void setTrump(boolean b)
          Sets the trump flag.
static void setValueSortRankSpecifier(int specVal)
          Sets the value-sort rank specifier.
 boolean timeEquals(java.lang.Object obj)
          Returns true if the given object is a 'QWEventMsgRecord' object whose event date/time equals the one for this record; otherwise returns false.
 boolean timeEquals(QWEventMsgRecord obj)
          Returns true if the given object is a 'QWEventMsgRecord' object whose event date/time equals the one for this record; otherwise returns false.
 java.lang.String toString()
          Returns a string representation of this record.
static void updateDateTimeZones(java.util.TimeZone zone)
          Updates time zone used for date/time values for all event-message-record objects.
protected  void updateProductIndicatorFlags()
          Updates the contains-product indicator flags.
 
Methods inherited from class com.isti.quakewatch.message.QWIdentDataMsgRecord
equals, getDataSource, getEventID, getEventIDKey, getLCEventIDKey, getVersion, isShakeMapProduct
 
Methods inherited from class com.isti.quakewatch.message.QWDataMsgRecord
equals, getAlarmTriggeredFlag, getDisplayObject, getIdentifierElement, getLocationNote, getRequestedFlag, getShowMapSymbolFlag, getUpdateFlag, getUtilityObject, setAlarmTriggeredFlag, setDisplayObject, setLocationNote, setRequestedFlag, setShowMapSymbolFlag, setUpdateFlag, setUtilityObject
 
Methods inherited from class com.isti.quakewatch.message.QWMsgRecord
checkQWMsgRecordName, elemToStr, equals, getArchiveDate, getMsgNum, getServerAddress, getServerIDName, getServerRevStr, getTimeGenerated, toArchivedForm
 
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, wait, wait, wait
 
Methods inherited from interface com.isti.quakewatch.message.QWEventMsgRecord
getAlarmTriggeredFlag, getDataSource, getDisplayObject, getEventIDKey, getLCEventIDKey, getLocationNote, getRequestedFlag, getShowMapSymbolFlag, getUpdateFlag, getUtilityObject, getVersion, setAlarmTriggeredFlag, setDisplayObject, setLocationNote, setRequestedFlag, setShowMapSymbolFlag, setUpdateFlag, setUtilityObject
 
Methods inherited from interface com.isti.quakewatch.message.QWMsgNumTimeRec
getMsgNum, getTimeGenerated
 

Field Detail

eventElement

public final org.jdom.Element eventElement
Handle to 'Element' object used to construct this object.


type

public final java.lang.String type
Message type string set by QWServer.


msgTypeCode

public final java.lang.String msgTypeCode
Message type code string received from feeder module.


magnitudeVal

public final java.lang.Double magnitudeVal
Primary magnitude value for event, or null if none given.


magNumStationsVal

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


magStandardErrorVal

public final java.lang.Double magStandardErrorVal
Standard-error value for primary magnitude, or null if none given.


firstMagCommentText

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


magnitudeType

public final java.lang.String magnitudeType
Primary magnitude type for event, or null if none given.


time

public final java.util.Date time
Date object specifying date/time for event.


latitude

public final double latitude
Latitude value for event.


longitude

public final double longitude
Longitude value for event.


depth

public final java.lang.Double depth
Depth value for event, or null if none given.


authoritative

public final java.lang.Boolean authoritative
Authoritative flag value for event, or null if none given.


verified

public final boolean verified
Verified flag value for event, or false if none given.


quarry

public final boolean quarry
Quarry flag value for event, or false if none given.


productRecTable

protected FifoHashtable productRecTable
Table of 'QWProductMsgRecord' objects for this event (or null).


supersededRecordObj

protected QWEventMsgRecord supersededRecordObj
Handle to record that this record superseded, or null for none.


NO_VALUE_STR

public static final java.lang.String NO_VALUE_STR
Text to display when there is no value

See Also:
Constant Field Values
Constructor Detail

QWEQEventMsgRecord

public QWEQEventMsgRecord(org.jdom.Element qwMsgElement,
                          org.jdom.Element dataMsgElement,
                          org.jdom.Element eventElement,
                          org.jdom.Element originElement,
                          int messageFormatSpec)
                   throws QWRecordException
Creates a data record for one event, built from the given XML elements.

Parameters:
qwMsgElement - the XML "QWmessage" element object.
dataMsgElement - the XML "DataMessage" element object.
eventElement - the XML "Event" message element.
originElement - the "Origin" message element if ANSS-EQ-XML message format, or null if QuakeWatch message format.
messageFormatSpec - specifier for message-format type (one of the 'QWIdentDataMsgRecord.MFMT_...' values).
Throws:
QWRecordException - if an error occurs while creating the data record.

QWEQEventMsgRecord

public QWEQEventMsgRecord(org.jdom.Element qwMsgElement,
                          org.jdom.Element dataMsgElement,
                          org.jdom.Element eventElement,
                          org.jdom.Element originElement,
                          boolean anssEQMsgFormatFlag)
                   throws QWRecordException
Deprecated. Use version with 'messageFormatSpec' parameter.

Creates a data record for one event, built from the given XML elements.

Parameters:
qwMsgElement - the XML "QWmessage" element object.
dataMsgElement - the XML "DataMessage" element object.
eventElement - the XML "Event" message element.
originElement - the "Origin" message element if ANSS-EQ-XML message format, or null if QuakeWatch message format.
anssEQMsgFormatFlag - true for ANSS-EQ-XML message format; false for QuakeWatch message format.
Throws:
QWRecordException - if an error occurs while creating the data record.

QWEQEventMsgRecord

public QWEQEventMsgRecord(org.jdom.Element qwMsgElement,
                          org.jdom.Element dataMsgElement,
                          org.jdom.Element eventElement)
                   throws QWRecordException
Creates a data record for one event, built from a "QuakeWatch" format XML "Event" message element.

Parameters:
qwMsgElement - the XML "QWmessage" element object.
dataMsgElement - the XML "DataMessage" element object.
eventElement - the XML "Event" message element.
Throws:
QWRecordException - if an error occurs while creating the data record.
Method Detail

getMsgRecChildElement

public org.jdom.Element getMsgRecChildElement()
Returns the child "Event" element used to build this message record.

Specified by:
getMsgRecChildElement in interface QWEventMsgRecord
Returns:
The child "Event" element used to build this message record.

setValueSortRankSpecifier

public static void setValueSortRankSpecifier(int specVal)
Sets the value-sort rank specifier. This is used by the 'compareTo(obj,int)' method to determine the result when two different types of objects that implement 'QWEventMsgRecord' are compared (using 'VALUE_SORT_TYPE').

Parameters:
specVal - numeric specifier to use.

getValueSortRankSpecifier

public int getValueSortRankSpecifier()
Returns the value-sort rank specifier. This is used by the 'compareTo(obj,int)' method to determine the result when two different types of objects that implement 'QWEventMsgRecord' are compared (using 'VALUE_SORT_TYPE').

Specified by:
getValueSortRankSpecifier in interface QWEventMsgRecord
Returns:
The numeric value-sort rank specifier.

getShakeMapInfo

public java.lang.String getShakeMapInfo()
Returns the ShakeMap information for the event.

Specified by:
getShakeMapInfo in interface QWEventMsgRecord
Returns:
ShakeMap info or null if not available.

getShakeMapProductMsgRecord

public QWProductMsgRecord getShakeMapProductMsgRecord()
Gets the shake map product message record for the event.

Returns:
the shake map product message record or null if not available.

isAuthor

public boolean isAuthor()
Returns true if the event is authoritative.

Returns:
true if the event is authoritative.

getAuthoritativeString

public java.lang.String getAuthoritativeString()
Gets the authoritative flag as a string.

Returns:
string representing the authoritative flag.

isVerified

public boolean isVerified()
Returns true if the event is verified.

Specified by:
isVerified in interface QWEventMsgRecord
Returns:
true if the event is verified.

isQuarry

public boolean isQuarry()
Returns true if the "quarry" flag is set.

Specified by:
isQuarry in interface QWEventMsgRecord
Returns:
true if the "quarry" flag is set.

addProductMsgRecord

public void addProductMsgRecord(QWProductMsgRecord productMsgObj)
Adds a 'QWProductMsgRecord' object to this event record, to be stored in a table using the record's 'type' as the key value.

Parameters:
productMsgObj - the 'QWProductMsgRecord' object to add.

getProductMsgRecord

public QWProductMsgRecord getProductMsgRecord(java.lang.String typeStr)
Returns a 'QWProductMsgRecord' object for this event record. A product is considered matched if its type string is identical to the given type string.

Specified by:
getProductMsgRecord in interface QWEventMsgRecord
Parameters:
typeStr - the 'type' value of the 'QWProductMsgRecord' object to be returned.
Returns:
A 'QWProductMsgRecord' object, or null if a matching object is not found.

removeProductMsgRecord

public QWProductMsgRecord removeProductMsgRecord(java.lang.String prodTypeStr)
Removes a 'QWProductMsgRecord' object from this event record.

Parameters:
prodTypeStr - the 'type' string of the 'QWProductMsgRecord' object to remove.
Returns:
The 'QWProductMsgRecord' object that was removed, or null if a matching 'QWProductMsgRecord' was not found.

matchProductMsgRecType

public QWProductMsgRecord matchProductMsgRecType(java.lang.String typeStr)
Returns a matching 'QWProductMsgRecord' object for this event record. A product is considered a match if its type string contains the given type string.

Parameters:
typeStr - the 'type' value of the 'QWProductMsgRecord' object to be matched.
Returns:
A 'QWProductMsgRecord' object, or null if a matching object is not found.

getProductRecTable

public FifoHashtable getProductRecTable()
Returns the table of 'QWProductMsgRecord' objects for products associated with this event.

Specified by:
getProductRecTable in interface QWEventMsgRecord
Returns:
A FifoHashtable of 'QWProductMsgRecord' objects, or null if none are available.

getProductCount

public int getProductCount()
Returns the number of products associated with this event.

Specified by:
getProductCount in interface QWEventMsgRecord
Returns:
The number of products associated with this event.

setProductRecTable

public void setProductRecTable(FifoHashtable tableObj)
Enters a new table of 'QWProductMsgRecord' objects for products associated with this event.

Parameters:
tableObj - the new table to use.

addToProductRecTable

public void addToProductRecTable(FifoHashtable tableObj,
                                 boolean keepCurrentFlag)
Appends the given table of 'QWProductMsgRecord' objects for products associated with this event.

Parameters:
tableObj - the table to use.
keepCurrentFlag - if true then any matching items in the current products table will be retained; if false then any matching items in the given table will overwrite current ones.

updateProductIndicatorFlags

protected void updateProductIndicatorFlags()
Updates the contains-product indicator flags.


containsShakeMapProduct

public boolean containsShakeMapProduct()
Returns a flag indicating whether or not this event contains a ShakeMap product.

Specified by:
containsShakeMapProduct in interface QWEventMsgRecord
Returns:
true if this event contains a ShakeMap product; false if not.

containsTsunamiProduct

public boolean containsTsunamiProduct()
Returns a flag indicating whether or not this event contains a Tsunami product.

Specified by:
containsTsunamiProduct in interface QWEventMsgRecord
Returns:
true if this event contains a Tsunami product; false if not.

equals

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

Specified by:
equals in interface QWEventMsgRecord
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.

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

timeEquals

public boolean timeEquals(QWEventMsgRecord obj)
Returns true if the given object is a 'QWEventMsgRecord' object whose event date/time equals the one for this record; otherwise returns false.

Specified by:
timeEquals in interface QWEventMsgRecord
Parameters:
obj - the 'QWEventMsgRecord' object to use.
Returns:
true if the event date/times are equal.

timeEquals

public boolean timeEquals(java.lang.Object obj)
Returns true if the given object is a 'QWEventMsgRecord' object whose event date/time equals the one for this record; otherwise returns false.

Specified by:
timeEquals in interface QWEventMsgRecord
Parameters:
obj - the 'QWEventMsgRecord' object to use.
Returns:
true if the event date/times are equal.

compareTo

public int compareTo(java.lang.Object obj,
                     int sortType)
              throws java.lang.ClassCastException
Compares this object with the specified object and index for order. This method implements the ExtendedComparable interface.

Specified by:
compareTo in interface ExtendedComparable
Parameters:
obj - the Object to be compared.
sortType - the sort type.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this Object.

compareTo

public int compareTo(java.lang.Object obj)
              throws java.lang.ClassCastException
Compares the given 'QWEventMsgRecord' object to this one. The event date/time is used as the sorting key.

Specified by:
compareTo in interface QWEventMsgRecord
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - the 'QWEventMsgRecord' object to use.
Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this Object.

toString

public java.lang.String toString()
Returns a string representation of this record. (Same as 'getToolTipString()' method.)

Specified by:
toString in interface QWEventMsgRecord
Overrides:
toString in class java.lang.Object
Returns:
A string representation of date, time and magnitude for this record, with 2-space separators surrounding each item.

getToolTipString

public java.lang.String getToolTipString()
Returns a string representation of this record to be used for its tooltip text. (Same as 'toString()' method.)

Specified by:
getToolTipString in interface QWEventMsgRecord
Returns:
A string representation of date, time and magnitude for this record.

getDisplayString

public java.lang.String getDisplayString()
Returns a display string representation of this object (not including the location note string).

Specified by:
getDisplayString in interface QWEventMsgRecord
Returns:
A new String object.

getDateString

public java.lang.String getDateString()
Returns a display string representation of the date.

Specified by:
getDateString in interface QWEventMsgRecord
Returns:
A display string.

getDateTimeString

public java.lang.String getDateTimeString(boolean oneSpaceFlag)
Returns a display string representation of the date/time.

Parameters:
oneSpaceFlag - true for one space between date and time; false for two spaces.
Returns:
A display string.

getDateTimeString

public java.lang.String getDateTimeString()
Returns a display string representation of the date/time.

Specified by:
getDateTimeString in interface QWEventMsgRecord
Returns:
A display string.

getTimeString

public java.lang.String getTimeString()
Returns a display string representation of the time.

Specified by:
getTimeString in interface QWEventMsgRecord
Returns:
A display string.

getLatitudeString

public java.lang.String getLatitudeString(boolean nsFormatFlag,
                                          boolean degMinFlag)
Returns a display string representation of the latitude.

Specified by:
getLatitudeString in interface QWEventMsgRecord
Parameters:
nsFormatFlag - true for N/S format; false for +/- format.
degMinFlag - true for degrees/minutes format; false for decimal format.
Returns:
A display string.

getLatitudeString

public java.lang.String getLatitudeString(boolean nsFormatFlag)
Returns a display string representation of the latitude. The decimal format is used.

Specified by:
getLatitudeString in interface QWEventMsgRecord
Parameters:
nsFormatFlag - true for N/S format; false for +/- format.
Returns:
A display string.

getLatitudeString

public java.lang.String getLatitudeString()
Returns a display string representation of the latitude. The decimal +/- format is used.

Specified by:
getLatitudeString in interface QWEventMsgRecord
Returns:
A display string.

getLongitudeString

public java.lang.String getLongitudeString(boolean ewFormatFlag,
                                           boolean degMinFlag)
Returns a display string representation of the longitude.

Specified by:
getLongitudeString in interface QWEventMsgRecord
Parameters:
ewFormatFlag - true for E/W format; false for +/- format.
degMinFlag - true for degrees/minutes format; false for decimal format.
Returns:
A display string.

getLongitudeString

public java.lang.String getLongitudeString(boolean ewFormatFlag)
Returns a display string representation of the longitude. The decimal format is used.

Specified by:
getLongitudeString in interface QWEventMsgRecord
Parameters:
ewFormatFlag - true for E/W format; false for +/- format.
Returns:
A display string.

getLongitudeString

public java.lang.String getLongitudeString()
Returns a display string representation of the longitude. The decimal +/- format is used.

Specified by:
getLongitudeString in interface QWEventMsgRecord
Returns:
A display string.

getDepthObj

public java.lang.Double getDepthObj()
Returns the event depth value.

Specified by:
getDepthObj in interface QWEventMsgRecord
Returns:
A 'Double' containing the event depth value, or null if none available.

getDepthString

public java.lang.String getDepthString(boolean milesFlag)
Returns a display string representation of the depth.

Specified by:
getDepthString in interface QWEventMsgRecord
Parameters:
milesFlag - true to convert the depth value from kilometers to miles; false to leave the depth value unchanged.
Returns:
A display string.

getDepthString

public java.lang.String getDepthString()
Returns a display string representation of the depth.

Specified by:
getDepthString in interface QWEventMsgRecord
Returns:
A display string.

getMagnitudeValueString

public java.lang.String getMagnitudeValueString()
Returns a display string representation of the magnitude.

Specified by:
getMagnitudeValueString in interface QWEventMsgRecord
Returns:
A display string.

getMagnitudeType

public java.lang.String getMagnitudeType()
Returns a string representing the type code for the primary magnitude.

Specified by:
getMagnitudeType in interface QWEventMsgRecord
Returns:
A string representing the type code for the primary magnitude, or null if none available.

getNetID

public java.lang.String getNetID()
Description copied from interface: QWEventMsgRecord
Returns the event network ID in lower case.

Specified by:
getNetID in interface QWEventMsgRecord
Returns:
the event network ID in lower case.

getDirCos

public double[] getDirCos()

getPoint

public Point getPoint()

getLatitude

public double getLatitude()
Returns the event latitude.

Specified by:
getLatitude in interface QWEventMsgRecord
Returns:
the event latitude.

getLongitude

public double getLongitude()
Returns the event longitude.

Specified by:
getLongitude in interface QWEventMsgRecord
Returns:
the event longitude.

getMagnitude

public double getMagnitude()
Returns the event magnitude.

Specified by:
getMagnitude in interface QWEventMsgRecord
Returns:
The event magnitude, or 0.0 if none available.

getMagnitudeObj

public java.lang.Double getMagnitudeObj()
Returns a 'Double' object containing the event magnitude.

Specified by:
getMagnitudeObj in interface QWEventMsgRecord
Returns:
A 'Double' object containing the event magnitude, or null if none available.

getMagNumStationsObj

public java.lang.Integer getMagNumStationsObj()
Returns an 'Integer' object containing the number of stations for the current magnitude.

Returns:
An 'Integer' object containing the number of stations for the current magnitude, or null if none available.

getMagStandardErrorObj

public java.lang.Double getMagStandardErrorObj()
Returns an 'Double' object containing the standard error for the current magnitude.

Returns:
An 'Double' object containing the standard error for the current magnitude, or null if none available.

getFirstMagCommentText

public java.lang.String getFirstMagCommentText()
Returns a the contents of the first "Comment|Text" child-element for the current magnitude.

Returns:
The contents of the first "Comment|Text" child-element for the current magnitude, or null if none available.

getTime

public java.util.Date getTime()
Returns the event time.

Specified by:
getTime in interface QWEventMsgRecord
Returns:
the event time.

getTrump

public boolean getTrump()
Returns true if the event should trump other events.

Returns:
true if the event should trump other events.

setTrump

public void setTrump(boolean b)
Sets the trump flag.

Parameters:
b - the flag value to use.

getHorizontalErrorValObj

public java.lang.Double getHorizontalErrorValObj()
Returns the event's horizontal-error value (kilometers).

Returns:
A 'Double' object containing the event's horizontal-error value, or null if not available.

getHorizontalErrorDispStr

public java.lang.String getHorizontalErrorDispStr(java.lang.String zeroValStr)
Returns a display string for the event's horizontal-error value, including the units tag.

Parameters:
zeroValStr - a string to be returned if the value is less than or equal to zero, or null if a display string for the value should be returned.
Returns:
A display string for the event's horizontal-error value, or null if not available.

getHorizontalErrorDispStr

public java.lang.String getHorizontalErrorDispStr()
Returns a display string for the event's horizontal-error value, including the units tag.

Returns:
A display string for the event's horizontal-error value, or null if not available.

getVerticalErrorValObj

public java.lang.Double getVerticalErrorValObj()
Returns the event's vertical-error value (kilometers).

Returns:
A 'Double' object containing the event's vertical-error value, or null if not available.

getVerticalErrorDispStr

public java.lang.String getVerticalErrorDispStr(java.lang.String zeroValStr)
Returns a display string for the event's vertical-error value, including the units tag.

Parameters:
zeroValStr - a string to be returned if the value is less than or equal to zero, or null if a display string for the value should be returned.
Returns:
A display string for the event's vertical-error value, or null if not available.

getVerticalErrorDispStr

public java.lang.String getVerticalErrorDispStr()
Returns a display string for the event's vertical-error value, including the units tag.

Returns:
A display string for the event's vertical-error value, or null if not available.

getRMSTimeErrorObj

public java.lang.Double getRMSTimeErrorObj()
Returns a 'Double' object containing the event's RMS-time-error value.

Returns:
A 'Double' object containing the event's RMS-time-error value, or null if not available.

getRMSTimeErrorDispStr

public java.lang.String getRMSTimeErrorDispStr(java.lang.String zeroValStr)
Returns a display string for the event's RMS-time-error value, including the units tag.

Parameters:
zeroValStr - a string to be returned if the value is less than or equal to zero, or null if a display string for the value should be returned.
Returns:
A display string for the event's RMS-time-error value, or null if not available.

getRMSTimeErrorDispStr

public java.lang.String getRMSTimeErrorDispStr()
Returns a display string for the event's RMS-time-error value, including the units tag.

Returns:
A display string for the event's RMS-time-error value, or null if not available.

getAzimuthalGapObj

public java.lang.Double getAzimuthalGapObj()
Returns a 'Double' containing the event's azimuthal-gap value.

Returns:
A 'Double' containing the event's azimuthal-gap value, or null if not available.

getAzimuthalGapDispStr

public java.lang.String getAzimuthalGapDispStr(java.lang.String zeroValStr)
Returns a display string for the event's azimuthal-gap value, including the units tag.

Parameters:
zeroValStr - a string to be returned if the value is less than or equal to zero, or null if a display string for the value should be returned.
Returns:
A display string for the event's azimuthal-gap value, or null if not available.

getAzimuthalGapDispStr

public java.lang.String getAzimuthalGapDispStr()
Returns a display string for the event's azimuthal-gap value, including the units tag.

Returns:
A display string for the event's azimuthal-gap value, or null if not available.

getNumPhasesObj

public java.lang.Integer getNumPhasesObj()
Returns an 'Integer' object containing the event's number-of-phases value.

Returns:
An 'Integer' object containing the event's number-of-phases value, or null if none available.

getNumPhasesDispStr

public java.lang.String getNumPhasesDispStr(java.lang.String zeroValStr)
Returns a display string for the event's number-of-phases value.

Parameters:
zeroValStr - a string to be returned if the value is less than or equal to zero, or null if a display string for the value should be returned.
Returns:
A display string for the event's number-of-phases value, or null if not available.

getNumPhasesDispStr

public java.lang.String getNumPhasesDispStr()
Returns a display string for the event's number-of-phases value.

Returns:
A display string for the event's number-of-phases value, or null if not available.

getNumStationsObj

public java.lang.Integer getNumStationsObj()
Returns an 'Integer' object containing the event's number-of-stations value.

Returns:
An 'Integer' object containing the event's number-of-stations value, or null if none available.

getNumStationsDispStr

public java.lang.String getNumStationsDispStr(java.lang.String zeroValStr)
Returns a display string for the event's number-of-stations value.

Parameters:
zeroValStr - a string to be returned if the value is less than or equal to zero, or null if a display string for the value should be returned.
Returns:
A display string for the event's number-of-stations value, or null if not available.

getNumStationsDispStr

public java.lang.String getNumStationsDispStr()
Returns a display string for the event's number-of-stations value.

Returns:
A display string for the event's number-of-stations value, or null if not available.

getMinimumDistanceObj

public java.lang.Double getMinimumDistanceObj()
Returns a 'Double' object containing the event's minimum-distance value (in kilometers).

Returns:
A 'Double' object containing the event's minimum-distance value (in kilometers), or null if not available.

getMinimumDistanceDispStr

public java.lang.String getMinimumDistanceDispStr(java.lang.String zeroValStr)
Returns a display string for the event's minimum-distance value (in kilometers), including the units tag.

Parameters:
zeroValStr - a string to be returned if the value is less than or equal to zero, or null if a display string for the value should be returned.
Returns:
A display string for the event's minimum-distance value, or null if not available.

getMinimumDistanceDispStr

public java.lang.String getMinimumDistanceDispStr()
Returns a display string for the event's minimum-distance value (in kilometers), including the units tag.

Returns:
A display string for the event's minimum-distance value, or null if not available.

getLocationMethod

public java.lang.String getLocationMethod()
Returns the location-method string for the event.

Returns:
The location-method string for the event, or null if not available.

getMethodCommentText

public java.lang.String getMethodCommentText()
Returns the contents of the QuakeML "origin | comment | text" element (with 'id' attribute ending with "CUBE_Code#locMeth" or the first ANSS-EQ-XML first "Origin | Method | Comment | Text" element for the event.

Returns:
The method-comment text, or null if not found (or not QuakeML or ANSS-EQ-XML format).

getEventUsage

public java.lang.String getEventUsage()
Returns the 'Event'|'Usage' value for the event.

Returns:
The 'Event'|'Usage' value for the event, or null if not available.

getEventScope

public java.lang.String getEventScope()
Returns the 'Event'|'Scope' value for the event.

Returns:
The 'Event'|'Scope' value for the event, or null if not available.

isEventDataValid

public boolean isEventDataValid()
Determines if the event's basic data values are valid. The event time, latitude, longitude, and magnitude (if present) are checked.

Returns:
true if the event's basic data values are valid; false if not.

setSupersededRecordObj

public void setSupersededRecordObj(QWEventMsgRecord recObj)
Sets the handle to the record that this record superseded.

Specified by:
setSupersededRecordObj in interface QWEventMsgRecord
Parameters:
recObj - handle to record that this record superseded, or null for none.

getSupersededRecordObj

public QWEventMsgRecord getSupersededRecordObj()
Returns the handle to the record that this record superseded.

Specified by:
getSupersededRecordObj in interface QWEventMsgRecord
Returns:
The handle to the record that this record superseded, or null for none.

setSelectedTimeVal

public void setSelectedTimeVal(long timeVal)
Sets the time that this message record was last selected. This method is not implemented in this class.

Specified by:
setSelectedTimeVal in interface QWEventMsgRecord
Parameters:
timeVal - time value, in milliseconds since 1/1/1970.

getSelectedTimeVal

public long getSelectedTimeVal()
Returns the time that this message record was last selected. This method is not implemented in this class.

Specified by:
getSelectedTimeVal in interface QWEventMsgRecord
Returns:
0.

updateDateTimeZones

public static void updateDateTimeZones(java.util.TimeZone zone)
Updates time zone used for date/time values for all event-message-record objects.

Parameters:
zone - time zone.

buildDistanceDispStr

public static java.lang.String buildDistanceDispStr(double val,
                                                    java.lang.String zeroValStr)
Returns a display string for the given distance value, including the units tag.

Parameters:
val - the given value to use.
zeroValStr - a string to be returned if the value is less than or equal to zero, or null if a display string for the value should be returned.
Returns:
A display string for the event's distance error value, or null if not available.

buildDistanceDispStr

public static java.lang.String buildDistanceDispStr(java.lang.Double valObj,
                                                    java.lang.String zeroValStr)
Returns a display string for the given distance value, including the units tag.

Parameters:
valObj - the given value object to use.
zeroValStr - a string to be returned if the value is less than or equal to zero, or null if a display string for the value should be returned.
Returns:
A display string for the event's distance error value, or null if not available.

buildDistanceDispStr

public static java.lang.String buildDistanceDispStr(double val)
Returns a display string for the given distance value, including the units tag.

Parameters:
val - the given value to use.
Returns:
A display string for the event's distance error value, or null if not available.

buildDistanceDispStr

public static java.lang.String buildDistanceDispStr(java.lang.Double valObj)
Returns a display string for the given distance value, including the units tag.

Parameters:
valObj - the given value object to use.
Returns:
A display string for the event's distance error value, or null if not available.