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 StringReferences the event_data.xml file in the Productstatic final StringAttribute for max intensity.static final StringInternally set max intensity propertystatic final StringAttribute for number of responses.static final StringInternally 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 givenProductas a basis. -
Method Summary
Modifier and TypeMethodDescriptionintprotected voidReads in DYFI Event EXL and parses it into a EventDataXMLHandlervoidSets the maximum reported intensity for this event.voidsetNumResponses(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 givenProductas a basis. The given product must have aDYFI_EVENT_XML_ATTACHMENTin 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 givennumResponsescould 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 givenmaxMMIcould not be parsed into a double.
-