Package edu.ucsb.nceas.metacat.spatial
Class SpatialHarvester
java.lang.Object
edu.ucsb.nceas.metacat.spatial.SpatialHarvester
Harvests spatial data from metacat database
and saves to persistent cache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToDeleteQue
(String docid) Delete a given document from spatial cache.void
addToUpdateQue
(String docid) Currently just a wrapper around the harvestDocument method.void
deleteDocument
(String docid) Given a docid, will attempt to delete it from spatial cachevoid
destroy()
Closes the database connection.void
harvestDocument
(String docid) Given a new or updated docid, will update the spatial cache accordingly.Returns a Vector of all the current versions of public docidsvoid
Completely regenerates the spatial cache.
-
Constructor Details
-
SpatialHarvester
public SpatialHarvester()constructor to initialize db connection
-
-
Method Details
-
destroy
public void destroy()Closes the database connection. Should be called after you're done with the SpatialHarvester -
queryAllDocids
Returns a Vector of all the current versions of public docids -
addToUpdateQue
Currently just a wrapper around the harvestDocument method. Eventually we can use this method as a timed que like the indexing process.- Parameters:
docid
- The docid to be added to the spatial cache.
-
addToDeleteQue
Delete a given document from spatial cache. Just a wrapper around deleteDocument method for now.- Parameters:
docid
- The docid to be deleted from the spatial cache.
-
deleteDocument
Given a docid, will attempt to delete it from spatial cache- Parameters:
docid
- The docid to be deleted from the spatial cache.
-
harvestDocument
Given a new or updated docid, will update the spatial cache accordingly.- Parameters:
docid
- The docid to be updated or inserted into the spatial cache.
-
regenerate
Completely regenerates the spatial cache. This can take a long time, especially with lots of documents.- Throws:
IOException
-