gov.nasa.pds.harvest.crawler
Class PDS3FileCrawler

java.lang.Object
  extended by gov.nasa.jpl.oodt.cas.crawl.config.ProductCrawlerBean
      extended by gov.nasa.jpl.oodt.cas.crawl.ProductCrawler
          extended by gov.nasa.pds.harvest.crawler.PDSProductCrawler
              extended by gov.nasa.pds.harvest.crawler.PDS3ProductCrawler
                  extended by gov.nasa.pds.harvest.crawler.PDS3FileCrawler
All Implemented Interfaces:
gov.nasa.jpl.oodt.cas.commons.spring.SpringSetIdInjectionType, gov.nasa.jpl.oodt.cas.filemgr.metadata.CoreMetKeys

public class PDS3FileCrawler
extends PDS3ProductCrawler

Crawler class intended to be used for registering PDS3 files as Product_File_Repository products.

Author:
mcayanan

Field Summary
 
Fields inherited from class gov.nasa.pds.harvest.crawler.PDSProductCrawler
inPersistanceMode, touchedFiles
 
Fields inherited from class gov.nasa.jpl.oodt.cas.crawl.ProductCrawler
DIR_FILTER, FILE_FILTER, LOG
 
Fields inherited from class gov.nasa.jpl.oodt.cas.crawl.config.ProductCrawlerBean
MIME_TYPES_HIERARCHY
 
Fields inherited from interface gov.nasa.jpl.oodt.cas.filemgr.metadata.CoreMetKeys
FILE_LOCATION, FILENAME, MIME_TYPE, PRODUCT_ID, PRODUCT_NAME, PRODUCT_RECEVIED_TIME, PRODUCT_STRUCTURE, PRODUCT_TYPE
 
Constructor Summary
PDS3FileCrawler()
           
 
Method Summary
protected  gov.nasa.jpl.oodt.cas.metadata.Metadata getMetadataForProduct(File product)
          Extracts metadata from the given product.
protected  boolean passesPreconditions(File product)
          Determines whether the supplied file passes the necessary pre-conditions for the file to be registered.
 void setChecksumManifest(Map<File,String> manifest)
          Set the map to represent the checksum manifest file.
 void setFileFilter(FileFilter filter)
          Sets the file filter for the crawler.
 void setGenerateChecksums(boolean value)
          Set the flag for checksum generation.
 
Methods inherited from class gov.nasa.pds.harvest.crawler.PDS3ProductCrawler
getPDS3MetExtractorConfig, setPDS3MetExtractorConfig
 
Methods inherited from class gov.nasa.pds.harvest.crawler.PDSProductCrawler
addAction, addActions, addKnownMetadata, crawl, getActions, getMetExtractorConfig, getRegistryIngester, getRegistryUrl, setDirectoryFilter, setInPersistanceMode, setMetExtractorConfig, setProperties, setRegistryUrl
 
Methods inherited from class gov.nasa.jpl.oodt.cas.crawl.ProductCrawler
clearIngestStatus, crawl, getIngestStatus, handleFile, setActionRepo
 
Methods inherited from class gov.nasa.jpl.oodt.cas.crawl.config.ProductCrawlerBean
addRequiredMetadata, getActionIds, getApplicationContext, getDaemonPort, getDaemonWait, getFilemgrUrl, getGlobalMetadata, getId, getIngester, getProductPath, getRequiredMetadata, isCrawlForDirs, isNoRecur, isSkipIngest, setActionIds, setApplicationContext, setCrawlForDirs, setDaemonPort, setDaemonWait, setFilemgrUrl, setGlobalMetadata, setId, setIngester, setNoRecur, setProductPath, setRequiredMetadata, setSkipIngest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDS3FileCrawler

public PDS3FileCrawler()
Method Detail

setFileFilter

public void setFileFilter(FileFilter filter)
Description copied from class: PDSProductCrawler
Sets the file filter for the crawler.

Overrides:
setFileFilter in class PDSProductCrawler
Parameters:
filter - A File Filter defined in the Harvest policy config.

getMetadataForProduct

protected gov.nasa.jpl.oodt.cas.metadata.Metadata getMetadataForProduct(File product)
Description copied from class: PDS3ProductCrawler
Extracts metadata from the given product.

Overrides:
getMetadataForProduct in class PDS3ProductCrawler
Parameters:
product - A PDS file.
Returns:
A Metadata object, which holds metadata from the product.

passesPreconditions

protected boolean passesPreconditions(File product)
Description copied from class: PDS3ProductCrawler
Determines whether the supplied file passes the necessary pre-conditions for the file to be registered.

Overrides:
passesPreconditions in class PDS3ProductCrawler
Parameters:
product - A file.
Returns:
true if the file passes.

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.


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