dk.netarkivet.archive.tools
Class RunBatch

java.lang.Object
  extended by dk.netarkivet.common.tools.ToolRunnerBase
      extended by dk.netarkivet.archive.tools.RunBatch

public class RunBatch
extends ToolRunnerBase

A command-line tool to run batch jobs in the bitarchive. Usage: java dk.netarkivet.archive.tools.RunBatch \ classfile [regexp [location [outputfile]] where classfile is a file containing a FileBatchJob implementation regexp is a regular expression that will be matched against file names in the archive, by default .* location is the bitarchive location this should be run on, by default taken from settings. outputfile is a file where the output from the batch job will be written. By default, it goes to stdout. Example: java dk.netarkivet.archive.tools.RunBatch FindMime.class 10-*.arc SB mimes Note that you probably want to set the HTTP port setting (settings.common.port.http) to something other than its default value to avoid clashing with other channel listeners.


Constructor Summary
RunBatch()
           
 
Method Summary
static void main(java.lang.String[] argv)
          Main method.
protected  SimpleCmdlineTool makeMyTool()
          Create an instance of the actual RunBatchTool.
 
Methods inherited from class dk.netarkivet.common.tools.ToolRunnerBase
runTheTool, showMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunBatch

public RunBatch()
Method Detail

main

public static void main(java.lang.String[] argv)
Main method. Runs a batch job in the bitarchive. Setup, teardown and run is delegated to the RunBatchTool class. Management of this, exception handling etc. is delegated to ToolRunnerBase class.

Parameters:
argv - Takes one to four command line parameters, only the first is required: the name of a file containing an implementation of FileBatchJob a regular expression a bitarchive location a filename for output

makeMyTool

protected SimpleCmdlineTool makeMyTool()
Create an instance of the actual RunBatchTool.

Specified by:
makeMyTool in class ToolRunnerBase
Returns:
an instance of RunBatchTool.