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 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
    • Constructor Detail

      • ShakeMapIndexerModule

        public ShakeMapIndexerModule()
    • Method Detail

      • 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 interface IndexerModule
        Overrides:
        getProductSummary in class DefaultIndexerModule
        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 class DefaultIndexerModule
        Parameters:
        summary - the summary to calculate a preferred weight.
        Returns:
        the absolute preferred weight.
        Throws:
        java.lang.Exception - if error occurs