org.egothor.apps
Class Extractor

java.lang.Object
  extended by org.egothor.apps.Extractor
All Implemented Interfaces:
BarrelWriter

public class Extractor
extends java.lang.Object
implements BarrelWriter

Extractor is an application that dumps the barrel into a stream of tuples.

Author:
Leo Galambos

Constructor Summary
Extractor(java.lang.String terms, java.lang.String output)
           
 
Method Summary
 void append(BarrelReader b)
          Write contents of the Barrel to standard output.
 void close()
          Finish all operations so that the Barrel produced is consistent.
static void main(java.lang.String[] args)
          Dump the barrel that is stored in the directory specified in the first command line parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Extractor

public Extractor(java.lang.String terms,
                 java.lang.String output)
          throws java.io.IOException
Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)
Dump the barrel that is stored in the directory specified in the first command line parameter.

Parameters:
args - the directory the barrel to dump is stored in

close

public void close()
Description copied from interface: BarrelWriter
Finish all operations so that the Barrel produced is consistent. It also closes all open files.

Specified by:
close in interface BarrelWriter

append

public void append(BarrelReader b)
            throws java.io.IOException
Write contents of the Barrel to standard output.

Specified by:
append in interface BarrelWriter
Parameters:
b - a BarrelReader to read the contents of the Barrel
Throws:
java.io.IOException - if an I/O error occurs