Class HarvesterSearch


  • public class HarvesterSearch
    extends Object
    Front end class to the Harvest tool.
    Author:
    mcayanan
    • Constructor Detail

      • HarvesterSearch

        public HarvesterSearch​(String searchUrl,
                               File configDir,
                               File outputDir,
                               File resources)
                        throws Exception
        Constructor.
        Parameters:
        searchUrl - The search service location.
        configDir - Top level directory to the Search Core configuration files.
        outputDir - Directory location of the generated Solr documents.
        resources - JSON file used as a lookup table for populating resources.
        Throws:
        Exception
    • Method Detail

      • setDaemonPort

        public void setDaemonPort​(int port)
        Sets the daemon port.
        Parameters:
        port - The port number to use.
      • setWaitInterval

        public void setWaitInterval​(int interval)
        Sets the wait interval in seconds in between crawls.
        Parameters:
        interval - The wait interval in seconds.
      • harvest

        public void harvest​(Policy policy)
                     throws IOException,
                            org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException,
                            gov.nasa.pds.search.core.exception.SearchCoreException,
                            gov.nasa.pds.search.core.exception.SearchCoreFatalException
        Harvest the products specified in the given policy.
        Parameters:
        policy - An object representation of the configuration file that specifies what to harvest.
        Throws:
        org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException
        IOException
        gov.nasa.pds.search.core.exception.SearchCoreFatalException
        gov.nasa.pds.search.core.exception.SearchCoreException