public class PDSProductCrawler extends ProductCrawler
Modifier and Type | Field and Description |
---|---|
protected boolean |
inPersistanceMode
Flag for crawler persistance.
|
protected Map<File,Long> |
touchedFiles
A map of files that were touched during crawler persistance.
|
DIR_FILTER, FILE_FILTER, LOG
Constructor and Description |
---|
PDSProductCrawler()
Default constructor.
|
PDSProductCrawler(Pds4MetExtractorConfig extractorConfig)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAction(gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction action)
Adds a crawler action.
|
void |
addActions(List<gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction> actions)
Adds a list of crawler actions.
|
protected void |
addKnownMetadata(File product,
gov.nasa.jpl.oodt.cas.metadata.Metadata productMetadata)
Method not implemented at the moment.
|
void |
crawl(File dir)
Crawls the given directory.
|
List<gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction> |
getActions()
Gets a list of crawler actions defined for the crawler.
|
protected gov.nasa.jpl.oodt.cas.metadata.Metadata |
getMetadataForProduct(File product)
Extracts metadata from the given product.
|
Pds4MetExtractorConfig |
getMetExtractorConfig()
Get the MetExtractor configuration object.
|
protected boolean |
passesPreconditions(File product)
Determines whether the supplied file passes the necessary
pre-conditions for the file to be registered.
|
void |
setDirectoryFilter(DirectoryFilter filter)
Sets the directory filter for the crawler.
|
void |
setFileFilter(FileFilter filter)
Sets the file filter for the crawler.
|
void |
setInPersistanceMode(boolean value) |
void |
setMetExtractorConfig(Pds4MetExtractorConfig config) |
clearIngestStatus, crawl, createProduct, generateDoc, getIngestStatus, getSearchDocGenerator, handleFile, setActionRepo, setSearchDocGenerator
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
public PDSProductCrawler()
public PDSProductCrawler(Pds4MetExtractorConfig extractorConfig)
extractorConfig
- A configuration class that tells the crawler
what data product types to look for and what metadata to extract.public Pds4MetExtractorConfig getMetExtractorConfig()
public void setMetExtractorConfig(Pds4MetExtractorConfig config)
public void setInPersistanceMode(boolean value)
public void setFileFilter(FileFilter filter)
filter
- A File Filter defined in the Harvest policy config.public void setDirectoryFilter(DirectoryFilter filter)
filter
- A Directory Filter defined in the Harvest policy config.protected void addKnownMetadata(File product, gov.nasa.jpl.oodt.cas.metadata.Metadata productMetadata)
addKnownMetadata
in class ProductCrawler
product
- The product file.productMetadata
- The metadata associated with the product.public void crawl(File dir)
crawl
in class ProductCrawler
dir
- The directory to crawl.public void addAction(gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction action)
action
- A crawler action.public void addActions(List<gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction> actions)
actions
- A list of crawler actions.public List<gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction> getActions()
protected gov.nasa.jpl.oodt.cas.metadata.Metadata getMetadataForProduct(File product)
getMetadataForProduct
in class ProductCrawler
product
- A PDS file.protected boolean passesPreconditions(File product)
passesPreconditions
in class ProductCrawler
product
- A file.Copyright © 2010–2017 Planetary Data System. All rights reserved.