org.egothor.duplicity.apps
Class DuplicityCheckerIndexCreator

java.lang.Object
  extended by org.egothor.duplicity.apps.DuplicityCheckerIndexCreator

public class DuplicityCheckerIndexCreator
extends java.lang.Object

Use this program to create index with duplicity checking ability from barrels saved locally. There are three possible variants:

No duplicates are searched in the documents, i.e., all the documents in the barrels are added to the index. Usage: java DuplicityCheckerIndexCreator createIndex|createDCIndex|addDC indexDir [-b barrelsDir] [-s startBarrel] [-e endBarrel] [-c className] [-noprompt] indexDir: directory where the index should be created barrelsDir: directory where the barrels are located, will be ignored in addDC mode must be specified for createIndex and createDCIndex modes startBarrel: number of barrel from which the duplicity checker initialization should begin default = 1 endBarrel: number of barrel up to which the duplicity checker initialization should go default = last barrel number className: name of the class to be used to parse the barrels in the index, must implement the BarrelReader interface and have a one String parameter constructor will be ignored in the addDC mode default = org.egothor.robot.index.ThickFastIn noprompt: the application does not prompt the user for anything Examples: java DuplicityCheckerIndexCreator createIndex index -b barrels -> Creates index in directory index using all barrels found in the directory barrels. java DuplicityCheckerIndexCreator createDCIndex indexDC -b barrels -e 10 -> Creates duplicity checking index in directory indexDC using first 10 barrels found in the directory barrels. java DuplicityCheckerIndexCreator addDC index -> Adds duplicity checking ability to the index in directory index. INFO: Currently the only class that meets all the conditions (has a one String parameter constructor and provides resolved documents) is the default class.

Author:
Kate�ina Dufkov�

Constructor Summary
DuplicityCheckerIndexCreator()
           
 
Method Summary
static int getLastBarrelFromDirectory(java.lang.String dir)
          Gets the number of the last barrel in given directory.
static void main(java.lang.String[] argv)
           
static BarrelReader open(java.lang.String index, int barrelNumber, java.lang.String className)
          Opens barrel with given number in given index.
static void usage()
          Prints usage of this program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DuplicityCheckerIndexCreator

public DuplicityCheckerIndexCreator()
Method Detail

open

public static BarrelReader open(java.lang.String index,
                                int barrelNumber,
                                java.lang.String className)
Opens barrel with given number in given index. Uses given class to read the barrel.

Parameters:
index - index directory where the barrel is stored
barrelNumber - number of the barrel
className - class to be used to read the barrel
Returns:
BarrelReader instance, or null on error

getLastBarrelFromDirectory

public static int getLastBarrelFromDirectory(java.lang.String dir)
Gets the number of the last barrel in given directory.

Parameters:
dir - directory where the barrels are stored
Returns:
number of the last barrel

usage

public static void usage()
Prints usage of this program.


main

public static void main(java.lang.String[] argv)