Class 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 Details

    • OVERLAY_IMAGE_PATH

      public static final String OVERLAY_IMAGE_PATH
      Path to overlay img
      See Also:
    • OVERLAY_WIDTH_PROPERTY

      public static final String OVERLAY_WIDTH_PROPERTY
      Property for overlay width
      See Also:
    • OVERLAY_HEIGHT_PROPERTY

      public static final String OVERLAY_HEIGHT_PROPERTY
      Property for overlay height
      See Also:
    • CONTAINS_EPICENTER_WEIGHT

      public static final int CONTAINS_EPICENTER_WEIGHT
      CONTAINS_EPICENTER_WEIGHT
      See Also:
    • CENTERED_ON_EPICENTER_WEIGHT

      public static final int CENTERED_ON_EPICENTER_WEIGHT
      CENTERED_ON_EPICENTER_WEIGHT
      See Also:
    • 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:
    • SHAKEMAP_ATLAS_SOURCE

      public static final String SHAKEMAP_ATLAS_SOURCE
      ShakeMap atlas is the most preferred ShakeMap contributor
      See Also:
    • SHAKEMAP_ATLAS_WEIGHT

      public static final int SHAKEMAP_ATLAS_WEIGHT
      Atlas weight
      See Also:
  • Constructor Details

    • ShakeMapIndexerModule

      public ShakeMapIndexerModule()
  • Method Details

    • 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 interface IndexerModule
      Overrides:
      getSupportLevel in class DefaultIndexerModule
      Parameters:
      product - the product to test.
      Returns:
      IndexerModule.LEVEL_DEFAULT.
    • getProductSummary

      public ProductSummary getProductSummary(Product product) throws 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 interface IndexerModule
      Overrides:
      getProductSummary in class DefaultIndexerModule
      Parameters:
      product - the product to summarize.
      Returns:
      ProductSummary for Product object.
      Throws:
      Exception - if error occurs
    • getPreferredWeight

      protected long getPreferredWeight(ProductSummary summary) throws 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 class DefaultIndexerModule
      Parameters:
      summary - the summary to calculate a preferred weight.
      Returns:
      the absolute preferred weight.
      Throws:
      Exception - if error occurs