Package gov.usgs.earthquake.shakemap
Class ShakeMapIndexerModule
- java.lang.Object
-
- gov.usgs.util.DefaultConfigurable
-
- gov.usgs.earthquake.indexer.DefaultIndexerModule
-
- gov.usgs.earthquake.shakemap.ShakeMapIndexerModule
-
- All Implemented Interfaces:
IndexerModule
,Configurable
public class ShakeMapIndexerModule extends DefaultIndexerModule
ShakeMap Indexer Module. Provides a higher and more specific level of support for ShakeMap products, including reading additional product information out of the ShakeMap content files provided with the Product and placing it into the ProductSummary for the Product itself.
-
-
Field Summary
Fields Modifier and Type Field Description static int
CENTERED_ON_EPICENTER_WEIGHT
CENTERED_ON_EPICENTER_WEIGHTstatic int
CONTAINS_EPICENTER_WEIGHT
CONTAINS_EPICENTER_WEIGHTstatic double
MAX_DELTA_DEGREES
Number of degrees at which no additional weight will be assigned based on the proximity of the map center to the epicenter.static java.lang.String
OVERLAY_HEIGHT_PROPERTY
Property for overlay heightstatic java.lang.String
OVERLAY_IMAGE_PATH
Path to overlay imgstatic java.lang.String
OVERLAY_WIDTH_PROPERTY
Property for overlay widthstatic java.lang.String
SHAKEMAP_ATLAS_SOURCE
ShakeMap atlas is the most preferred ShakeMap contributorstatic int
SHAKEMAP_ATLAS_WEIGHT
Atlas weight-
Fields inherited from class gov.usgs.earthquake.indexer.DefaultIndexerModule
ANSS_CONTRIBUTOR_WEIGHT, AUTHORITATIVE_EVENT_WEIGHT, AUTHORITATIVE_WEIGHT, DEFAULT_PREFERRED_WEIGHT, IGNORE_REGIONS_PROPERTY, NEIC_CONTRIBUTOR_WEIGHT, SAME_SOURCE_WEIGHT
-
Fields inherited from interface gov.usgs.earthquake.indexer.IndexerModule
LEVEL_DEFAULT, LEVEL_SUPPORTED, LEVEL_UNSUPPORTED
-
-
Constructor Summary
Constructors Constructor Description ShakeMapIndexerModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
getPreferredWeight(ProductSummary summary)
Calculate the preferred weight for a product summary.ProductSummary
getProductSummary(Product product)
Create a ProductSummary from a Product.int
getSupportLevel(Product product)
This module provides a default level of support for any type of product.-
Methods inherited from class gov.usgs.earthquake.indexer.DefaultIndexerModule
configure, getBaseProductType, getIgnoreRegions, getSignatureVerifier, setSignatureVerifier
-
Methods inherited from class gov.usgs.util.DefaultConfigurable
getName, setName, shutdown, startup
-
-
-
-
Field Detail
-
OVERLAY_IMAGE_PATH
public static final java.lang.String OVERLAY_IMAGE_PATH
Path to overlay img- See Also:
- Constant Field Values
-
OVERLAY_WIDTH_PROPERTY
public static final java.lang.String OVERLAY_WIDTH_PROPERTY
Property for overlay width- See Also:
- Constant Field Values
-
OVERLAY_HEIGHT_PROPERTY
public static final java.lang.String OVERLAY_HEIGHT_PROPERTY
Property for overlay height- See Also:
- Constant Field Values
-
CONTAINS_EPICENTER_WEIGHT
public static final int CONTAINS_EPICENTER_WEIGHT
CONTAINS_EPICENTER_WEIGHT- See Also:
- Constant Field Values
-
CENTERED_ON_EPICENTER_WEIGHT
public static final int CENTERED_ON_EPICENTER_WEIGHT
CENTERED_ON_EPICENTER_WEIGHT- See Also:
- Constant Field Values
-
MAX_DELTA_DEGREES
public static final double MAX_DELTA_DEGREES
Number of degrees at which no additional weight will be assigned based on the proximity of the map center to the epicenter.- See Also:
- Constant Field Values
-
SHAKEMAP_ATLAS_SOURCE
public static final java.lang.String SHAKEMAP_ATLAS_SOURCE
ShakeMap atlas is the most preferred ShakeMap contributor- See Also:
- Constant Field Values
-
SHAKEMAP_ATLAS_WEIGHT
public static final int SHAKEMAP_ATLAS_WEIGHT
Atlas weight- See Also:
- Constant Field Values
-
-
Method Detail
-
getSupportLevel
public int getSupportLevel(Product product)
Description copied from class:DefaultIndexerModule
This module provides a default level of support for any type of product.- Specified by:
getSupportLevel
in interfaceIndexerModule
- Overrides:
getSupportLevel
in classDefaultIndexerModule
- Parameters:
product
- the product to test.- Returns:
- IndexerModule.LEVEL_DEFAULT.
-
getProductSummary
public ProductSummary getProductSummary(Product product) throws java.lang.Exception
Description copied from class:DefaultIndexerModule
Create a ProductSummary from a Product. Uses the ProductSummary(Product) constructor, which copies product information. Checks whether product is within its authoritative region, and if so boosts preferredWeight by AUTHORITATIVE_WEIGHT.- Specified by:
getProductSummary
in interfaceIndexerModule
- Overrides:
getProductSummary
in classDefaultIndexerModule
- Parameters:
product
- the product to summarize.- Returns:
- ProductSummary for Product object.
- Throws:
java.lang.Exception
- if error occurs
-
getPreferredWeight
protected long getPreferredWeight(ProductSummary summary) throws java.lang.Exception
Description copied from class:DefaultIndexerModule
Calculate the preferred weight for a product summary. This method is called after creating a product summary, but before returning the created summary. It's return value is used to assign the product summary preferred weight. Within each type of product, the summary with the largest preferred weight is considered preferred.- Overrides:
getPreferredWeight
in classDefaultIndexerModule
- Parameters:
summary
- the summary to calculate a preferred weight.- Returns:
- the absolute preferred weight.
- Throws:
java.lang.Exception
- if error occurs
-
-