Package gov.usgs.earthquake.indexer
Interface IndexerModule
-
- All Known Implementing Classes:
DefaultIndexerModule,DYFIIndexerModule,MTIndexerModule,OriginIndexerModule,ShakeMapIndexerModule,TectonicSummaryIndexerModule
public interface IndexerModuleAn IndexerModule provides product specific functionality for the Indexer.
-
-
Field Summary
Fields Modifier and Type Field Description static intLEVEL_DEFAULTA constant used by the default module for every type of product.static intLEVEL_SUPPORTEDA constant to indicate better than default support for a product.static intLEVEL_UNSUPPORTEDA constant to indicate a module does not support a product.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProductSummarygetProductSummary(Product product)Summarize a product.intgetSupportLevel(Product product)Determine the support level for a given product.
-
-
-
Field Detail
-
LEVEL_UNSUPPORTED
static final int LEVEL_UNSUPPORTED
A constant to indicate a module does not support a product.- See Also:
- Constant Field Values
-
LEVEL_DEFAULT
static final int LEVEL_DEFAULT
A constant used by the default module for every type of product.- See Also:
- Constant Field Values
-
LEVEL_SUPPORTED
static final int LEVEL_SUPPORTED
A constant to indicate better than default support for a product.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSupportLevel
int getSupportLevel(Product product)
Determine the support level for a given product. The Indexer uses this method to determine which module will be used to summarize a product as it is being processed. Usually, returning one of the LEVEL_ constants will be sufficient.- Parameters:
product- The product to get the support level at- Returns:
- the support level. Should be greater than 0 if a product is supported, larger values indicate better support.
-
getProductSummary
ProductSummary getProductSummary(Product product) throws java.lang.Exception
Summarize a product.- Parameters:
product- the product to summarize- Returns:
- the ProductSummary
- Throws:
java.lang.Exception- if error occurs
-
-