Class DYFIProduct

java.lang.Object
gov.usgs.earthquake.product.Product
gov.usgs.earthquake.dyfi.DYFIProduct

public class DYFIProduct extends Product
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 Details

    • DYFI_EVENT_XML_ATTACHMENT

      public static final String DYFI_EVENT_XML_ATTACHMENT
      References the event_data.xml file in the Product
      See Also:
    • DYFI_NUM_RESP_ATTRIBUTE

      public static final String DYFI_NUM_RESP_ATTRIBUTE
      Attribute for number of responses. Read from XML
      See Also:
    • DYFI_MAX_MMI_ATTRIBUTE

      public static final String DYFI_MAX_MMI_ATTRIBUTE
      Attribute for max intensity. Read from XML
      See Also:
    • DYFI_NUM_RESP_PROPERTY

      public static final String DYFI_NUM_RESP_PROPERTY
      Internally set number of responses property
      See Also:
    • DYFI_MAX_MMI_PROPERTY

      public static final String DYFI_MAX_MMI_PROPERTY
      Internally set max intensity property
      See Also:
  • Constructor Details

    • DYFIProduct

      public DYFIProduct(Product product)
      Creates a new DYFIProduct using the given Product as a basis. The given product must have a DYFI_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

      public void setNumResponses(String numResponses) throws NumberFormatException
      Set the number of felt reports submitted for this event.
      Parameters:
      numResponses - The new number of submitted felt reports.
      Throws:
      NumberFormatException - If the given numResponses could not be parsed into an integer.
    • getMaxMMI

      public BigDecimal getMaxMMI()
      Returns:
      The maximum reported intensity for this event.
    • setMaxMMI

      public void setMaxMMI(String maxMMI) throws NumberFormatException
      Sets the maximum reported intensity for this event.
      Parameters:
      maxMMI - The new maximum reported intensity.
      Throws:
      NumberFormatException - If the given maxMMI could not be parsed into a double.