Package gov.usgs.earthquake.indexer
Class ExtentIndex
- java.lang.Object
-
- gov.usgs.util.DefaultConfigurable
-
- gov.usgs.earthquake.util.JDBCConnection
-
- gov.usgs.earthquake.indexer.JDBCProductIndex
-
- gov.usgs.earthquake.indexer.ExtentIndex
-
- All Implemented Interfaces:
ProductIndex
,Configurable
,java.lang.AutoCloseable
public class ExtentIndex extends JDBCProductIndex
ExtentIndex is a type of JDBCProductIndex that can also send updates to the extentSummary table.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EXTENT_END_TIME
Extent end timestatic java.lang.String
EXTENT_INDEX_ID
Extent index id - productSummaryIndexIdstatic java.lang.String
EXTENT_MAX_LAT
Extent max latitudestatic java.lang.String
EXTENT_MAX_LONG
Extent max longitudestatic java.lang.String
EXTENT_MIN_LAT
Extent minimum latitudestatic java.lang.String
EXTENT_MIN_LONG
Extent min longitudestatic java.lang.String
EXTENT_START_TIME
Extent start timestatic java.lang.String
EXTENT_TABLE
Table for extentSummary-
Fields inherited from class gov.usgs.earthquake.indexer.JDBCProductIndex
JDBC_DEFAULT_FILE, SUMMARY_PRODUCT_INDEX_ID
-
-
Constructor Summary
Constructors Constructor Description ExtentIndex()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExtentSummary​(ExtentSummary product)
Inserts valid ExtentSummary products into extentSummary tablelong
getLastExtentIndexId()
Queries extentSummary table for the largest index id.-
Methods inherited from class gov.usgs.earthquake.indexer.JDBCProductIndex
addAssociation, addEvent, addProductLinks, addProductProperties, addProductSummary, buildProductClauses, buildProductQuery, buildProductQuery, configure, connect, eventsUpdated, getEvents, getProducts, getProducts, getUnassociatedProducts, hasProduct, loadProductSummaries, normalizeLongitude, normalizeLongitude, parseProductSummary, removeAssociation, removeEvent, removeProductSummaries, removeProductSummary
-
Methods inherited from class gov.usgs.earthquake.util.JDBCConnection
beginTransaction, close, commitTransaction, getConnection, getDriver, getUrl, rollbackTransaction, setDriver, setUrl, shutdown, startup, verifyConnection
-
Methods inherited from class gov.usgs.util.DefaultConfigurable
getName, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.usgs.util.Configurable
getName, setName, shutdown, startup
-
Methods inherited from interface gov.usgs.earthquake.indexer.ProductIndex
beginTransaction, commitTransaction, rollbackTransaction
-
-
-
-
Field Detail
-
EXTENT_TABLE
public static final java.lang.String EXTENT_TABLE
Table for extentSummary- See Also:
- Constant Field Values
-
EXTENT_INDEX_ID
public static final java.lang.String EXTENT_INDEX_ID
Extent index id - productSummaryIndexId- See Also:
- Constant Field Values
-
EXTENT_START_TIME
public static final java.lang.String EXTENT_START_TIME
Extent start time- See Also:
- Constant Field Values
-
EXTENT_END_TIME
public static final java.lang.String EXTENT_END_TIME
Extent end time- See Also:
- Constant Field Values
-
EXTENT_MAX_LAT
public static final java.lang.String EXTENT_MAX_LAT
Extent max latitude- See Also:
- Constant Field Values
-
EXTENT_MIN_LAT
public static final java.lang.String EXTENT_MIN_LAT
Extent minimum latitude- See Also:
- Constant Field Values
-
EXTENT_MAX_LONG
public static final java.lang.String EXTENT_MAX_LONG
Extent max longitude- See Also:
- Constant Field Values
-
EXTENT_MIN_LONG
public static final java.lang.String EXTENT_MIN_LONG
Extent min longitude- See Also:
- Constant Field Values
-
-
Method Detail
-
getLastExtentIndexId
public long getLastExtentIndexId() throws java.lang.Exception
Queries extentSummary table for the largest index id.- Returns:
- long last extent index id
- Throws:
java.lang.Exception
- if something goes wrong with database transaction
-
addExtentSummary
public void addExtentSummary​(ExtentSummary product) throws java.lang.Exception
Inserts valid ExtentSummary products into extentSummary table- Parameters:
product
- the product to be added- Throws:
java.lang.Exception
- if something goes wrong with the database transaction
-
-