Class 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 Detail

      • DYFI_EVENT_XML_ATTACHMENT

        public static final java.lang.String DYFI_EVENT_XML_ATTACHMENT
        References the event_data.xml file in the Product
        See Also:
        Constant Field Values
      • DYFI_NUM_RESP_ATTRIBUTE

        public static final java.lang.String DYFI_NUM_RESP_ATTRIBUTE
        Attribute for number of responses. Read from XML
        See Also:
        Constant Field Values
      • DYFI_MAX_MMI_ATTRIBUTE

        public static final java.lang.String DYFI_MAX_MMI_ATTRIBUTE
        Attribute for max intensity. Read from XML
        See Also:
        Constant Field Values
      • DYFI_NUM_RESP_PROPERTY

        public static final java.lang.String DYFI_NUM_RESP_PROPERTY
        Internally set number of responses property
        See Also:
        Constant Field Values
      • DYFI_MAX_MMI_PROPERTY

        public static final java.lang.String DYFI_MAX_MMI_PROPERTY
        Internally set max intensity property
        See Also:
        Constant Field Values
    • Constructor Detail

      • 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 Detail

      • 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​(java.lang.String numResponses)
                             throws java.lang.NumberFormatException
        Set the number of felt reports submitted for this event.
        Parameters:
        numResponses - The new number of submitted felt reports.
        Throws:
        java.lang.NumberFormatException - If the given numResponses could not be parsed into an integer.
      • getMaxMMI

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

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