de.fu_berlin.ties
Class DirectoryProcessor

java.lang.Object
  extended by de.fu_berlin.ties.ConfigurableProcessor
      extended by de.fu_berlin.ties.DirectoryProcessor
All Implemented Interfaces:
Processor

public abstract class DirectoryProcessor
extends ConfigurableProcessor

Abstract base class for a Processor that operates on the contents of directories.

Version:
$Revision: 1.3 $, $Date: 2004/02/15 17:46:56 $, $Author: siefkes $
Author:
Christian Siefkes

Constructor Summary
DirectoryProcessor(FileFilter filter, TiesConfiguration conf)
          Creates a new instance.
 
Method Summary
 void process(File directory)
          Processes the contents of a directory.
abstract  void process(File[] files, ContextMap context)
          Processes an array of files.
 void process(String inputName)
          Processes an input argument that must specify a directory.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class de.fu_berlin.ties.ConfigurableProcessor
getConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectoryProcessor

public DirectoryProcessor(FileFilter filter,
                          TiesConfiguration conf)
Creates a new instance.

Parameters:
filter - the filter used to decide which files to accept
conf - used to configure this instance; if null, the standard configuration is used
Method Detail

process

public abstract void process(File[] files,
                             ContextMap context)
                      throws IOException,
                             ProcessingException
Processes an array of files.

Parameters:
files - the array of files to process
context - a map of objects that are made available for processing; will be empty when called from the implemented process methods in this class
Throws:
IOException - if an I/O error occurs
ProcessingException - if an error occurs during processing

process

public final void process(File directory)
                   throws IOException,
                          ProcessingException
Processes the contents of a directory.

Parameters:
directory - the the directory to process
Throws:
IOException - if an I/O error occurs
ProcessingException - if an error occurs during processing

process

public final void process(String inputName)
                   throws IOException,
                          ProcessingException
Processes an input argument that must specify a directory.

Parameters:
inputName - the name of the directory to process
Throws:
IOException - if an I/O error occurs
ProcessingException - if an error occurs during processing

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
Returns:
a textual representation


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.