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
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
FieldsModifier and TypeFieldDescriptionstatic final int
CENTERED_ON_EPICENTER_WEIGHTstatic final int
CONTAINS_EPICENTER_WEIGHTstatic final double
Number of degrees at which no additional weight will be assigned based on the proximity of the map center to the epicenter.static final String
Property for overlay heightstatic final String
Path to overlay imgstatic final String
Property for overlay widthstatic final String
ShakeMap atlas is the most preferred ShakeMap contributorstatic final int
Atlas weightFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected long
getPreferredWeight
(ProductSummary summary) Calculate the preferred weight for a product summary.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 Details
-
OVERLAY_IMAGE_PATH
Path to overlay img- See Also:
-
OVERLAY_WIDTH_PROPERTY
Property for overlay width- See Also:
-
OVERLAY_HEIGHT_PROPERTY
Property for overlay height- See Also:
-
CONTAINS_EPICENTER_WEIGHT
public static final int CONTAINS_EPICENTER_WEIGHTCONTAINS_EPICENTER_WEIGHT- See Also:
-
CENTERED_ON_EPICENTER_WEIGHT
public static final int CENTERED_ON_EPICENTER_WEIGHTCENTERED_ON_EPICENTER_WEIGHT- See Also:
-
MAX_DELTA_DEGREES
public static final double MAX_DELTA_DEGREESNumber of degrees at which no additional weight will be assigned based on the proximity of the map center to the epicenter.- See Also:
-
SHAKEMAP_ATLAS_SOURCE
ShakeMap atlas is the most preferred ShakeMap contributor- See Also:
-
SHAKEMAP_ATLAS_WEIGHT
public static final int SHAKEMAP_ATLAS_WEIGHTAtlas weight- See Also:
-
-
Constructor Details
-
ShakeMapIndexerModule
public ShakeMapIndexerModule()
-
-
Method Details
-
getSupportLevel
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
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:
Exception
- if error occurs
-
getPreferredWeight
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:
Exception
- if error occurs
-