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.
Harvester(String registryURL, Candidate candidates, SecuredUser user)
          Constructor.
 
Method Summary
 void harvest(File directory, List<String> filePatterns)
          Harvests the products in the given directory.
 void harvestBundle(File bundle)
          Harvests the products given in the PDS4 Inventory file.
 void harvestCollection(File collection)
          Harvests the products given in the PDS4 Inventory file.
 
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)
          throws MalformedURLException
Constructor.

Parameters:
registryURL - The registry location.
candidates - Class containing the products to look for and what metadata to extract.
Throws:
MalformedURLException

Harvester

public Harvester(String registryURL,
                 Candidate candidates,
                 SecuredUser user)
          throws MalformedURLException
Constructor.

Parameters:
registryURL - The registry location.
candidates - Class containing the products to look for and what metadata to extract.
user - If security is enabled in the registry, this parameter authenticates the user running the tool.
Throws:
MalformedURLException
Method Detail

harvest

public void harvest(File directory,
                    List<String> filePatterns)
Harvests the products in the given directory.

Parameters:
directory - A starting directory.
filePatterns - Specify file patterns to search for while crawling the directories.

harvestBundle

public void harvestBundle(File bundle)
                   throws InventoryReaderException
Harvests the products given in the PDS4 Inventory file. This method will first register the given Inventory file, then proceed to crawl the file for references to PDS4 data products.

Parameters:
bundle - a PDS4 bundle file
Throws:
InventoryReaderException

harvestCollection

public void harvestCollection(File collection)
                       throws InventoryReaderException
Harvests the products given in the PDS4 Inventory file. This method will first register the given Inventory file, then proceed to crawl the file for references to PDS4 data products.

Parameters:
collection - a PDS4 collection file
Throws:
InventoryReaderException


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