org.egothor.duplicity.algorithm
Class DuplicityChecker
java.lang.Object
org.egothor.duplicity.algorithm.DuplicityChecker
All Implemented Interfaces: Status
public class DuplicityChecker extends java.lang.Objectimplements Status
Contains top-level implementations of duplicity checking algorithm.
Method createDuplicityCheckingFilesForBarrel(org.egothor.core.BarrelReader, java.lang.String)
allow computing duplicity
checking files for single barrel. The method mergeDuplicityCheckingFiles(java.lang.String, java.lang.String, java.util.Set)
allows merging duplicity checking files of two barrels.
The structure of the duplicity checking algorithm files on filesystem is this.
dupliticity (directory)
|--> temp (directory) - contains temporary files for classes
| SimilarUnitPairsTempFile
and
| AllSimilarUnitPairsFile
|--> fdpiX files - correspond to PermutatedMinsFile
|--> fhpiX files - correspond to SimilarUnitPairsFile
- these files are no more computed
This class has a state consisting of the seed of
PermutatedMinsFiller
object
and sign empty
.
Author:
Kate�ina Dufkov�
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
DuplicityChecker
public DuplicityChecker ()
isEmpty
public boolean isEmpty ()
getDuplicityCheckingMainDir
public java.lang.String getDuplicityCheckingMainDir ()
getDuplicityCheckingReportDir
public java.lang.String getDuplicityCheckingReportDir ()
getDuplicityCheckingTempDir
public java.lang.String getDuplicityCheckingTempDir ()
initialize
public void initialize (java.lang.String indexMainDir,
TankerImplSecure tanker)
throws java.io.IOException,
com.sleepycat.db.DatabaseException
Throws:
java.io.IOException
com.sleepycat.db.DatabaseException
commit
public void commit ()
close
public void close ()
getState
public java.util.Properties getState (java.util.Properties p)
Return the state of this object.
Specified by: getState
in interface Status
Parameters: p
- the properties which will be also returned for your convenience
Returns: the properties
setState
public void setState (java.util.Properties state)
Set this object with the given properties.
WARINIG: This function should not be called from outside unless
there are no documents already indexed, because
changing the permutatedMinsFiller seed causes change in all minimums
and the newly appended documents won't be comparable to the documents already in.
Specified by: setState
in interface Status
Parameters: state
- the properties
append
public java.util.Set<DocumentUnitID > append (BarrelReader br,
boolean omitDuplicates,
boolean visualizeDuplicities,
boolean printDuplicitiesToCsv)
throws DuplicityCheckingException
Parameters: br
- omitDuplicates
- visualizeDuplicities
- printDuplicitiesToCsv
-
Returns: null, if omitDuplicates is false
Throws:
DuplicityCheckingException
destroy
public void destroy ()
removeDoc
public void removeDoc (long uid,
int docDBRevision)