gov.nasa.pds.harvest.crawler.actions
Class FileObjectRegistrationAction

java.lang.Object
  extended by gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
      extended by gov.nasa.pds.harvest.crawler.actions.FileObjectRegistrationAction
All Implemented Interfaces:
gov.nasa.jpl.oodt.cas.commons.spring.SpringSetIdInjectionType

public class FileObjectRegistrationAction
extends gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction

Class to register file objects.

Author:
mcayanan

Field Summary
 
Fields inherited from class gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
LOG, phases
 
Constructor Summary
FileObjectRegistrationAction(String registryUrl, RegistryIngester ingester)
          Constructor.
 
Method Summary
 boolean performAction(File product, gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
          Perform the action to register the file products.
 void setActions(List<gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction> actions)
          Sets a list of crawler actions to perform before file object registration.
 void setChecksumManifest(Map<File,String> manifest)
          Set the map to represent the checksum manifest file.
 void setFileTypes(FileTypes fileTypes)
          Set the file type mapping.
 void setGenerateChecksums(boolean value)
          Set the flag for checksum generation.
 
Methods inherited from class gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
getDescription, getId, getPhases, setDescription, setId, setPhases
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileObjectRegistrationAction

public FileObjectRegistrationAction(String registryUrl,
                                    RegistryIngester ingester)
Constructor.

Parameters:
registryUrl - url of the registry.
ingester - The RegistryIngester.
Throws:
gov.nasa.pds.registry.exception.RegistryClientException
Method Detail

performAction

public boolean performAction(File product,
                             gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
                      throws gov.nasa.jpl.oodt.cas.crawl.structs.exceptions.CrawlerActionException
Perform the action to register the file products.

Specified by:
performAction in class gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
Parameters:
product - The file.
metadata - The metadata associated with the file.
Returns:
Always returns true.
Throws:
gov.nasa.jpl.oodt.cas.crawl.structs.exceptions.CrawlerActionException - If an error occurred while processing the file objects.

setActions

public void setActions(List<gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction> actions)
Sets a list of crawler actions to perform before file object registration.

Parameters:
actions - A list of crawler actions.

setGenerateChecksums

public void setGenerateChecksums(boolean value)
Set the flag for checksum generation.

Parameters:
value - 'true' to turn on, 'false' to turn off.

setChecksumManifest

public void setChecksumManifest(Map<File,String> manifest)
Set the map to represent the checksum manifest file.

Parameters:
manifest - A mapping of file objects to checksums.

setFileTypes

public void setFileTypes(FileTypes fileTypes)
Set the file type mapping.

Parameters:
fileTypes - The file type mapping.


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