Package gov.usgs.earthquake.shakemap
Class ShakeMap
- java.lang.Object
-
- gov.usgs.earthquake.product.Product
-
- gov.usgs.earthquake.shakemap.ShakeMap
-
public class ShakeMap extends Product
ShakeMap object to add additional Product properties based on contents. This subclass of Product provides access to additional ShakeMap-specific attributes and loads these attributes, as well as additional Product attributes from ShakeMap source XML files.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACTUALMap type - actualstatic java.lang.StringEVENT_DESCRIPTION_PROPERTYProperty for event descriptionstatic java.lang.StringEVENT_TYPE_PROPERTYProperty for event typestatic java.lang.StringGRID_XML_ATTACHMENTReferences to file content in the Productstatic java.lang.StringINFO_XML_ATTACHMENTReferences to file content in the Productstatic java.lang.StringINVISIBLE_ATTACHMENTInvisible attachmentstatic java.lang.StringMAP_STATUS_PROPERTYProperty for map statusstatic java.lang.StringMAXIMUM_LATITUDE_PROPERTYProperty for max latitudestatic java.lang.StringMAXIMUM_LONGITUDE_PROPERTYProperty for max longitudestatic java.lang.StringMAXIMUM_MMI_INFO_KEYkey in info.xml for maximum mmistatic java.lang.StringMAXIMUM_MMI_PROPERTYProperty for max MMIstatic java.lang.StringMINIMUM_LATITUDE_PROPERTYProperty for min latitudestatic java.lang.StringMINIMUM_LONGITUDE_PROPERTYProperty for min longitudestatic java.lang.StringPROCESS_TIMESTAMP_PROPERTYProperty for process timestampstatic java.lang.StringSCENARIOMap type - scenariostatic java.lang.StringSCENARIO_ID_SUFFIXA suffix added to all event codes for scenariosstatic java.lang.StringTESTMap type - test-
Fields 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.math.BigDecimalgetBigDecimal(java.lang.String value)Returns String value as BigDecimaljava.lang.StringgetEventDescription()java.lang.StringgetEventType()java.lang.StringgetMapStatus()java.math.BigDecimalgetMaximumLatitude()java.math.BigDecimalgetMaximumLongitude()java.math.BigDecimalgetMinimumLatitude()java.math.BigDecimalgetMinimumLongitude()java.util.DategetProcessTimestamp()protected java.lang.StringgetString(java.math.BigDecimal value)Returns BigDecimal value as StringvoidsetEventDescription(java.lang.String eventDescription)voidsetEventType(java.lang.String eventType)voidsetGridXMLProperties(java.util.HashMap<java.lang.String,java.lang.String> gridXML)voidsetInfoXMLProperties(java.util.HashMap<java.lang.String,java.lang.String> infoXML)voidsetMapStatus(java.lang.String mapStatus)voidsetMaximumLatitude(java.math.BigDecimal maximumLatitude)voidsetMaximumLongitude(java.math.BigDecimal maximumLongitude)voidsetMinimumLatitude(java.math.BigDecimal minimumLatitude)voidsetMinimumLongitude(java.math.BigDecimal minimumLongitude)voidsetProcessTimestamp(java.util.Date processTimestamp)booleanvalueIsEmpty(java.lang.String productValue, java.lang.String xmlValue)-
Methods inherited from class gov.usgs.earthquake.product.Product
addLink, getContents, getDepth, getEventId, getEventSource, getEventSourceCode, getEventTime, getId, getLatitude, getLinks, getLongitude, getMagnitude, getProperties, getSignature, getSignatureVersion, getStatus, getTrackerURL, getVersion, isDeleted, setContents, setDepth, setEventId, setEventSource, setEventSourceCode, setEventTime, setId, setLatitude, setLinks, setLongitude, setMagnitude, setProperties, setSignature, setSignatureVersion, setStatus, setTrackerURL, setVersion, sign, sign, verifySignature, verifySignature, verifySignatureKey
-
-
-
-
Field Detail
-
EVENT_DESCRIPTION_PROPERTY
public static final java.lang.String EVENT_DESCRIPTION_PROPERTY
Property for event description- See Also:
- Constant Field Values
-
EVENT_TYPE_PROPERTY
public static final java.lang.String EVENT_TYPE_PROPERTY
Property for event type- See Also:
- Constant Field Values
-
MAP_STATUS_PROPERTY
public static final java.lang.String MAP_STATUS_PROPERTY
Property for map status- See Also:
- Constant Field Values
-
MAXIMUM_LATITUDE_PROPERTY
public static final java.lang.String MAXIMUM_LATITUDE_PROPERTY
Property for max latitude- See Also:
- Constant Field Values
-
MAXIMUM_LONGITUDE_PROPERTY
public static final java.lang.String MAXIMUM_LONGITUDE_PROPERTY
Property for max longitude- See Also:
- Constant Field Values
-
MINIMUM_LATITUDE_PROPERTY
public static final java.lang.String MINIMUM_LATITUDE_PROPERTY
Property for min latitude- See Also:
- Constant Field Values
-
MINIMUM_LONGITUDE_PROPERTY
public static final java.lang.String MINIMUM_LONGITUDE_PROPERTY
Property for min longitude- See Also:
- Constant Field Values
-
PROCESS_TIMESTAMP_PROPERTY
public static final java.lang.String PROCESS_TIMESTAMP_PROPERTY
Property for process timestamp- See Also:
- Constant Field Values
-
GRID_XML_ATTACHMENT
public static final java.lang.String GRID_XML_ATTACHMENT
References to file content in the Product- See Also:
- Constant Field Values
-
INFO_XML_ATTACHMENT
public static final java.lang.String INFO_XML_ATTACHMENT
References to file content in the Product- See Also:
- Constant Field Values
-
INVISIBLE_ATTACHMENT
public static final java.lang.String INVISIBLE_ATTACHMENT
Invisible attachment- See Also:
- Constant Field Values
-
SCENARIO_ID_SUFFIX
public static final java.lang.String SCENARIO_ID_SUFFIX
A suffix added to all event codes for scenarios- See Also:
- Constant Field Values
-
ACTUAL
public static final java.lang.String ACTUAL
Map type - actual- See Also:
- Constant Field Values
-
SCENARIO
public static final java.lang.String SCENARIO
Map type - scenario- See Also:
- Constant Field Values
-
TEST
public static final java.lang.String TEST
Map type - test- See Also:
- Constant Field Values
-
MAXIMUM_MMI_INFO_KEY
public static final java.lang.String MAXIMUM_MMI_INFO_KEY
key in info.xml for maximum mmi- See Also:
- Constant Field Values
-
MAXIMUM_MMI_PROPERTY
public static final java.lang.String MAXIMUM_MMI_PROPERTY
Property for max MMI- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ShakeMap
public ShakeMap(Product product)
- Parameters:
product- the base product to be converted to a ShakeMap product
-
-
Method Detail
-
setGridXMLProperties
public void setGridXMLProperties(java.util.HashMap<java.lang.String,java.lang.String> gridXML)
- Parameters:
gridXML- shakemap properties hash keyed by grid.xml attribute name
-
setInfoXMLProperties
public void setInfoXMLProperties(java.util.HashMap<java.lang.String,java.lang.String> infoXML)
- Parameters:
infoXML- shakemap properties hash keyed by info.xml attribute name
-
valueIsEmpty
public boolean valueIsEmpty(java.lang.String productValue, java.lang.String xmlValue)- Parameters:
productValue- the value from the PDL objectxmlValue- the value from the XML document- Returns:
- if the shakemap property is already set
-
setMapStatus
public void setMapStatus(java.lang.String mapStatus)
- Parameters:
mapStatus- the map status to set
-
getMapStatus
public java.lang.String getMapStatus()
- Returns:
- the status of this map
-
setEventType
public void setEventType(java.lang.String eventType)
- Parameters:
eventType- the event type to set
-
getEventType
public java.lang.String getEventType()
- Returns:
- the event type of this product as defined in ShakeMap
-
setProcessTimestamp
public void setProcessTimestamp(java.util.Date processTimestamp)
- Parameters:
processTimestamp- the process timestamp to set
-
getProcessTimestamp
public java.util.Date getProcessTimestamp()
- Returns:
- the process timestamp of this ShakeMap
-
getEventDescription
public java.lang.String getEventDescription()
- Returns:
- the event description text for this ShakeMap
-
setEventDescription
public void setEventDescription(java.lang.String eventDescription)
- Parameters:
eventDescription- the event description to set
-
getMinimumLongitude
public java.math.BigDecimal getMinimumLongitude()
- Returns:
- the minimum longitude boundary of this ShakeMap
-
setMinimumLongitude
public void setMinimumLongitude(java.math.BigDecimal minimumLongitude)
- Parameters:
minimumLongitude- the minimum longitude to set
-
getMaximumLongitude
public java.math.BigDecimal getMaximumLongitude()
- Returns:
- the maximum longitude boundary of this ShakeMap
-
setMaximumLongitude
public void setMaximumLongitude(java.math.BigDecimal maximumLongitude)
- Parameters:
maximumLongitude- the maximum longitude to set
-
getMinimumLatitude
public java.math.BigDecimal getMinimumLatitude()
- Returns:
- the minimum latitude boundary of this ShakeMap
-
setMinimumLatitude
public void setMinimumLatitude(java.math.BigDecimal minimumLatitude)
- Parameters:
minimumLatitude- the minimum latitude to set
-
getMaximumLatitude
public java.math.BigDecimal getMaximumLatitude()
- Returns:
- the maximum latitude boundary of this ShakeMap
-
setMaximumLatitude
public void setMaximumLatitude(java.math.BigDecimal maximumLatitude)
- Parameters:
maximumLatitude- the maximum latitude to set
-
getBigDecimal
protected java.math.BigDecimal getBigDecimal(java.lang.String value)
Returns String value as BigDecimal- Parameters:
value- to return as BigDecimal- Returns:
- a BigDecimal
-
getString
protected java.lang.String getString(java.math.BigDecimal value)
Returns BigDecimal value as String- Parameters:
value- a BigDecimal- Returns:
- a string
-
-