gov.nasa.pds.harvest
Class Harvester

java.lang.Object
  extended by gov.nasa.pds.harvest.Harvester

public class Harvester
extends Object

Front end class to the Harvest tool.

Author:
mcayanan

Constructor Summary
Harvester(String registryUrl, Candidate candidates)
          Constructor.
 
Method Summary
 void harvest(Target target)
          Harvests the products in the given target.
 void harvest(Target target, List<String> fileFilters)
          Harvests the products in the given file..
 void setDaemonPort(int port)
          Sets the daemon port.
 void setDoValidation(boolean value)
          Set the flag to perform validation while crawling.
 void setSecuredUser(SecuredUser user)
          Sets the security for the Harvest tool.
 void setWaitInterval(int interval)
          Sets the wait interval in seconds in between crawls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Harvester

public Harvester(String registryUrl,
                 Candidate candidates)
Constructor.

Parameters:
registryUrl - The registry location.
candidates - Class containing the products to look for and what metadata to extract.
Method Detail

setSecuredUser

public void setSecuredUser(SecuredUser user)
Sets the security for the Harvest tool.

Parameters:
user - An authorized user.

setDoValidation

public void setDoValidation(boolean value)
Set the flag to perform validation while crawling. Set to true by default.

Parameters:
value - A boolean value.

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(Target target)
             throws MalformedURLException,
                    ParserConfigurationException,
                    RegistryClientException
Harvests the products in the given target.

Parameters:
target - A target file (directory, collection, or bundle).
Throws:
ParserConfigurationException - If an error occurred during metadata extraction.
MalformedURLException - If an error occurred while setting the registry URL to the crawler.
RegistryClientException

harvest

public void harvest(Target target,
                    List<String> fileFilters)
             throws ParserConfigurationException,
                    MalformedURLException,
                    RegistryClientException
Harvests the products in the given file..

Parameters:
target - A target file (directory, collection, or bundle).
fileFilters - Specify a list of file filters to search for specific files in a target directory.
Throws:
ParserConfigurationException - If an error occurred during metadata extraction.
MalformedURLException - If an error occurred while setting the registry URL to the crawler.
RegistryClientException


Copyright © 2010-2011 Planetary Data System. All Rights Reserved.