Package gov.usgs.earthquake.dyfi
Class DYFIProduct
java.lang.Object
gov.usgs.earthquake.product.Product
gov.usgs.earthquake.dyfi.DYFIProduct
DYFIProduct object to add additional Product properties based on contents.
This subclass of Product provides access to additional DYFI-specific
attributes and loads these attributes, as well as additional Product
attributes from ShakeMap source XML files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
References the event_data.xml file in the Productstatic final String
Attribute for max intensity.static final String
Internally set max intensity propertystatic final String
Attribute for number of responses.static final String
Internally set number of responses propertyFields inherited from class gov.usgs.earthquake.product.Product
DEPTH_PROPERTY, EVENTSOURCE_PROPERTY, EVENTSOURCECODE_PROPERTY, EVENTTIME_PROPERTY, LATITUDE_PROPERTY, LONGITUDE_PROPERTY, MAGNITUDE_PROPERTY, STATUS_DELETE, STATUS_UPDATE, VERSION_PROPERTY
-
Constructor Summary
ConstructorsConstructorDescriptionDYFIProduct
(Product product) Creates a new DYFIProduct using the givenProduct
as a basis. -
Method Summary
Modifier and TypeMethodDescriptionint
protected void
Reads in DYFI Event EXL and parses it into a EventDataXMLHandlervoid
Sets the maximum reported intensity for this event.void
setNumResponses
(String numResponses) Set the number of felt reports submitted for this event.Methods inherited from class gov.usgs.earthquake.product.Product
addLink, addToSignatureHistory, getContents, getDepth, getEventId, getEventSource, getEventSourceCode, getEventTime, getId, getLatitude, getLinks, getLongitude, getMagnitude, getProperties, getSignature, getSignatureHistory, getSignatureVersion, getStatus, getVersion, isDeleted, setContents, setDepth, setEventId, setEventSource, setEventSourceCode, setEventTime, setId, setLatitude, setLinks, setLongitude, setMagnitude, setProperties, setSignature, setSignatureHistory, setSignatureVersion, setStatus, setVersion, sign, verifySignature, verifySignature, verifySignatureKey, verifySignatureKey
-
Field Details
-
DYFI_EVENT_XML_ATTACHMENT
References the event_data.xml file in the Product- See Also:
-
DYFI_NUM_RESP_ATTRIBUTE
Attribute for number of responses. Read from XML- See Also:
-
DYFI_MAX_MMI_ATTRIBUTE
Attribute for max intensity. Read from XML- See Also:
-
DYFI_NUM_RESP_PROPERTY
Internally set number of responses property- See Also:
-
DYFI_MAX_MMI_PROPERTY
Internally set max intensity property- See Also:
-
-
Constructor Details
-
DYFIProduct
Creates a new DYFIProduct using the givenProduct
as a basis. The given product must have aDYFI_EVENT_XML_ATTACHMENT
in order to successfully create a DYFIProduct.- Parameters:
product
- The product serving as a basis for this instance.
-
-
Method Details
-
loadEventXml
protected void loadEventXml()Reads in DYFI Event EXL and parses it into a EventDataXMLHandler -
getNumResponses
public int getNumResponses()- Returns:
- The number of felt reports submitted for this event.
-
setNumResponses
Set the number of felt reports submitted for this event.- Parameters:
numResponses
- The new number of submitted felt reports.- Throws:
NumberFormatException
- If the givennumResponses
could not be parsed into an integer.
-
getMaxMMI
- Returns:
- The maximum reported intensity for this event.
-
setMaxMMI
Sets the maximum reported intensity for this event.- Parameters:
maxMMI
- The new maximum reported intensity.- Throws:
NumberFormatException
- If the givenmaxMMI
could not be parsed into a double.
-