Class SpatialHarvester


public class SpatialHarvester extends Object
Harvests spatial data from metacat database and saves to persistent 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

      protected Vector<String> queryAllDocids()
      Returns a Vector of all the current versions of public docids
    • addToUpdateQue

      public void addToUpdateQue(String docid)
      Currently just a wrapper around the harvestDocument method. Eventually we can use this method as a timed que like the indexing process.
      docid - The docid to be added to the spatial cache.
    • addToDeleteQue

      public void addToDeleteQue(String docid)
      Delete a given document from spatial cache. Just a wrapper around deleteDocument method for now.
      docid - The docid to be deleted from the spatial cache.
    • deleteDocument

      public void deleteDocument(String docid)
      Given a docid, will attempt to delete it from spatial cache
      docid - The docid to be deleted from the spatial cache.
    • harvestDocument

      public void harvestDocument(String docid)
      Given a new or updated docid, will update the spatial cache accordingly.
      docid - The docid to be updated or inserted into the spatial cache.
    • regenerate

      public void regenerate() throws IOException
      Completely regenerates the spatial cache. This can take a long time, especially with lots of documents.