org.apache.oodt.product.handlers.ofsn
Class AbstractCrawlLister

java.lang.Object
  extended by org.apache.oodt.product.handlers.ofsn.AbstractCrawlLister
All Implemented Interfaces:
OFSNListHandler
Direct Known Subclasses:
DirListNonRecursiveHandler, DirListRecursiveHandler, FileListNonRecursiveHandler, FileListRecursiveHandler, URLGetHandler

public abstract class AbstractCrawlLister
extends Object
implements OFSNListHandler

An abstract OFSNListHandler for generating file lists based on two simple flags: recurse, and crawlForDirs, indicating to crawl for directories rather than files.

Version:
$Revision$
Author:
mattmann

Field Summary
protected static FileFilter DIR_FILTER
           
protected static FileFilter FILE_FILTER
           
protected static Logger LOG
           
 
Constructor Summary
AbstractCrawlLister()
           
 
Method Summary
abstract  void configure(Properties conf)
          Configures this handler with the provided configuration stored in a Properties object.
protected  File[] crawlFiles(File dirRoot, boolean recur, boolean crawlForDirs)
           
abstract  File[] getListing(String ofsn)
          Handlers that implement this method take an Online File Specification Name and return back a listing of files on the remote server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final Logger LOG

FILE_FILTER

protected static final FileFilter FILE_FILTER

DIR_FILTER

protected static final FileFilter DIR_FILTER
Constructor Detail

AbstractCrawlLister

public AbstractCrawlLister()
Method Detail

configure

public abstract void configure(Properties conf)
Description copied from interface: OFSNListHandler
Configures this handler with the provided configuration stored in a Properties object.

Specified by:
configure in interface OFSNListHandler
Parameters:
conf - The configuration for this list handler.

getListing

public abstract File[] getListing(String ofsn)
                           throws ProductException
Description copied from interface: OFSNListHandler
Handlers that implement this method take an Online File Specification Name and return back a listing of files on the remote server.

Specified by:
getListing in interface OFSNListHandler
Parameters:
ofsn - The OFSN path to list files from.
Returns:
An array of File objects.
Throws:
ProductException - If any error occurs performing the listing on the server side.

crawlFiles

protected File[] crawlFiles(File dirRoot,
                            boolean recur,
                            boolean crawlForDirs)


Copyright © 1999-2012 Apache OODT. All Rights Reserved.