com.isti.quakewatch.message
Interface QWEventMsgRecord

All Superinterfaces:
java.lang.Comparable, QWMsgNumTimeRec
All Known Implementing Classes:
QWEQEventMsgRecord, QWStationAmpMsgRecord

public interface QWEventMsgRecord
extends java.lang.Comparable, QWMsgNumTimeRec

QWEventMsgRecord defines a record of data for one event.


Field Summary
static int DATE_SORT_TYPE
          The date sort type.
static int DEF_SORT_TYPE
          The default sort type.
static int MAX_SORT_TYPE
          The maximum sort type.
static int PROD_SORT_TYPE
          The products sort type.
static int VALUE_SORT_TYPE
          The value sort type.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compares the given 'QWEventMsgRecord' object to this one.
 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.
 boolean getAlarmTriggeredFlag()
          Returns the 'alarmTriggered' flag to indicate whether or not an alarm has been triggered for this record.
 java.lang.String getDataSource()
          Returns the event data-source code.
 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.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.
 java.lang.Object getDisplayObject()
          Returns the display object associated with this event record.
 java.lang.String getDisplayString()
          Returns a display string representation of this object (not including the location note string).
 java.lang.String getEventIDKey()
          Returns the event ID key (usually including a leading data-source code).
 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 getLCEventIDKey()
          Returns a lower-cased version of the event ID key (usually including a leading data-source code).
 java.lang.String getLocationNote()
          Returns the "Location Note" value for this event record.
 double getLongitude()
          Return 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()
          Return 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.
 org.jdom.Element getMsgRecChildElement()
          Returns the child element used to build the message record.
 java.lang.String getNetID()
          Returns the event network ID in lower case.
 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.
 boolean getRequestedFlag()
          Returns the "requested" flag.
 long getSelectedTimeVal()
          Returns the time that this message record was last selected.
 java.lang.String getShakeMapInfo()
          Returns the ShakeMap information for the event.
 boolean getShowMapSymbolFlag()
          Returns the 'showMapSymbolFlag' flag to indicate whether or not the symbol for this message should be shown on the map.
 QWEventMsgRecord getSupersededRecordObj()
          Returns the handle to the record that this record superseded.
 java.util.Date getTime()
          Return 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 getUpdateFlag()
          Returns true if this record is an update to a previously existing event record, false if it is a new event record.
 java.lang.Object getUtilityObject()
          Returns the utility object associated with this event record.
 int getValueSortRankSpecifier()
          Returns the value-sort rank specifier.
 java.lang.String getVersion()
          Returns the version code string for the event.
 boolean isQuarry()
          Returns true if the "quarry" flag is set.
 boolean isVerified()
          Returns true if the event is verified.
 void setAlarmTriggeredFlag(boolean flgVal)
          Sets the 'alarmTriggered' flag to indicate whether or not an alarm has been triggered for this record.
 void setDisplayObject(java.lang.Object obj)
          Sets the display object associated with this event record.
 void setLocationNote(java.lang.String str)
          Sets the "Location Note" value for this event record.
 void setRequestedFlag(boolean flgVal)
          Sets the "requested" flag.
 void setSelectedTimeVal(long timeVal)
          Sets the time that this message record was last selected.
 void setShowMapSymbolFlag(boolean flgVal)
          Sets the 'showMapSymbolFlag' flag to indicate whether or not the symbol for this message should be shown on the map.
 void setSupersededRecordObj(QWEventMsgRecord recObj)
          Sets the handle to the record that this record superseded.
 void setUpdateFlag(boolean flgVal)
          Sets the 'update' flag to indicate whether or not this record is an update to a previously existing event record.
 void setUtilityObject(java.lang.Object obj)
          Sets the utility object associated with this event record.
 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.
 
Methods inherited from interface com.isti.quakewatch.message.QWMsgNumTimeRec
getMsgNum, getTimeGenerated
 

Field Detail

PROD_SORT_TYPE

static final int PROD_SORT_TYPE
The products sort type.

See Also:
Constant Field Values

DATE_SORT_TYPE

static final int DATE_SORT_TYPE
The date sort type.

See Also:
Constant Field Values

VALUE_SORT_TYPE

static final int VALUE_SORT_TYPE
The value sort type.

See Also:
Constant Field Values

DEF_SORT_TYPE

static final int DEF_SORT_TYPE
The default sort type.

See Also:
Constant Field Values

MAX_SORT_TYPE

static final int MAX_SORT_TYPE
The maximum sort type.

See Also:
Constant Field Values
Method Detail

getMsgRecChildElement

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

Returns:
The child element used to build the message record.

equals

boolean equals(QWEventMsgRecord 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

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

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

timeEquals

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.

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

timeEquals

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.

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

compareTo

int compareTo(java.lang.Object obj)
              throws java.lang.ClassCastException
Compares the given 'QWEventMsgRecord' object to this one.

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. The event date/time is used as the sorting key.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this Object.

getValueSortRankSpecifier

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').

Returns:
The numeric value-sort rank specifier.

toString

java.lang.String toString()
Returns a string representation of this record.

Overrides:
toString in class java.lang.Object

getToolTipString

java.lang.String getToolTipString()
Returns a string representation of this record to be used for its tooltip text.


getDisplayString

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

Returns:
A new String object.

getDateString

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

Returns:
A display string.

getDateTimeString

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

Returns:
A display string.

getTimeString

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

Returns:
A display string.

getLatitudeString

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

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

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

Parameters:
nsFormatFlag - true for N/S format; false for +/- format.
Returns:
A display string.

getLatitudeString

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

Returns:
A display string.

getLongitudeString

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

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

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

Parameters:
ewFormatFlag - true for E/W format; false for +/- format.
Returns:
A display string.

getLongitudeString

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

Returns:
A display string.

setLocationNote

void setLocationNote(java.lang.String str)
Sets the "Location Note" value for this event record.

Parameters:
str - the "Location Note" value to use.

getLocationNote

java.lang.String getLocationNote()
Returns the "Location Note" value for this event record.

Returns:
A string containing the "Location Note" value.

setRequestedFlag

void setRequestedFlag(boolean flgVal)
Sets the "requested" flag.

Parameters:
flgVal - the flag value to set.

getRequestedFlag

boolean getRequestedFlag()
Returns the "requested" flag.

Returns:
the value of the flag.

setDisplayObject

void setDisplayObject(java.lang.Object obj)
Sets the display object associated with this event record.

Parameters:
obj - the object to use.

getDisplayObject

java.lang.Object getDisplayObject()
Returns the display object associated with this event record.

Returns:
The display object.

setUtilityObject

void setUtilityObject(java.lang.Object obj)
Sets the utility object associated with this event record.

Parameters:
obj - the object to use.

getUtilityObject

java.lang.Object getUtilityObject()
Returns the utility object associated with this event record.

Returns:
The utility object.

getProductMsgRecord

QWProductMsgRecord getProductMsgRecord(java.lang.String typeStr)
Returns a 'QWProductMsgRecord' object for this event record.

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.

getProductRecTable

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

Returns:
A FifoHashtable of 'QWProductMsgRecord' objects, or null if none are available.

getProductCount

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

Returns:
The number of products associated with this event.

getShakeMapInfo

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

Returns:
ShakeMap info or null if not available.

containsShakeMapProduct

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

Returns:
true if this event contains a ShakeMap product; false if not.

containsTsunamiProduct

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

Returns:
true if this event contains a Tsunami product; false if not.

setUpdateFlag

void setUpdateFlag(boolean flgVal)
Sets the 'update' flag to indicate whether or not this record is an update to a previously existing event record.

Parameters:
flgVal - true if this record is an update, false if it is a new event record.

getUpdateFlag

boolean getUpdateFlag()
Returns true if this record is an update to a previously existing event record, false if it is a new event record.

Returns:
true if this record is an update.

setAlarmTriggeredFlag

void setAlarmTriggeredFlag(boolean flgVal)
Sets the 'alarmTriggered' flag to indicate whether or not an alarm has been triggered for this record.

Parameters:
flgVal - true if an alarm has been triggered for this record, false if not.

getAlarmTriggeredFlag

boolean getAlarmTriggeredFlag()
Returns the 'alarmTriggered' flag to indicate whether or not an alarm has been triggered for this record.

Returns:
true if an alarm has been triggered for this record, false if not.

setShowMapSymbolFlag

void setShowMapSymbolFlag(boolean flgVal)
Sets the 'showMapSymbolFlag' flag to indicate whether or not the symbol for this message should be shown on the map. If this method is not called then then 'showMapSymbolFlag' flag will default to 'true' (symbol shown on map).

Parameters:
flgVal - true if the symbol for this message should be shown on the map; false if not.

getShowMapSymbolFlag

boolean getShowMapSymbolFlag()
Returns the 'showMapSymbolFlag' flag to indicate whether or not the symbol for this message should be shown on the map.

Returns:
true if the symbol for this message should be shown on the map; false if not.

getNetID

java.lang.String getNetID()
Returns the event network ID in lower case.

Returns:
the event network ID in lower case.

getEventIDKey

java.lang.String getEventIDKey()
Returns the event ID key (usually including a leading data-source code).

Returns:
The event ID key.

getLCEventIDKey

java.lang.String getLCEventIDKey()
Returns a lower-cased version of the event ID key (usually including a leading data-source code).

Returns:
The lower-cased event ID key.

getDataSource

java.lang.String getDataSource()
Returns the event data-source code.

Returns:
The event data-source code.

getVersion

java.lang.String getVersion()
Returns the version code string for the event.

Returns:
The version code string for the event, or null if none given.

getLatitude

double getLatitude()
Returns the event latitude.

Returns:
the event latitude.

getLongitude

double getLongitude()
Return the event longitude.

Returns:
the event longitude.

getMagnitude

double getMagnitude()
Return the event magnitude.

Returns:
the event magnitude.

getMagnitudeObj

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

Returns:
A 'Double' object containing the event magnitude, or null if none available.

getMagnitudeValueString

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

Returns:
A display string.

getMagnitudeType

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

Returns:
A string representing the type code for the primary magnitude, or null if none available.

getDepthObj

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

Returns:
A 'Double' containing the event depth value, or null if none available.

getDepthString

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

Parameters:
milesFlag - true to convert the depth value from kilometers to miles; false to leave the depth value unchanged.
Returns:
A display string.

getDepthString

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

Returns:
A display string.

getTime

java.util.Date getTime()
Return the event time.

Returns:
the event time.

isVerified

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

Returns:
true if the event is verified.

isQuarry

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

Returns:
true if the "quarry" flag is set.

setSupersededRecordObj

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

Parameters:
recObj - handle to record that this record superseded, or null for none.

getSupersededRecordObj

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

Returns:
The handle to the record that this record superseded, or null for none.

setSelectedTimeVal

void setSelectedTimeVal(long timeVal)
Sets the time that this message record was last selected.

Parameters:
timeVal - time value, in milliseconds since 1/1/1970.

getSelectedTimeVal

long getSelectedTimeVal()
Returns the time that this message record was last selected.

Returns:
The time that this message record was last selected (in milliseconds since 1/1/1970), or 0 if this record was never selected or if this method is not implemented.