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.String
ACTUAL
Map type - actualstatic java.lang.String
EVENT_DESCRIPTION_PROPERTY
Property for event descriptionstatic java.lang.String
EVENT_TYPE_PROPERTY
Property for event typestatic java.lang.String
GRID_XML_ATTACHMENT
References to file content in the Productstatic java.lang.String
INFO_XML_ATTACHMENT
References to file content in the Productstatic java.lang.String
INVISIBLE_ATTACHMENT
Invisible attachmentstatic java.lang.String
MAP_STATUS_PROPERTY
Property for map statusstatic java.lang.String
MAXIMUM_LATITUDE_PROPERTY
Property for max latitudestatic java.lang.String
MAXIMUM_LONGITUDE_PROPERTY
Property for max longitudestatic java.lang.String
MAXIMUM_MMI_INFO_KEY
key in info.xml for maximum mmistatic java.lang.String
MAXIMUM_MMI_PROPERTY
Property for max MMIstatic java.lang.String
MINIMUM_LATITUDE_PROPERTY
Property for min latitudestatic java.lang.String
MINIMUM_LONGITUDE_PROPERTY
Property for min longitudestatic java.lang.String
PROCESS_TIMESTAMP_PROPERTY
Property for process timestampstatic java.lang.String
SCENARIO
Map type - scenariostatic java.lang.String
SCENARIO_ID_SUFFIX
A suffix added to all event codes for scenariosstatic java.lang.String
TEST
Map 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.BigDecimal
getBigDecimal(java.lang.String value)
Returns String value as BigDecimaljava.lang.String
getEventDescription()
java.lang.String
getEventType()
java.lang.String
getMapStatus()
java.math.BigDecimal
getMaximumLatitude()
java.math.BigDecimal
getMaximumLongitude()
java.math.BigDecimal
getMinimumLatitude()
java.math.BigDecimal
getMinimumLongitude()
java.util.Date
getProcessTimestamp()
protected java.lang.String
getString(java.math.BigDecimal value)
Returns BigDecimal value as Stringvoid
setEventDescription(java.lang.String eventDescription)
void
setEventType(java.lang.String eventType)
void
setGridXMLProperties(java.util.HashMap<java.lang.String,java.lang.String> gridXML)
void
setInfoXMLProperties(java.util.HashMap<java.lang.String,java.lang.String> infoXML)
void
setMapStatus(java.lang.String mapStatus)
void
setMaximumLatitude(java.math.BigDecimal maximumLatitude)
void
setMaximumLongitude(java.math.BigDecimal maximumLongitude)
void
setMinimumLatitude(java.math.BigDecimal minimumLatitude)
void
setMinimumLongitude(java.math.BigDecimal minimumLongitude)
void
setProcessTimestamp(java.util.Date processTimestamp)
boolean
valueIsEmpty(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
-
-