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, String registryPackageGuid)
          Constructor.
 
Method Summary
 void harvest(Policy policy)
          Harvest the products specified in the given policy.
 void setDaemonPort(int port)
          Sets the daemon port.
 void setSecurity(SecurityContext securityContext, String username, String password)
          Sets the security.
 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,
                 String registryPackageGuid)
          throws RegistryClientException,
                 MalformedURLException
Constructor.

Parameters:
registryUrl - The registry location.
registryPackageGuid - The GUID of the registry package to associate to all the products being registered during a single Harvest run.
Throws:
MalformedURLException
RegistryClientException
Method Detail

setSecurity

public void setSecurity(SecurityContext securityContext,
                        String username,
                        String password)
                 throws MalformedURLException
Sets the security.

Parameters:
securityContext - An object containing the keystore information.
username - Username of an authorized user.
password - Password associated with the given username.
Throws:
MalformedURLException

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 org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException,
                    IOException
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


Copyright © 2010–2015 Planetary Data System. All rights reserved.