|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.egothor.duplicity.file.DuplicityCheckingFile
org.egothor.duplicity.file.PermutatedMinsFile
public class PermutatedMinsFile
Represents the "minimums of permutated unit identificators" file
used in duplicity checking algorithm.
The file contains instances of UnitPermutatedMin class.
That means it contains pairs {min(pi(T(d))), d}, where:
PermutatedMinsFileProducer
or read from the filesystem.merge(org.egothor.duplicity.file.PermutatedMinsFile) method.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.egothor.duplicity.file.DuplicityCheckingFile |
|---|
DuplicityCheckingFile.TempFile |
| Field Summary |
|---|
| Fields inherited from class org.egothor.duplicity.file.DuplicityCheckingFile |
|---|
location, out |
| Constructor Summary | |
|---|---|
PermutatedMinsFile(long permID,
java.lang.String location)
Initialializes the file already written to filesystem. |
|
| Method Summary | |
|---|---|
protected void |
createOut()
Creates permanent file and sets the out field. |
SimilarUnitPairsFile |
createSimilarUnitPairsFile()
From this files, creates the SimilarUnitPairsFile corresponding to it. |
java.lang.String |
dump()
Dumps the content of the file to string. |
java.lang.String |
getFilename()
Returns the filename corresponding to this file. |
long |
getPermID()
|
SimilarUnitPairsTempFile |
getSimilarities(PermutatedMinsFile mpuf)
Merges two files externally, on filesystem. |
boolean |
hasTheSameContent(DuplicityCheckingFile file)
Checks if two files has the same content. |
void |
merge(PermutatedMinsFile mpuf)
Merges two files externally, on filesystem. |
void |
remove(java.util.Set<DocumentUnitID> toRemove)
Removes all occurences of documents given in the set from the file. |
java.lang.String |
toString()
|
| Methods inherited from class org.egothor.duplicity.file.DuplicityCheckingFile |
|---|
createPermOut, createTempOut, delete, dump, getLocation, getNewTempFile, getOut, hasTheSameContent, initFromProducer, openOut, remove |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PermutatedMinsFile(long permID,
java.lang.String location)
throws java.io.FileNotFoundException
getFilename()
and will be searched in the location directory.
permID - identification of the permutation to be assigned to this filelocation - path and name of the directory in which the file will be created,
must end with "/" sign
java.io.FileNotFoundException - if the file already exists| Method Detail |
|---|
public java.lang.String getFilename()
Constants.PERMUTATED_MINS_FILE_PREFIX<permID>.
getFilename in class DuplicityCheckingFilepublic long getPermID()
protected void createOut()
throws java.io.IOException
DuplicityCheckingFile.createPermOut()
method.
createOut in class DuplicityCheckingFilejava.io.IOException - if the file already exists or
could not be createdDuplicityCheckingFile.createPermOut()public SimilarUnitPairsFile createSimilarUnitPairsFile()
SimilarUnitPairsFile written to the filesystem.
public void merge(PermutatedMinsFile mpuf)
throws java.io.IOException,
MergeException
mpuf - file to be merged into this
MergeException - on attempt to merge files corresponding to different permutations
or if temporary file could not be created
java.io.IOException
public SimilarUnitPairsTempFile getSimilarities(PermutatedMinsFile mpuf)
throws java.io.IOException,
MergeException
mpuf - file to be merged into this
MergeException - on attempt to merge files corresponding to different permutations
or if temporary file could not be created
java.io.IOExceptionpublic java.lang.String toString()
toString in class DuplicityCheckingFilepublic java.lang.String dump()
public void remove(java.util.Set<DocumentUnitID> toRemove)
throws java.io.IOException
toRemove - set of document ids to remove
java.io.IOExceptionpublic boolean hasTheSameContent(DuplicityCheckingFile file)
file - the second file to be tested
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||